mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-06-28 08:52:29 +00:00
Added PoP Initialization and a Challenge Query (#207)
* added InitPoP message * added getChallenge query to inspect challenges * adjusted towards a unique block height identification unit: int64, not uint64 * added challenge param finished to identify challenges that weren't completed but will be part of re-issuance. Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
8c2e4704cd
commit
6a60b78b62
79
docs/static/openapi.yml
vendored
79
docs/static/openapi.yml
vendored
@ -46949,6 +46949,58 @@ paths:
|
|||||||
additionalProperties: {}
|
additionalProperties: {}
|
||||||
tags:
|
tags:
|
||||||
- Query
|
- Query
|
||||||
|
/planetmint/planetmint-go/dao/get_challenge/{height}:
|
||||||
|
get:
|
||||||
|
summary: Queries a list of GetChallenge items.
|
||||||
|
operationId: PlanetmintgoDaoGetChallenge
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A successful response.
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
challenge:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
initiator:
|
||||||
|
type: string
|
||||||
|
challenger:
|
||||||
|
type: string
|
||||||
|
challengee:
|
||||||
|
type: string
|
||||||
|
height:
|
||||||
|
type: string
|
||||||
|
format: int64
|
||||||
|
success:
|
||||||
|
type: boolean
|
||||||
|
finished:
|
||||||
|
type: boolean
|
||||||
|
default:
|
||||||
|
description: An unexpected error response.
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
code:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
details:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
'@type':
|
||||||
|
type: string
|
||||||
|
additionalProperties: {}
|
||||||
|
parameters:
|
||||||
|
- name: height
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
format: int64
|
||||||
|
tags:
|
||||||
|
- Query
|
||||||
/planetmint/machine/get_machine_by_address/{address}:
|
/planetmint/machine/get_machine_by_address/{address}:
|
||||||
get:
|
get:
|
||||||
summary: Queries a list of GetMachineByAddress items.
|
summary: Queries a list of GetMachineByAddress items.
|
||||||
@ -76024,11 +76076,11 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
height:
|
height:
|
||||||
type: string
|
type: string
|
||||||
format: uint64
|
format: int64
|
||||||
success:
|
success:
|
||||||
type: boolean
|
type: boolean
|
||||||
description:
|
finished:
|
||||||
type: string
|
type: boolean
|
||||||
planetmintgo.dao.DistributionOrder:
|
planetmintgo.dao.DistributionOrder:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -76087,6 +76139,8 @@ definitions:
|
|||||||
type: object
|
type: object
|
||||||
planetmintgo.dao.MsgDistributionResultResponse:
|
planetmintgo.dao.MsgDistributionResultResponse:
|
||||||
type: object
|
type: object
|
||||||
|
planetmintgo.dao.MsgInitPopResponse:
|
||||||
|
type: object
|
||||||
planetmintgo.dao.MsgMintTokenResponse:
|
planetmintgo.dao.MsgMintTokenResponse:
|
||||||
type: object
|
type: object
|
||||||
planetmintgo.dao.MsgReissueRDDLProposalResponse:
|
planetmintgo.dao.MsgReissueRDDLProposalResponse:
|
||||||
@ -76103,6 +76157,25 @@ definitions:
|
|||||||
mint_address:
|
mint_address:
|
||||||
type: string
|
type: string
|
||||||
description: Params defines the parameters for the module.
|
description: Params defines the parameters for the module.
|
||||||
|
planetmintgo.dao.QueryGetChallengeResponse:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
challenge:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
initiator:
|
||||||
|
type: string
|
||||||
|
challenger:
|
||||||
|
type: string
|
||||||
|
challengee:
|
||||||
|
type: string
|
||||||
|
height:
|
||||||
|
type: string
|
||||||
|
format: int64
|
||||||
|
success:
|
||||||
|
type: boolean
|
||||||
|
finished:
|
||||||
|
type: boolean
|
||||||
planetmintgo.dao.QueryGetMintRequestsByHashResponse:
|
planetmintgo.dao.QueryGetMintRequestsByHashResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -8,7 +8,7 @@ message Challenge {
|
|||||||
string initiator = 1;
|
string initiator = 1;
|
||||||
string challenger = 2;
|
string challenger = 2;
|
||||||
string challengee = 3;
|
string challengee = 3;
|
||||||
uint64 height = 4;
|
int64 height = 4;
|
||||||
bool success = 5;
|
bool success = 5;
|
||||||
string description = 6;
|
bool finished = 6;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import "planetmintgo/dao/params.proto";
|
|||||||
import "planetmintgo/dao/mint_request.proto";
|
import "planetmintgo/dao/mint_request.proto";
|
||||||
import "planetmintgo/dao/mint_requests.proto";
|
import "planetmintgo/dao/mint_requests.proto";
|
||||||
import "planetmintgo/dao/reissuance.proto";
|
import "planetmintgo/dao/reissuance.proto";
|
||||||
|
import "planetmintgo/dao/challenge.proto";
|
||||||
|
|
||||||
option go_package = "github.com/planetmint/planetmint-go/x/dao/types";
|
option go_package = "github.com/planetmint/planetmint-go/x/dao/types";
|
||||||
|
|
||||||
@ -44,6 +45,12 @@ service Query {
|
|||||||
option (google.api.http).get = "/planetmint/dao/get_reissuances";
|
option (google.api.http).get = "/planetmint/dao/get_reissuances";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Queries a list of GetChallenge items.
|
||||||
|
rpc GetChallenge (QueryGetChallengeRequest) returns (QueryGetChallengeResponse) {
|
||||||
|
option (google.api.http).get = "/planetmint/planetmint-go/dao/get_challenge/{height}";
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// QueryParamsRequest is request type for the Query/Params RPC method.
|
// QueryParamsRequest is request type for the Query/Params RPC method.
|
||||||
message QueryParamsRequest {}
|
message QueryParamsRequest {}
|
||||||
@ -88,3 +95,11 @@ message QueryGetReissuancesResponse {
|
|||||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message QueryGetChallengeRequest {
|
||||||
|
int64 height = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message QueryGetChallengeResponse {
|
||||||
|
Challenge challenge = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -15,13 +15,14 @@ option go_package = "github.com/planetmint/planetmint-go/x/dao/types";
|
|||||||
|
|
||||||
// Msg defines the Msg service.
|
// Msg defines the Msg service.
|
||||||
service Msg {
|
service Msg {
|
||||||
rpc ReissueRDDLProposal (MsgReissueRDDLProposal ) returns (MsgReissueRDDLProposalResponse );
|
rpc ReissueRDDLProposal (MsgReissueRDDLProposal) returns (MsgReissueRDDLProposalResponse);
|
||||||
rpc MintToken (MsgMintToken ) returns (MsgMintTokenResponse );
|
rpc MintToken (MsgMintToken ) returns (MsgMintTokenResponse );
|
||||||
rpc ReissueRDDLResult (MsgReissueRDDLResult ) returns (MsgReissueRDDLResultResponse );
|
rpc ReissueRDDLResult (MsgReissueRDDLResult ) returns (MsgReissueRDDLResultResponse );
|
||||||
rpc DistributionResult (MsgDistributionResult ) returns (MsgDistributionResultResponse );
|
rpc DistributionResult (MsgDistributionResult ) returns (MsgDistributionResultResponse );
|
||||||
rpc DistributionRequest (MsgDistributionRequest) returns (MsgDistributionRequestResponse);
|
rpc DistributionRequest (MsgDistributionRequest) returns (MsgDistributionRequestResponse);
|
||||||
rpc UpdateParams (MsgUpdateParams ) returns (MsgUpdateParamsResponse );
|
rpc UpdateParams (MsgUpdateParams ) returns (MsgUpdateParamsResponse );
|
||||||
rpc ReportPopResult (MsgReportPopResult) returns (MsgReportPopResultResponse);
|
rpc ReportPopResult (MsgReportPopResult ) returns (MsgReportPopResultResponse );
|
||||||
|
rpc InitPop (MsgInitPop ) returns (MsgInitPopResponse );
|
||||||
}
|
}
|
||||||
message MsgReportPopResult {
|
message MsgReportPopResult {
|
||||||
string creator = 1;
|
string creator = 1;
|
||||||
@ -54,6 +55,7 @@ message MsgReissueRDDLResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message MsgReissueRDDLResultResponse {}
|
message MsgReissueRDDLResultResponse {}
|
||||||
|
|
||||||
message MsgDistributionResult {
|
message MsgDistributionResult {
|
||||||
string creator = 1;
|
string creator = 1;
|
||||||
int64 lastPop = 2;
|
int64 lastPop = 2;
|
||||||
@ -76,11 +78,22 @@ message MsgUpdateParams {
|
|||||||
|
|
||||||
// authority is the address that controls the module (defaults to x/gov unless overwritten).
|
// authority is the address that controls the module (defaults to x/gov unless overwritten).
|
||||||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||||
|
|
||||||
// params defines the x/dao parameters to update.
|
// params defines the x/dao parameters to update.
|
||||||
//
|
|
||||||
// NOTE: All parameters must be supplied.
|
// NOTE: All parameters must be supplied.
|
||||||
Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
||||||
}
|
}
|
||||||
|
|
||||||
message MsgUpdateParamsResponse {}
|
message MsgUpdateParamsResponse {}
|
||||||
|
|
||||||
|
message MsgInitPop {
|
||||||
|
string creator = 1;
|
||||||
|
string initiator = 2;
|
||||||
|
string challenger = 3;
|
||||||
|
string challengee = 4;
|
||||||
|
int64 height = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MsgInitPopResponse {}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ func buildSignBroadcastTx(goCtx context.Context, loggingContext string, sendingV
|
|||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
func InitRDDLReissuanceProcess(goCtx context.Context, proposerAddress string, txUnsigned string, blockHeight int64) {
|
func SendInitReissuance(goCtx context.Context, proposerAddress string, txUnsigned string, blockHeight int64) {
|
||||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
// get_last_PoPBlockHeight() // TODO: to be read form the upcoming PoP-store
|
// get_last_PoPBlockHeight() // TODO: to be read form the upcoming PoP-store
|
||||||
sendingValidatorAddress := config.GetConfig().ValidatorAddress
|
sendingValidatorAddress := config.GetConfig().ValidatorAddress
|
||||||
@ -45,7 +45,7 @@ func InitRDDLReissuanceProcess(goCtx context.Context, proposerAddress string, tx
|
|||||||
buildSignBroadcastTx(goCtx, "initializing RDDL re-issuance", sendingValidatorAddress, msg)
|
buildSignBroadcastTx(goCtx, "initializing RDDL re-issuance", sendingValidatorAddress, msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
func SendRDDLReissuanceResult(goCtx context.Context, proposerAddress string, txID string, blockHeight int64) {
|
func SendReissuanceResult(goCtx context.Context, proposerAddress string, txID string, blockHeight int64) {
|
||||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
sendingValidatorAddress := config.GetConfig().ValidatorAddress
|
sendingValidatorAddress := config.GetConfig().ValidatorAddress
|
||||||
GetAppLogger().Info(ctx, "create re-issuance result")
|
GetAppLogger().Info(ctx, "create re-issuance result")
|
||||||
@ -53,7 +53,7 @@ func SendRDDLReissuanceResult(goCtx context.Context, proposerAddress string, txI
|
|||||||
buildSignBroadcastTx(goCtx, "sending the re-issuance result", sendingValidatorAddress, msg)
|
buildSignBroadcastTx(goCtx, "sending the re-issuance result", sendingValidatorAddress, msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
func SendRDDLDistributionRequest(goCtx context.Context, distribution daotypes.DistributionOrder) {
|
func SendDistributionRequest(goCtx context.Context, distribution daotypes.DistributionOrder) {
|
||||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
sendingValidatorAddress := config.GetConfig().ValidatorAddress
|
sendingValidatorAddress := config.GetConfig().ValidatorAddress
|
||||||
GetAppLogger().Info(ctx, "create Distribution Request")
|
GetAppLogger().Info(ctx, "create Distribution Request")
|
||||||
@ -61,7 +61,7 @@ func SendRDDLDistributionRequest(goCtx context.Context, distribution daotypes.Di
|
|||||||
buildSignBroadcastTx(goCtx, "sending the distribution request", sendingValidatorAddress, msg)
|
buildSignBroadcastTx(goCtx, "sending the distribution request", sendingValidatorAddress, msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
func SendRDDLDistributionResult(goCtx context.Context, lastPoP string, daoTxID string, invTxID string, popTxID string) {
|
func SendDistributionResult(goCtx context.Context, lastPoP string, daoTxID string, invTxID string, popTxID string) {
|
||||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
sendingValidatorAddress := config.GetConfig().ValidatorAddress
|
sendingValidatorAddress := config.GetConfig().ValidatorAddress
|
||||||
GetAppLogger().Info(ctx, "create Distribution Result")
|
GetAppLogger().Info(ctx, "create Distribution Result")
|
||||||
@ -81,3 +81,11 @@ func SendLiquidAssetRegistration(goCtx context.Context, notarizedAsset machinety
|
|||||||
msg := machinetypes.NewMsgNotarizeLiquidAsset(sendingValidatorAddress, ¬arizedAsset)
|
msg := machinetypes.NewMsgNotarizeLiquidAsset(sendingValidatorAddress, ¬arizedAsset)
|
||||||
buildSignBroadcastTx(goCtx, "Liquid Asset Registration:", sendingValidatorAddress, msg)
|
buildSignBroadcastTx(goCtx, "Liquid Asset Registration:", sendingValidatorAddress, msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SendInitPoP(goCtx context.Context, proposer string, challenger string, challengee string, blockHeight int64) {
|
||||||
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
sendingValidatorAddress := config.GetConfig().ValidatorAddress
|
||||||
|
GetAppLogger().Info(ctx, "create Init PoP message")
|
||||||
|
msg := daotypes.NewMsgInitPop(sendingValidatorAddress, proposer, challenger, challengee, blockHeight)
|
||||||
|
buildSignBroadcastTx(goCtx, "Init PoP:", sendingValidatorAddress, msg)
|
||||||
|
}
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) {
|
func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, _ keeper.Keeper) {
|
||||||
proposerAddress := req.Header.GetProposerAddress()
|
proposerAddress := req.Header.GetProposerAddress()
|
||||||
|
|
||||||
// Check if node is block proposer
|
// Check if node is block proposer
|
||||||
@ -22,18 +22,30 @@ func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper)
|
|||||||
blockHeight := req.Header.GetHeight()
|
blockHeight := req.Header.GetHeight()
|
||||||
if isPoPHeight(req.Header.GetHeight()) && util.IsValidatorBlockProposer(ctx, proposerAddress) {
|
if isPoPHeight(req.Header.GetHeight()) && util.IsValidatorBlockProposer(ctx, proposerAddress) {
|
||||||
hexProposerAddress := hex.EncodeToString(proposerAddress)
|
hexProposerAddress := hex.EncodeToString(proposerAddress)
|
||||||
conf := config.GetConfig()
|
// select PoP participants
|
||||||
txUnsigned := keeper.GetReissuanceCommand(conf.ReissuanceAsset, blockHeight)
|
challenger := ""
|
||||||
util.InitRDDLReissuanceProcess(ctx, hexProposerAddress, txUnsigned, blockHeight)
|
challengee := ""
|
||||||
}
|
|
||||||
if isDistributionHeight(blockHeight) {
|
// Issue PoP
|
||||||
// initialize the distribution message
|
util.SendInitPoP(ctx, hexProposerAddress, challenger, challengee, blockHeight)
|
||||||
distribution, err := k.GetDistributionForReissuedTokens(ctx, blockHeight)
|
// TODO send MQTT message to challenger && challengee
|
||||||
if err != nil {
|
|
||||||
util.GetAppLogger().Error(ctx, "error while computing the RDDL distribution ", err)
|
|
||||||
}
|
|
||||||
util.SendRDDLDistributionRequest(ctx, distribution)
|
|
||||||
}
|
}
|
||||||
|
// TODO will be reintegrated with by merging branch 184-implement-staged-claim
|
||||||
|
// if isDistributionHeight(blockHeight) {
|
||||||
|
// // reissue 1st
|
||||||
|
|
||||||
|
// conf := config.GetConfig()
|
||||||
|
// txUnsigned := keeper.GetReissuanceCommand(conf.ReissuanceAsset, blockHeight)
|
||||||
|
// util.SendInitReissuance(ctx, hexProposerAddress, txUnsigned, blockHeight)
|
||||||
|
|
||||||
|
// // distribute thereafter
|
||||||
|
//// initialize the distribution message
|
||||||
|
// distribution, err := k.GetDistributionForReissuedTokens(ctx, blockHeight)
|
||||||
|
// if err != nil {
|
||||||
|
// util.GetAppLogger().Error(ctx, "error while computing the RDDL distribution ", err)
|
||||||
|
// }
|
||||||
|
// util.SendDistributionRequest(ctx, distribution)
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
func isPoPHeight(height int64) bool {
|
func isPoPHeight(height int64) bool {
|
||||||
@ -41,10 +53,11 @@ func isPoPHeight(height int64) bool {
|
|||||||
return height%int64(cfg.PoPEpochs) == 0
|
return height%int64(cfg.PoPEpochs) == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func isDistributionHeight(height int64) bool {
|
// TODO will be reintegrated with by merging branch 184-implement-staged-claim
|
||||||
cfg := config.GetConfig()
|
// func isDistributionHeight(height int64) bool {
|
||||||
return height%int64(cfg.DistributionEpochs) == 0
|
// cfg := config.GetConfig()
|
||||||
}
|
// return height%int64(cfg.DistributionEpochs) == 0
|
||||||
|
// }
|
||||||
|
|
||||||
func EndBlocker(ctx sdk.Context, _ abci.RequestEndBlock, k keeper.Keeper) {
|
func EndBlocker(ctx sdk.Context, _ abci.RequestEndBlock, k keeper.Keeper) {
|
||||||
k.DistributeCollectedFees(ctx)
|
k.DistributeCollectedFees(ctx)
|
||||||
|
@ -30,6 +30,8 @@ func GetQueryCmd(_ string) *cobra.Command {
|
|||||||
|
|
||||||
cmd.AddCommand(CmdGetReissuances())
|
cmd.AddCommand(CmdGetReissuances())
|
||||||
|
|
||||||
|
cmd.AddCommand(CmdGetChallenge())
|
||||||
|
|
||||||
// this line is used by starport scaffolding # 1
|
// this line is used by starport scaffolding # 1
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
50
x/dao/client/cli/query_get_challenge.go
Normal file
50
x/dao/client/cli/query_get_challenge.go
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
package cli
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/cosmos/cosmos-sdk/client"
|
||||||
|
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||||
|
"github.com/planetmint/planetmint-go/x/dao/types"
|
||||||
|
"github.com/spf13/cast"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ = strconv.Itoa(0)
|
||||||
|
|
||||||
|
func CmdGetChallenge() *cobra.Command {
|
||||||
|
cmd := &cobra.Command{
|
||||||
|
Use: "get-challenge [height]",
|
||||||
|
Short: "Query get_challenge",
|
||||||
|
Args: cobra.ExactArgs(1),
|
||||||
|
RunE: func(cmd *cobra.Command, args []string) (err error) {
|
||||||
|
reqHeight, err := cast.ToInt64E(args[0])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
clientCtx, err := client.GetClientQueryContext(cmd)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
queryClient := types.NewQueryClient(clientCtx)
|
||||||
|
|
||||||
|
params := &types.QueryGetChallengeRequest{
|
||||||
|
|
||||||
|
Height: reqHeight,
|
||||||
|
}
|
||||||
|
|
||||||
|
res, err := queryClient.GetChallenge(cmd.Context(), params)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return clientCtx.PrintProto(res)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
flags.AddQueryFlagsToCmd(cmd)
|
||||||
|
|
||||||
|
return cmd
|
||||||
|
}
|
@ -32,6 +32,7 @@ func GetTxCmd() *cobra.Command {
|
|||||||
cmd.AddCommand(CmdDistributionResult())
|
cmd.AddCommand(CmdDistributionResult())
|
||||||
cmd.AddCommand(CmdDistributionRequest())
|
cmd.AddCommand(CmdDistributionRequest())
|
||||||
cmd.AddCommand(CmdUpdateParams())
|
cmd.AddCommand(CmdUpdateParams())
|
||||||
|
cmd.AddCommand(CmdInitPop())
|
||||||
// this line is used by starport scaffolding # 1
|
// this line is used by starport scaffolding # 1
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
52
x/dao/client/cli/tx_init_pop.go
Normal file
52
x/dao/client/cli/tx_init_pop.go
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
package cli
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/cosmos/cosmos-sdk/client"
|
||||||
|
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||||
|
"github.com/cosmos/cosmos-sdk/client/tx"
|
||||||
|
"github.com/planetmint/planetmint-go/x/dao/types"
|
||||||
|
"github.com/spf13/cast"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ = strconv.Itoa(0)
|
||||||
|
|
||||||
|
func CmdInitPop() *cobra.Command {
|
||||||
|
cmd := &cobra.Command{
|
||||||
|
Use: "init-pop [initiator] [challenger] [challengee] [height]",
|
||||||
|
Short: "Broadcast message InitPop",
|
||||||
|
Args: cobra.ExactArgs(4),
|
||||||
|
RunE: func(cmd *cobra.Command, args []string) (err error) {
|
||||||
|
argInitiator := args[0]
|
||||||
|
argChallenger := args[1]
|
||||||
|
argChallengee := args[2]
|
||||||
|
argHeight, err := cast.ToInt64E(args[3])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
clientCtx, err := client.GetClientTxContext(cmd)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
msg := types.NewMsgInitPop(
|
||||||
|
clientCtx.GetFromAddress().String(),
|
||||||
|
argInitiator,
|
||||||
|
argChallenger,
|
||||||
|
argChallengee,
|
||||||
|
argHeight,
|
||||||
|
)
|
||||||
|
if err := msg.ValidateBasic(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
flags.AddTxFlagsToCmd(cmd)
|
||||||
|
|
||||||
|
return cmd
|
||||||
|
}
|
@ -14,7 +14,7 @@ func (k Keeper) StoreChallenge(ctx sdk.Context, challenge types.Challenge) {
|
|||||||
store.Set(getChallengeBytes(challenge.Height), appendValue)
|
store.Set(getChallengeBytes(challenge.Height), appendValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (k Keeper) GetChallenge(ctx sdk.Context, height uint64) (val types.Challenge, found bool) {
|
func (k Keeper) LookupChallenge(ctx sdk.Context, height int64) (val types.Challenge, found bool) {
|
||||||
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ChallengeKey))
|
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ChallengeKey))
|
||||||
challenge := store.Get(getChallengeBytes(height))
|
challenge := store.Get(getChallengeBytes(height))
|
||||||
if challenge == nil {
|
if challenge == nil {
|
||||||
@ -24,7 +24,7 @@ func (k Keeper) GetChallenge(ctx sdk.Context, height uint64) (val types.Challeng
|
|||||||
return val, true
|
return val, true
|
||||||
}
|
}
|
||||||
|
|
||||||
func getChallengeBytes(height uint64) []byte {
|
func getChallengeBytes(height int64) []byte {
|
||||||
// Adding 1 because 0 will be interpreted as nil, which is an invalid key
|
// Adding 1 because 0 will be interpreted as nil, which is an invalid key
|
||||||
return big.NewInt(int64(height + 1)).Bytes()
|
return big.NewInt(height + 1).Bytes()
|
||||||
}
|
}
|
||||||
|
@ -15,12 +15,12 @@ import (
|
|||||||
func createNChallenge(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.Challenge {
|
func createNChallenge(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.Challenge {
|
||||||
items := make([]types.Challenge, n)
|
items := make([]types.Challenge, n)
|
||||||
for i := range items {
|
for i := range items {
|
||||||
items[i].Height = uint64(i)
|
items[i].Height = int64(i)
|
||||||
items[i].Initiator = fmt.Sprintf("initiator%v", i)
|
items[i].Initiator = fmt.Sprintf("initiator%v", i)
|
||||||
items[i].Challenger = fmt.Sprintf("challenger%v", i)
|
items[i].Challenger = fmt.Sprintf("challenger%v", i)
|
||||||
items[i].Challengee = fmt.Sprintf("challengee%v", i)
|
items[i].Challengee = fmt.Sprintf("challengee%v", i)
|
||||||
items[i].Success = true
|
items[i].Success = true
|
||||||
items[i].Description = fmt.Sprintf("expected %v got %v", i, i)
|
items[i].Finished = true
|
||||||
keeper.StoreChallenge(ctx, items[i])
|
keeper.StoreChallenge(ctx, items[i])
|
||||||
}
|
}
|
||||||
return items
|
return items
|
||||||
@ -31,7 +31,7 @@ func TestGetChallenge(t *testing.T) {
|
|||||||
keeper, ctx := keepertest.DaoKeeper(t)
|
keeper, ctx := keepertest.DaoKeeper(t)
|
||||||
items := createNChallenge(keeper, ctx, 10)
|
items := createNChallenge(keeper, ctx, 10)
|
||||||
for _, item := range items {
|
for _, item := range items {
|
||||||
challenge, found := keeper.GetChallenge(ctx, item.Height)
|
challenge, found := keeper.LookupChallenge(ctx, item.Height)
|
||||||
assert.True(t, found)
|
assert.True(t, found)
|
||||||
assert.Equal(t, item, challenge)
|
assert.Equal(t, item, challenge)
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ func (k msgServer) DistributionRequest(goCtx context.Context, msg *types.MsgDist
|
|||||||
msg.Distribution.PopTxID = popTx
|
msg.Distribution.PopTxID = popTx
|
||||||
msg.Distribution.DaoTxID = daoTx
|
msg.Distribution.DaoTxID = daoTx
|
||||||
lastPopString := strconv.FormatInt(msg.Distribution.LastPop, 10)
|
lastPopString := strconv.FormatInt(msg.Distribution.LastPop, 10)
|
||||||
util.SendRDDLDistributionResult(goCtx, lastPopString, daoTx, investorTx, popTx)
|
util.SendDistributionResult(goCtx, lastPopString, daoTx, investorTx, popTx)
|
||||||
}
|
}
|
||||||
k.StoreDistributionOrder(ctx, *msg.GetDistribution())
|
k.StoreDistributionOrder(ctx, *msg.GetDistribution())
|
||||||
|
|
||||||
|
22
x/dao/keeper/msg_server_init_pop.go
Normal file
22
x/dao/keeper/msg_server_init_pop.go
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package keeper
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
"github.com/planetmint/planetmint-go/x/dao/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (k msgServer) InitPop(goCtx context.Context, msg *types.MsgInitPop) (*types.MsgInitPopResponse, error) {
|
||||||
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
|
||||||
|
var challenge types.Challenge
|
||||||
|
challenge.Initiator = msg.GetInitiator()
|
||||||
|
challenge.Challengee = msg.GetChallengee()
|
||||||
|
challenge.Challenger = msg.GetChallenger()
|
||||||
|
challenge.Height = msg.GetHeight()
|
||||||
|
|
||||||
|
k.StoreChallenge(ctx, challenge)
|
||||||
|
|
||||||
|
return &types.MsgInitPopResponse{}, nil
|
||||||
|
}
|
@ -18,7 +18,7 @@ func (k msgServer) ReissueRDDLProposal(goCtx context.Context, msg *types.MsgReis
|
|||||||
util.GetAppLogger().Error(ctx, "REISSUE: Asset reissuance failed: "+err.Error())
|
util.GetAppLogger().Error(ctx, "REISSUE: Asset reissuance failed: "+err.Error())
|
||||||
}
|
}
|
||||||
// 3. notarize result by notarizing the liquid tx-id
|
// 3. notarize result by notarizing the liquid tx-id
|
||||||
util.SendRDDLReissuanceResult(goCtx, msg.GetProposer(), txID, msg.GetBlockHeight())
|
util.SendReissuanceResult(goCtx, msg.GetProposer(), txID, msg.GetBlockHeight())
|
||||||
}
|
}
|
||||||
|
|
||||||
var reissuance types.Reissuance
|
var reissuance types.Reissuance
|
||||||
|
@ -35,6 +35,7 @@ func (k msgServer) issuePoPRewards(_ types.Challenge) (err error) {
|
|||||||
// cfg := config.GetConfig()
|
// cfg := config.GetConfig()
|
||||||
// client := osc.NewClient(cfg.WatchmenEndpoint, 1234)
|
// client := osc.NewClient(cfg.WatchmenEndpoint, 1234)
|
||||||
|
|
||||||
|
// TODO will be reintegrated with by merging branch 184-implement-staged-claim
|
||||||
// TODO: finalize message and endpoint
|
// TODO: finalize message and endpoint
|
||||||
// msg := osc.NewMessage("/rddl/token")
|
// msg := osc.NewMessage("/rddl/token")
|
||||||
// msg.Append(challenge.Challenger)
|
// msg.Append(challenge.Challenger)
|
||||||
|
@ -31,7 +31,6 @@ func TestMsgServerReportPoPResult(t *testing.T) {
|
|||||||
initiator := sample.Secp256k1AccAddress()
|
initiator := sample.Secp256k1AccAddress()
|
||||||
challenger := sample.Secp256k1AccAddress()
|
challenger := sample.Secp256k1AccAddress()
|
||||||
challengee := sample.Secp256k1AccAddress()
|
challengee := sample.Secp256k1AccAddress()
|
||||||
description := "sample text"
|
|
||||||
|
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
name string
|
name string
|
||||||
@ -47,8 +46,8 @@ func TestMsgServerReportPoPResult(t *testing.T) {
|
|||||||
Challenger: challenger.String(),
|
Challenger: challenger.String(),
|
||||||
Challengee: challengee.String(),
|
Challengee: challengee.String(),
|
||||||
Height: 1,
|
Height: 1,
|
||||||
Description: description,
|
|
||||||
Success: true,
|
Success: true,
|
||||||
|
Finished: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"",
|
"",
|
||||||
@ -62,7 +61,7 @@ func TestMsgServerReportPoPResult(t *testing.T) {
|
|||||||
Challenger: challenger.String(),
|
Challenger: challenger.String(),
|
||||||
Challengee: challengee.String(),
|
Challengee: challengee.String(),
|
||||||
Height: 1,
|
Height: 1,
|
||||||
Description: description,
|
Finished: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"", // no error because Go defaults bool to false
|
"", // no error because Go defaults bool to false
|
||||||
@ -75,8 +74,8 @@ func TestMsgServerReportPoPResult(t *testing.T) {
|
|||||||
Challenger: challenger.String(),
|
Challenger: challenger.String(),
|
||||||
Challengee: challengee.String(),
|
Challengee: challengee.String(),
|
||||||
Height: 1,
|
Height: 1,
|
||||||
Description: description,
|
|
||||||
Success: true,
|
Success: true,
|
||||||
|
Finished: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Initiator is not set: invalid challenge",
|
"Initiator is not set: invalid challenge",
|
||||||
|
25
x/dao/keeper/query_get_challenge.go
Normal file
25
x/dao/keeper/query_get_challenge.go
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package keeper
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
"github.com/planetmint/planetmint-go/x/dao/types"
|
||||||
|
"google.golang.org/grpc/codes"
|
||||||
|
"google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (k Keeper) GetChallenge(goCtx context.Context, req *types.QueryGetChallengeRequest) (*types.QueryGetChallengeResponse, error) {
|
||||||
|
if req == nil {
|
||||||
|
return nil, status.Error(codes.InvalidArgument, "invalid request")
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
|
||||||
|
challenge, found := k.LookupChallenge(ctx, req.GetHeight())
|
||||||
|
if !found {
|
||||||
|
return nil, status.Error(codes.NotFound, "challenge not found")
|
||||||
|
}
|
||||||
|
|
||||||
|
return &types.QueryGetChallengeResponse{Challenge: &challenge}, nil
|
||||||
|
}
|
@ -35,6 +35,10 @@ const (
|
|||||||
// TODO: Determine the simulation weight value
|
// TODO: Determine the simulation weight value
|
||||||
defaultWeightMsgReissueRDDLResult int = 100
|
defaultWeightMsgReissueRDDLResult int = 100
|
||||||
|
|
||||||
|
opWeightMsgInitPop = "op_weight_msg_init_pop"
|
||||||
|
// TODO: Determine the simulation weight value
|
||||||
|
defaultWeightMsgInitPop int = 100
|
||||||
|
|
||||||
// this line is used by starport scaffolding # simapp/module/const
|
// this line is used by starport scaffolding # simapp/module/const
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -96,6 +100,17 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp
|
|||||||
daosimulation.SimulateMsgReissueRDDLResult(am.accountKeeper, am.bankKeeper, am.keeper),
|
daosimulation.SimulateMsgReissueRDDLResult(am.accountKeeper, am.bankKeeper, am.keeper),
|
||||||
))
|
))
|
||||||
|
|
||||||
|
var weightMsgInitPop int
|
||||||
|
simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgInitPop, &weightMsgInitPop, nil,
|
||||||
|
func(_ *rand.Rand) {
|
||||||
|
weightMsgInitPop = defaultWeightMsgInitPop
|
||||||
|
},
|
||||||
|
)
|
||||||
|
operations = append(operations, simulation.NewWeightedOperation(
|
||||||
|
weightMsgInitPop,
|
||||||
|
daosimulation.SimulateMsgInitPop(am.accountKeeper, am.bankKeeper, am.keeper),
|
||||||
|
))
|
||||||
|
|
||||||
// this line is used by starport scaffolding # simapp/module/operation
|
// this line is used by starport scaffolding # simapp/module/operation
|
||||||
|
|
||||||
return operations
|
return operations
|
||||||
@ -128,6 +143,14 @@ func (am AppModule) ProposalMsgs(_ module.SimulationState) []simtypes.WeightedPr
|
|||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
simulation.NewWeightedProposalMsg(
|
||||||
|
opWeightMsgInitPop,
|
||||||
|
defaultWeightMsgInitPop,
|
||||||
|
func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg {
|
||||||
|
daosimulation.SimulateMsgInitPop(am.accountKeeper, am.bankKeeper, am.keeper)
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
),
|
||||||
// this line is used by starport scaffolding # simapp/module/OpMsg
|
// this line is used by starport scaffolding # simapp/module/OpMsg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
29
x/dao/simulation/init_pop.go
Normal file
29
x/dao/simulation/init_pop.go
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package simulation
|
||||||
|
|
||||||
|
import (
|
||||||
|
"math/rand"
|
||||||
|
|
||||||
|
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
|
||||||
|
"github.com/planetmint/planetmint-go/x/dao/keeper"
|
||||||
|
"github.com/planetmint/planetmint-go/x/dao/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
func SimulateMsgInitPop(
|
||||||
|
_ types.AccountKeeper,
|
||||||
|
_ types.BankKeeper,
|
||||||
|
_ keeper.Keeper,
|
||||||
|
) simtypes.Operation {
|
||||||
|
return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
|
||||||
|
) (simtypes.OperationMsg, []simtypes.FutureOperation, error) {
|
||||||
|
simAccount, _ := simtypes.RandomAcc(r, accs)
|
||||||
|
msg := &types.MsgInitPop{
|
||||||
|
Creator: simAccount.Address.String(),
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Handling the InitPop simulation
|
||||||
|
|
||||||
|
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "InitPop simulation not implemented"), nil, nil
|
||||||
|
}
|
||||||
|
}
|
@ -26,9 +26,9 @@ type Challenge struct {
|
|||||||
Initiator string `protobuf:"bytes,1,opt,name=initiator,proto3" json:"initiator,omitempty"`
|
Initiator string `protobuf:"bytes,1,opt,name=initiator,proto3" json:"initiator,omitempty"`
|
||||||
Challenger string `protobuf:"bytes,2,opt,name=challenger,proto3" json:"challenger,omitempty"`
|
Challenger string `protobuf:"bytes,2,opt,name=challenger,proto3" json:"challenger,omitempty"`
|
||||||
Challengee string `protobuf:"bytes,3,opt,name=challengee,proto3" json:"challengee,omitempty"`
|
Challengee string `protobuf:"bytes,3,opt,name=challengee,proto3" json:"challengee,omitempty"`
|
||||||
Height uint64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"`
|
Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"`
|
||||||
Success bool `protobuf:"varint,5,opt,name=success,proto3" json:"success,omitempty"`
|
Success bool `protobuf:"varint,5,opt,name=success,proto3" json:"success,omitempty"`
|
||||||
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
|
Finished bool `protobuf:"varint,6,opt,name=finished,proto3" json:"finished,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Challenge) Reset() { *m = Challenge{} }
|
func (m *Challenge) Reset() { *m = Challenge{} }
|
||||||
@ -85,7 +85,7 @@ func (m *Challenge) GetChallengee() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Challenge) GetHeight() uint64 {
|
func (m *Challenge) GetHeight() int64 {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.Height
|
return m.Height
|
||||||
}
|
}
|
||||||
@ -99,11 +99,11 @@ func (m *Challenge) GetSuccess() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Challenge) GetDescription() string {
|
func (m *Challenge) GetFinished() bool {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.Description
|
return m.Finished
|
||||||
}
|
}
|
||||||
return ""
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -114,21 +114,21 @@ func init() { proto.RegisterFile("planetmintgo/dao/challenge.proto", fileDescrip
|
|||||||
|
|
||||||
var fileDescriptor_04a15978d0195742 = []byte{
|
var fileDescriptor_04a15978d0195742 = []byte{
|
||||||
// 236 bytes of a gzipped FileDescriptorProto
|
// 236 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xb1, 0x4e, 0xc4, 0x30,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0x31, 0x4e, 0xc3, 0x30,
|
||||||
0x10, 0x44, 0x63, 0x38, 0x02, 0x31, 0x0d, 0x72, 0x81, 0x5c, 0x20, 0xcb, 0xa2, 0x4a, 0x43, 0x5c,
|
0x14, 0x86, 0x63, 0x0a, 0xa1, 0xf1, 0x84, 0x3c, 0x20, 0x0b, 0x21, 0x2b, 0x62, 0xca, 0x42, 0x3c,
|
||||||
0xf0, 0x07, 0x50, 0xd1, 0xa6, 0xa4, 0xf3, 0x39, 0x2b, 0xc7, 0x52, 0xce, 0x1b, 0xc5, 0x7b, 0x12,
|
0x70, 0x03, 0x98, 0x58, 0x33, 0xb2, 0xb9, 0xc9, 0xc3, 0xb6, 0x94, 0xfa, 0x45, 0xf1, 0xab, 0x04,
|
||||||
0xfc, 0x05, 0x3f, 0x44, 0x4f, 0x79, 0x25, 0x25, 0x4a, 0x7e, 0x04, 0x29, 0xe2, 0x48, 0xa0, 0xdb,
|
0xb7, 0xe0, 0x36, 0x5c, 0x81, 0xb1, 0x23, 0x23, 0x4a, 0x2e, 0x82, 0x14, 0xd1, 0x26, 0x74, 0xf3,
|
||||||
0x99, 0x37, 0x1a, 0x69, 0x87, 0xeb, 0xbe, 0xb3, 0x11, 0x68, 0x17, 0x22, 0x79, 0x34, 0x8d, 0x45,
|
0xf7, 0x7f, 0xbf, 0x2c, 0xbd, 0x9f, 0xe7, 0x5d, 0x6b, 0x02, 0xd0, 0xd6, 0x07, 0xb2, 0xa8, 0x1b,
|
||||||
0xe3, 0x5a, 0xdb, 0x75, 0x10, 0x3d, 0x54, 0xfd, 0x80, 0x84, 0xe2, 0x6a, 0x9d, 0xa8, 0x1a, 0x8b,
|
0x83, 0xba, 0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x54, 0xec, 0x30, 0x2a, 0xf6, 0x35, 0x2a, 0xf6, 0x36, 0xa9, 0xec, 0x30, 0xa9,
|
0xe7, 0xaf, 0x41, 0xb1, 0xfd, 0xa0, 0xd8, 0xcf, 0xa0, 0xd8, 0xc7, 0xa8, 0x92, 0xfd, 0xa8, 0x92,
|
||||||
0xec, 0x73, 0x52, 0xd9, 0xb3, 0xf1, 0x81, 0xda, 0xfd, 0xb6, 0x72, 0xb8, 0x33, 0xcb, 0xdb, 0xab,
|
0xef, 0x51, 0x25, 0x2f, 0xda, 0x7a, 0x72, 0xbb, 0x4d, 0x59, 0xe3, 0x56, 0xcf, 0x07, 0x2f, 0x9e,
|
||||||
0xf3, 0xce, 0xa3, 0x79, 0x99, 0x67, 0xa2, 0xd7, 0x1e, 0xd2, 0x36, 0x9f, 0x37, 0xba, 0xff, 0x0e,
|
0xf7, 0x16, 0xf5, 0xdb, 0x34, 0x10, 0xbd, 0x77, 0x10, 0x37, 0xe9, 0xb4, 0xce, 0xc3, 0x6f, 0x00,
|
||||||
0x00, 0x00, 0xff, 0xff, 0x46, 0x26, 0x54, 0x4c, 0x47, 0x01, 0x00, 0x00,
|
0x00, 0x00, 0xff, 0xff, 0xf5, 0xc0, 0x8a, 0x73, 0x41, 0x01, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Challenge) Marshal() (dAtA []byte, err error) {
|
func (m *Challenge) Marshal() (dAtA []byte, err error) {
|
||||||
@ -151,12 +151,15 @@ func (m *Challenge) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if len(m.Description) > 0 {
|
if m.Finished {
|
||||||
i -= len(m.Description)
|
|
||||||
copy(dAtA[i:], m.Description)
|
|
||||||
i = encodeVarintChallenge(dAtA, i, uint64(len(m.Description)))
|
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x32
|
if m.Finished {
|
||||||
|
dAtA[i] = 1
|
||||||
|
} else {
|
||||||
|
dAtA[i] = 0
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x30
|
||||||
}
|
}
|
||||||
if m.Success {
|
if m.Success {
|
||||||
i--
|
i--
|
||||||
@ -232,9 +235,8 @@ func (m *Challenge) Size() (n int) {
|
|||||||
if m.Success {
|
if m.Success {
|
||||||
n += 2
|
n += 2
|
||||||
}
|
}
|
||||||
l = len(m.Description)
|
if m.Finished {
|
||||||
if l > 0 {
|
n += 2
|
||||||
n += 1 + l + sovChallenge(uint64(l))
|
|
||||||
}
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
@ -384,7 +386,7 @@ func (m *Challenge) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Height |= uint64(b&0x7F) << shift
|
m.Height |= int64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -410,10 +412,10 @@ func (m *Challenge) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
m.Success = bool(v != 0)
|
m.Success = bool(v != 0)
|
||||||
case 6:
|
case 6:
|
||||||
if wireType != 2 {
|
if wireType != 0 {
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field Finished", wireType)
|
||||||
}
|
}
|
||||||
var stringLen uint64
|
var v int
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowChallenge
|
return ErrIntOverflowChallenge
|
||||||
@ -423,24 +425,12 @@ func (m *Challenge) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
stringLen |= uint64(b&0x7F) << shift
|
v |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
intStringLen := int(stringLen)
|
m.Finished = bool(v != 0)
|
||||||
if intStringLen < 0 {
|
|
||||||
return ErrInvalidLengthChallenge
|
|
||||||
}
|
|
||||||
postIndex := iNdEx + intStringLen
|
|
||||||
if postIndex < 0 {
|
|
||||||
return ErrInvalidLengthChallenge
|
|
||||||
}
|
|
||||||
if postIndex > l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
m.Description = string(dAtA[iNdEx:postIndex])
|
|
||||||
iNdEx = postIndex
|
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipChallenge(dAtA[iNdEx:])
|
skippy, err := skipChallenge(dAtA[iNdEx:])
|
||||||
|
@ -15,6 +15,7 @@ func RegisterCodec(cdc *codec.LegacyAmino) {
|
|||||||
cdc.RegisterConcrete(&MsgDistributionResult{}, "dao/DistributionResult", nil)
|
cdc.RegisterConcrete(&MsgDistributionResult{}, "dao/DistributionResult", nil)
|
||||||
cdc.RegisterConcrete(&MsgDistributionRequest{}, "dao/DistributionRequest", nil)
|
cdc.RegisterConcrete(&MsgDistributionRequest{}, "dao/DistributionRequest", nil)
|
||||||
cdc.RegisterConcrete(&MsgUpdateParams{}, "dao/UpdateParams", nil)
|
cdc.RegisterConcrete(&MsgUpdateParams{}, "dao/UpdateParams", nil)
|
||||||
|
cdc.RegisterConcrete(&MsgInitPop{}, "dao/InitPop", nil)
|
||||||
// this line is used by starport scaffolding # 2
|
// this line is used by starport scaffolding # 2
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,6 +33,9 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
|
|||||||
&MsgDistributionRequest{},
|
&MsgDistributionRequest{},
|
||||||
&MsgUpdateParams{},
|
&MsgUpdateParams{},
|
||||||
)
|
)
|
||||||
|
registry.RegisterImplementations((*sdk.Msg)(nil),
|
||||||
|
&MsgInitPop{},
|
||||||
|
)
|
||||||
// this line is used by starport scaffolding # 3
|
// this line is used by starport scaffolding # 3
|
||||||
|
|
||||||
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
|
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
|
||||||
|
50
x/dao/types/message_init_pop.go
Normal file
50
x/dao/types/message_init_pop.go
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
package types
|
||||||
|
|
||||||
|
import (
|
||||||
|
errorsmod "cosmossdk.io/errors"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
|
)
|
||||||
|
|
||||||
|
const TypeMsgInitPop = "init_pop"
|
||||||
|
|
||||||
|
var _ sdk.Msg = &MsgInitPop{}
|
||||||
|
|
||||||
|
func NewMsgInitPop(creator string, initiator string, challenger string, challengee string, height int64) *MsgInitPop {
|
||||||
|
return &MsgInitPop{
|
||||||
|
Creator: creator,
|
||||||
|
Initiator: initiator,
|
||||||
|
Challenger: challenger,
|
||||||
|
Challengee: challengee,
|
||||||
|
Height: height,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msg *MsgInitPop) Route() string {
|
||||||
|
return RouterKey
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msg *MsgInitPop) Type() string {
|
||||||
|
return TypeMsgInitPop
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msg *MsgInitPop) GetSigners() []sdk.AccAddress {
|
||||||
|
creator, err := sdk.AccAddressFromBech32(msg.Creator)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return []sdk.AccAddress{creator}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msg *MsgInitPop) GetSignBytes() []byte {
|
||||||
|
bz := ModuleCdc.MustMarshalJSON(msg)
|
||||||
|
return sdk.MustSortJSON(bz)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (msg *MsgInitPop) ValidateBasic() error {
|
||||||
|
_, err := sdk.AccAddressFromBech32(msg.Creator)
|
||||||
|
if err != nil {
|
||||||
|
return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
37
x/dao/types/message_init_pop_test.go
Normal file
37
x/dao/types/message_init_pop_test.go
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
package types
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestMsgInitPop_ValidateBasic(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
msg MsgInitPop
|
||||||
|
err error
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "invalid address",
|
||||||
|
msg: MsgInitPop{
|
||||||
|
Creator: "invalid_address",
|
||||||
|
},
|
||||||
|
err: sdkerrors.ErrInvalidAddress,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
for _, tt := range tests {
|
||||||
|
tt := tt
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
err := tt.msg.ValidateBasic()
|
||||||
|
if tt.err != nil {
|
||||||
|
require.ErrorIs(t, err, tt.err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
require.NoError(t, err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
@ -473,6 +473,94 @@ func (m *QueryGetReissuancesResponse) GetPagination() *query.PageResponse {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type QueryGetChallengeRequest struct {
|
||||||
|
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetChallengeRequest) Reset() { *m = QueryGetChallengeRequest{} }
|
||||||
|
func (m *QueryGetChallengeRequest) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*QueryGetChallengeRequest) ProtoMessage() {}
|
||||||
|
func (*QueryGetChallengeRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_07bad0eeb5b27724, []int{10}
|
||||||
|
}
|
||||||
|
func (m *QueryGetChallengeRequest) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *QueryGetChallengeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_QueryGetChallengeRequest.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *QueryGetChallengeRequest) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_QueryGetChallengeRequest.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *QueryGetChallengeRequest) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *QueryGetChallengeRequest) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_QueryGetChallengeRequest.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_QueryGetChallengeRequest proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *QueryGetChallengeRequest) GetHeight() int64 {
|
||||||
|
if m != nil {
|
||||||
|
return m.Height
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type QueryGetChallengeResponse struct {
|
||||||
|
Challenge *Challenge `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetChallengeResponse) Reset() { *m = QueryGetChallengeResponse{} }
|
||||||
|
func (m *QueryGetChallengeResponse) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*QueryGetChallengeResponse) ProtoMessage() {}
|
||||||
|
func (*QueryGetChallengeResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_07bad0eeb5b27724, []int{11}
|
||||||
|
}
|
||||||
|
func (m *QueryGetChallengeResponse) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *QueryGetChallengeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_QueryGetChallengeResponse.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *QueryGetChallengeResponse) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_QueryGetChallengeResponse.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *QueryGetChallengeResponse) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *QueryGetChallengeResponse) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_QueryGetChallengeResponse.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_QueryGetChallengeResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *QueryGetChallengeResponse) GetChallenge() *Challenge {
|
||||||
|
if m != nil {
|
||||||
|
return m.Challenge
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*QueryParamsRequest)(nil), "planetmintgo.dao.QueryParamsRequest")
|
proto.RegisterType((*QueryParamsRequest)(nil), "planetmintgo.dao.QueryParamsRequest")
|
||||||
proto.RegisterType((*QueryParamsResponse)(nil), "planetmintgo.dao.QueryParamsResponse")
|
proto.RegisterType((*QueryParamsResponse)(nil), "planetmintgo.dao.QueryParamsResponse")
|
||||||
@ -484,55 +572,63 @@ func init() {
|
|||||||
proto.RegisterType((*QueryGetReissuanceResponse)(nil), "planetmintgo.dao.QueryGetReissuanceResponse")
|
proto.RegisterType((*QueryGetReissuanceResponse)(nil), "planetmintgo.dao.QueryGetReissuanceResponse")
|
||||||
proto.RegisterType((*QueryGetReissuancesRequest)(nil), "planetmintgo.dao.QueryGetReissuancesRequest")
|
proto.RegisterType((*QueryGetReissuancesRequest)(nil), "planetmintgo.dao.QueryGetReissuancesRequest")
|
||||||
proto.RegisterType((*QueryGetReissuancesResponse)(nil), "planetmintgo.dao.QueryGetReissuancesResponse")
|
proto.RegisterType((*QueryGetReissuancesResponse)(nil), "planetmintgo.dao.QueryGetReissuancesResponse")
|
||||||
|
proto.RegisterType((*QueryGetChallengeRequest)(nil), "planetmintgo.dao.QueryGetChallengeRequest")
|
||||||
|
proto.RegisterType((*QueryGetChallengeResponse)(nil), "planetmintgo.dao.QueryGetChallengeResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { proto.RegisterFile("planetmintgo/dao/query.proto", fileDescriptor_07bad0eeb5b27724) }
|
func init() { proto.RegisterFile("planetmintgo/dao/query.proto", fileDescriptor_07bad0eeb5b27724) }
|
||||||
|
|
||||||
var fileDescriptor_07bad0eeb5b27724 = []byte{
|
var fileDescriptor_07bad0eeb5b27724 = []byte{
|
||||||
// 688 bytes of a gzipped FileDescriptorProto
|
// 780 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x41, 0x4f, 0x13, 0x4f,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcd, 0x4e, 0xdb, 0x4a,
|
||||||
0x18, 0xc6, 0xbb, 0xfc, 0xf9, 0xd7, 0xf8, 0xa2, 0xc6, 0x8c, 0x60, 0x6a, 0x85, 0x05, 0x46, 0x14,
|
0x14, 0xc7, 0x63, 0x2e, 0x37, 0x88, 0x81, 0x7b, 0x75, 0x35, 0x17, 0x50, 0x1a, 0xc0, 0x80, 0x4b,
|
||||||
0xa3, 0xb0, 0x23, 0x85, 0xa8, 0x31, 0x12, 0x63, 0x0f, 0x82, 0x07, 0x12, 0xdc, 0x23, 0x97, 0x66,
|
0x4b, 0xc5, 0x87, 0x5d, 0x42, 0x44, 0x3f, 0x04, 0xaa, 0x9a, 0x4a, 0x85, 0x2e, 0x90, 0xa8, 0x17,
|
||||||
0xda, 0x4e, 0xb6, 0x1b, 0xe9, 0xce, 0xd2, 0xd9, 0x1a, 0x1b, 0xc2, 0xc5, 0x4f, 0x60, 0x62, 0xe2,
|
0x5d, 0xb0, 0x89, 0x26, 0xc9, 0xc8, 0xb6, 0x9a, 0x78, 0x42, 0xc6, 0xa9, 0x1a, 0x45, 0xd9, 0xf4,
|
||||||
0xd9, 0x83, 0x9f, 0xc2, 0x18, 0xcf, 0x1c, 0x49, 0xbc, 0x78, 0x32, 0x06, 0xfc, 0x20, 0xa6, 0x33,
|
0x09, 0x2a, 0x55, 0xea, 0xba, 0x8b, 0xf6, 0x2d, 0xaa, 0xae, 0x59, 0x22, 0x75, 0xd3, 0x55, 0x55,
|
||||||
0xb3, 0x74, 0x96, 0xdd, 0x2e, 0x35, 0xf1, 0x42, 0x66, 0x77, 0x9e, 0xe7, 0x7d, 0x7f, 0xfb, 0x32,
|
0x85, 0x3e, 0x48, 0x95, 0xf1, 0x71, 0x3c, 0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 0x65, 0x57, 0x55, 0x7e, 0x74, 0x55, 0xe5, 0xed, 0x95, 0x9a, 0xba, 0xbc,
|
||||||
|
0x52, 0x53, 0xdf, 0xae, 0xd4, 0xd4, 0x99, 0x61, 0x39, 0x9e, 0xdd, 0x2c, 0xe9, 0x65, 0x56, 0x1b,
|
||||||
|
0x9d, 0xf9, 0xb5, 0xc8, 0xed, 0xb5, 0xea, 0x94, 0x97, 0xd2, 0xe2, 0x1f, 0x83, 0xbd, 0x5f, 0x01,
|
||||||
|
0x00, 0x00, 0xff, 0xff, 0x46, 0xfb, 0x24, 0x20, 0x59, 0x09, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -557,6 +653,8 @@ type QueryClient interface {
|
|||||||
GetReissuance(ctx context.Context, in *QueryGetReissuanceRequest, opts ...grpc.CallOption) (*QueryGetReissuanceResponse, error)
|
GetReissuance(ctx context.Context, in *QueryGetReissuanceRequest, opts ...grpc.CallOption) (*QueryGetReissuanceResponse, error)
|
||||||
// Queries a list of GetReissuances items.
|
// Queries a list of GetReissuances items.
|
||||||
GetReissuances(ctx context.Context, in *QueryGetReissuancesRequest, opts ...grpc.CallOption) (*QueryGetReissuancesResponse, error)
|
GetReissuances(ctx context.Context, in *QueryGetReissuancesRequest, opts ...grpc.CallOption) (*QueryGetReissuancesResponse, error)
|
||||||
|
// Queries a list of GetChallenge items.
|
||||||
|
GetChallenge(ctx context.Context, in *QueryGetChallengeRequest, opts ...grpc.CallOption) (*QueryGetChallengeResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type queryClient struct {
|
type queryClient struct {
|
||||||
@ -612,6 +710,15 @@ func (c *queryClient) GetReissuances(ctx context.Context, in *QueryGetReissuance
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) GetChallenge(ctx context.Context, in *QueryGetChallengeRequest, opts ...grpc.CallOption) (*QueryGetChallengeResponse, error) {
|
||||||
|
out := new(QueryGetChallengeResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/planetmintgo.dao.Query/GetChallenge", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// QueryServer is the server API for Query service.
|
// QueryServer is the server API for Query service.
|
||||||
type QueryServer interface {
|
type QueryServer interface {
|
||||||
// Parameters queries the parameters of the module.
|
// Parameters queries the parameters of the module.
|
||||||
@ -624,6 +731,8 @@ type QueryServer interface {
|
|||||||
GetReissuance(context.Context, *QueryGetReissuanceRequest) (*QueryGetReissuanceResponse, error)
|
GetReissuance(context.Context, *QueryGetReissuanceRequest) (*QueryGetReissuanceResponse, error)
|
||||||
// Queries a list of GetReissuances items.
|
// Queries a list of GetReissuances items.
|
||||||
GetReissuances(context.Context, *QueryGetReissuancesRequest) (*QueryGetReissuancesResponse, error)
|
GetReissuances(context.Context, *QueryGetReissuancesRequest) (*QueryGetReissuancesResponse, error)
|
||||||
|
// Queries a list of GetChallenge items.
|
||||||
|
GetChallenge(context.Context, *QueryGetChallengeRequest) (*QueryGetChallengeResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
||||||
@ -645,6 +754,9 @@ func (*UnimplementedQueryServer) GetReissuance(ctx context.Context, req *QueryGe
|
|||||||
func (*UnimplementedQueryServer) GetReissuances(ctx context.Context, req *QueryGetReissuancesRequest) (*QueryGetReissuancesResponse, error) {
|
func (*UnimplementedQueryServer) GetReissuances(ctx context.Context, req *QueryGetReissuancesRequest) (*QueryGetReissuancesResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetReissuances not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetReissuances not implemented")
|
||||||
}
|
}
|
||||||
|
func (*UnimplementedQueryServer) GetChallenge(ctx context.Context, req *QueryGetChallengeRequest) (*QueryGetChallengeResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetChallenge not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
||||||
s.RegisterService(&_Query_serviceDesc, srv)
|
s.RegisterService(&_Query_serviceDesc, srv)
|
||||||
@ -740,6 +852,24 @@ func _Query_GetReissuances_Handler(srv interface{}, ctx context.Context, dec fun
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Query_GetChallenge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryGetChallengeRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).GetChallenge(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/planetmintgo.dao.Query/GetChallenge",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).GetChallenge(ctx, req.(*QueryGetChallengeRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
var _Query_serviceDesc = grpc.ServiceDesc{
|
var _Query_serviceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "planetmintgo.dao.Query",
|
ServiceName: "planetmintgo.dao.Query",
|
||||||
HandlerType: (*QueryServer)(nil),
|
HandlerType: (*QueryServer)(nil),
|
||||||
@ -764,6 +894,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "GetReissuances",
|
MethodName: "GetReissuances",
|
||||||
Handler: _Query_GetReissuances_Handler,
|
Handler: _Query_GetReissuances_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetChallenge",
|
||||||
|
Handler: _Query_GetChallenge_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "planetmintgo/dao/query.proto",
|
Metadata: "planetmintgo/dao/query.proto",
|
||||||
@ -1100,6 +1234,69 @@ func (m *QueryGetReissuancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, er
|
|||||||
return len(dAtA) - i, nil
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetChallengeRequest) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetChallengeRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetChallengeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Height != 0 {
|
||||||
|
i = encodeVarintQuery(dAtA, i, uint64(m.Height))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x8
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetChallengeResponse) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetChallengeResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetChallengeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Challenge != nil {
|
||||||
|
{
|
||||||
|
size, err := m.Challenge.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
||||||
offset -= sovQuery(v)
|
offset -= sovQuery(v)
|
||||||
base := offset
|
base := offset
|
||||||
@ -1238,6 +1435,31 @@ func (m *QueryGetReissuancesResponse) Size() (n int) {
|
|||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetChallengeRequest) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Height != 0 {
|
||||||
|
n += 1 + sovQuery(uint64(m.Height))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetChallengeResponse) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Challenge != nil {
|
||||||
|
l = m.Challenge.Size()
|
||||||
|
n += 1 + l + sovQuery(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
func sovQuery(x uint64) (n int) {
|
func sovQuery(x uint64) (n int) {
|
||||||
return (math_bits.Len64(x|1) + 6) / 7
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
}
|
}
|
||||||
@ -2076,6 +2298,161 @@ func (m *QueryGetReissuancesResponse) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (m *QueryGetChallengeRequest) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: QueryGetChallengeRequest: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: QueryGetChallengeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
|
||||||
|
}
|
||||||
|
m.Height = 0
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
m.Height |= int64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *QueryGetChallengeResponse) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: QueryGetChallengeResponse: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: QueryGetChallengeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Challenge", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if m.Challenge == nil {
|
||||||
|
m.Challenge = &Challenge{}
|
||||||
|
}
|
||||||
|
if err := m.Challenge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func skipQuery(dAtA []byte) (n int, err error) {
|
func skipQuery(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
@ -249,6 +249,60 @@ func local_request_Query_GetReissuances_0(ctx context.Context, marshaler runtime
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func request_Query_GetChallenge_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryGetChallengeRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["height"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "height")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Height, err = runtime.Int64(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "height", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.GetChallenge(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Query_GetChallenge_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryGetChallengeRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["height"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "height")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Height, err = runtime.Int64(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "height", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.GetChallenge(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
||||||
// UnaryRPC :call QueryServer directly.
|
// UnaryRPC :call QueryServer directly.
|
||||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||||
@ -370,6 +424,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_GetChallenge_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Query_GetChallenge_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Query_GetChallenge_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -511,6 +588,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_GetChallenge_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Query_GetChallenge_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Query_GetChallenge_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -524,6 +621,8 @@ var (
|
|||||||
pattern_Query_GetReissuance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"planetmint", "dao", "get_reissuance", "blockHeight"}, "", runtime.AssumeColonVerbOpt(true)))
|
pattern_Query_GetReissuance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"planetmint", "dao", "get_reissuance", "blockHeight"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
|
|
||||||
pattern_Query_GetReissuances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"planetmint", "dao", "get_reissuances"}, "", runtime.AssumeColonVerbOpt(true)))
|
pattern_Query_GetReissuances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"planetmint", "dao", "get_reissuances"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
|
|
||||||
|
pattern_Query_GetChallenge_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"planetmint", "planetmint-go", "dao", "get_challenge", "height"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -536,4 +635,6 @@ var (
|
|||||||
forward_Query_GetReissuance_0 = runtime.ForwardResponseMessage
|
forward_Query_GetReissuance_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
forward_Query_GetReissuances_0 = runtime.ForwardResponseMessage
|
forward_Query_GetReissuances_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
forward_Query_GetChallenge_0 = runtime.ForwardResponseMessage
|
||||||
)
|
)
|
||||||
|
@ -618,8 +618,6 @@ var xxx_messageInfo_MsgDistributionRequestResponse proto.InternalMessageInfo
|
|||||||
type MsgUpdateParams struct {
|
type MsgUpdateParams struct {
|
||||||
// authority is the address that controls the module (defaults to x/gov unless overwritten).
|
// authority is the address that controls the module (defaults to x/gov unless overwritten).
|
||||||
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
|
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
|
||||||
// params defines the x/dao parameters to update.
|
|
||||||
//
|
|
||||||
// NOTE: All parameters must be supplied.
|
// NOTE: All parameters must be supplied.
|
||||||
Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
|
Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
|
||||||
}
|
}
|
||||||
@ -707,6 +705,118 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() {
|
|||||||
|
|
||||||
var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo
|
var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
|
type MsgInitPop struct {
|
||||||
|
Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
|
||||||
|
Initiator string `protobuf:"bytes,2,opt,name=initiator,proto3" json:"initiator,omitempty"`
|
||||||
|
Challenger string `protobuf:"bytes,3,opt,name=challenger,proto3" json:"challenger,omitempty"`
|
||||||
|
Challengee string `protobuf:"bytes,4,opt,name=challengee,proto3" json:"challengee,omitempty"`
|
||||||
|
Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPop) Reset() { *m = MsgInitPop{} }
|
||||||
|
func (m *MsgInitPop) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*MsgInitPop) ProtoMessage() {}
|
||||||
|
func (*MsgInitPop) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_7117c47dbc1828c7, []int{14}
|
||||||
|
}
|
||||||
|
func (m *MsgInitPop) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *MsgInitPop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_MsgInitPop.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *MsgInitPop) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_MsgInitPop.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *MsgInitPop) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *MsgInitPop) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_MsgInitPop.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_MsgInitPop proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *MsgInitPop) GetCreator() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Creator
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPop) GetInitiator() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Initiator
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPop) GetChallenger() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Challenger
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPop) GetChallengee() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Challengee
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPop) GetHeight() int64 {
|
||||||
|
if m != nil {
|
||||||
|
return m.Height
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type MsgInitPopResponse struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPopResponse) Reset() { *m = MsgInitPopResponse{} }
|
||||||
|
func (m *MsgInitPopResponse) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*MsgInitPopResponse) ProtoMessage() {}
|
||||||
|
func (*MsgInitPopResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_7117c47dbc1828c7, []int{15}
|
||||||
|
}
|
||||||
|
func (m *MsgInitPopResponse) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *MsgInitPopResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_MsgInitPopResponse.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *MsgInitPopResponse) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_MsgInitPopResponse.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *MsgInitPopResponse) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *MsgInitPopResponse) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_MsgInitPopResponse.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_MsgInitPopResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*MsgReportPopResult)(nil), "planetmintgo.dao.MsgReportPopResult")
|
proto.RegisterType((*MsgReportPopResult)(nil), "planetmintgo.dao.MsgReportPopResult")
|
||||||
proto.RegisterType((*MsgReportPopResultResponse)(nil), "planetmintgo.dao.MsgReportPopResultResponse")
|
proto.RegisterType((*MsgReportPopResultResponse)(nil), "planetmintgo.dao.MsgReportPopResultResponse")
|
||||||
@ -722,62 +832,68 @@ func init() {
|
|||||||
proto.RegisterType((*MsgDistributionRequestResponse)(nil), "planetmintgo.dao.MsgDistributionRequestResponse")
|
proto.RegisterType((*MsgDistributionRequestResponse)(nil), "planetmintgo.dao.MsgDistributionRequestResponse")
|
||||||
proto.RegisterType((*MsgUpdateParams)(nil), "planetmintgo.dao.MsgUpdateParams")
|
proto.RegisterType((*MsgUpdateParams)(nil), "planetmintgo.dao.MsgUpdateParams")
|
||||||
proto.RegisterType((*MsgUpdateParamsResponse)(nil), "planetmintgo.dao.MsgUpdateParamsResponse")
|
proto.RegisterType((*MsgUpdateParamsResponse)(nil), "planetmintgo.dao.MsgUpdateParamsResponse")
|
||||||
|
proto.RegisterType((*MsgInitPop)(nil), "planetmintgo.dao.MsgInitPop")
|
||||||
|
proto.RegisterType((*MsgInitPopResponse)(nil), "planetmintgo.dao.MsgInitPopResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { proto.RegisterFile("planetmintgo/dao/tx.proto", fileDescriptor_7117c47dbc1828c7) }
|
func init() { proto.RegisterFile("planetmintgo/dao/tx.proto", fileDescriptor_7117c47dbc1828c7) }
|
||||||
|
|
||||||
var fileDescriptor_7117c47dbc1828c7 = []byte{
|
var fileDescriptor_7117c47dbc1828c7 = []byte{
|
||||||
// 787 bytes of a gzipped FileDescriptorProto
|
// 864 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4f, 0x4f, 0xdb, 0x4a,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,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21, 0xd6, 0x74, 0x3d, 0xe6, 0x60, 0xc3,
|
0xdf, 0x7b, 0xef, 0xe7, 0x37, 0x6f, 0x9e, 0x0d, 0xbb, 0xd1, 0xc4, 0x0b, 0xb1, 0x98, 0x92, 0x50,
|
||||||
0xb6, 0xb0, 0xc1, 0xda, 0x25, 0x9f, 0x60, 0x86, 0xe5, 0xbf, 0xe3, 0x50, 0xc9, 0xb6, 0xb0, 0x5a,
|
0x04, 0xd4, 0xf6, 0x3d, 0x6a, 0x8b, 0x79, 0x3f, 0x62, 0x54, 0x50, 0xf4, 0x76, 0x11, 0xea, 0xfb,
|
||||||
0x48, 0x90, 0x6b, 0x75, 0xab, 0xd1, 0x40, 0x9e, 0x83, 0x42, 0x1f, 0x75, 0x3d, 0xc1, 0x08, 0x96,
|
0x1e, 0x35, 0xba, 0x25, 0xf2, 0x68, 0xec, 0x4d, 0x26, 0x38, 0x0c, 0x70, 0x12, 0x63, 0x3c, 0x2c,
|
||||||
0x47, 0x04, 0x9d, 0xb4, 0x10, 0x65, 0x82, 0xb4, 0x99, 0x20, 0xd9, 0x2e, 0x65, 0xc4, 0xad, 0xb6,
|
0x31, 0xe2, 0xe3, 0x11, 0xc3, 0x27, 0x33, 0xcc, 0x85, 0x22, 0x3d, 0x29, 0x91, 0x7c, 0xc2, 0x05,
|
||||||
0x98, 0x8b, 0xbd, 0x23, 0x4c, 0x6c, 0x44, 0x04, 0x75, 0x35, 0x41, 0xf5, 0x2d, 0x62, 0x35, 0xa9,
|
0x23, 0xc3, 0x99, 0x20, 0x34, 0x3c, 0xa2, 0xcc, 0xc7, 0x4c, 0x51, 0xf7, 0x4a, 0xd4, 0xc8, 0x63,
|
||||||
0x80, 0xe7, 0xac, 0xa6, 0xeb, 0x61, 0x83, 0xff, 0x8a, 0xad, 0x05, 0x07, 0x3b, 0x98, 0x2f, 0x8d,
|
0xde, 0x94, 0x2b, 0xf8, 0xae, 0x37, 0x25, 0x21, 0xb5, 0xe5, 0x5f, 0xe5, 0x6a, 0x07, 0x34, 0xa0,
|
||||||
0x60, 0x25, 0x76, 0x97, 0x6b, 0x98, 0x36, 0x31, 0x3d, 0x0a, 0x81, 0xd0, 0x10, 0xd0, 0x52, 0x68,
|
0xf2, 0x68, 0xc7, 0x27, 0xe5, 0xdd, 0x1d, 0x51, 0x3e, 0xa5, 0xfc, 0x28, 0x01, 0x12, 0x43, 0x41,
|
||||||
0x19, 0x4d, 0xea, 0x18, 0xa7, 0x0f, 0x83, 0xbf, 0x10, 0xd0, 0x5d, 0x90, 0x2b, 0xd4, 0x31, 0x91,
|
0xf7, 0x13, 0xcb, 0x9e, 0xf2, 0xc0, 0x7e, 0xf5, 0x51, 0xfc, 0x2f, 0x01, 0x2c, 0x02, 0xc8, 0xe1,
|
||||||
0x8f, 0x09, 0xdb, 0xc7, 0xbe, 0x89, 0x68, 0xab, 0xc1, 0x64, 0x05, 0xa6, 0x6a, 0x04, 0x59, 0x0c,
|
0x81, 0x8b, 0x23, 0xca, 0xc4, 0x21, 0x8d, 0x5c, 0xcc, 0x67, 0x13, 0x81, 0x74, 0xd8, 0x1a, 0x31,
|
||||||
0x13, 0x45, 0x2a, 0x48, 0xc5, 0x9c, 0xd9, 0x35, 0xe5, 0x27, 0x90, 0x8b, 0xca, 0xa1, 0x8c, 0x15,
|
0xec, 0x09, 0xca, 0x74, 0xad, 0xab, 0xf5, 0x9a, 0x6e, 0x6a, 0xa2, 0x4f, 0xa1, 0x99, 0xb5, 0x43,
|
||||||
0xa4, 0xe2, 0xf4, 0xce, 0xbf, 0xa5, 0xdb, 0x35, 0x2c, 0xbd, 0xec, 0x52, 0xcc, 0x1e, 0x5b, 0x5f,
|
0xdf, 0xe8, 0x6a, 0xbd, 0xed, 0xe7, 0xef, 0xf6, 0xaf, 0xf7, 0xb0, 0xff, 0x55, 0x4a, 0x71, 0x73,
|
||||||
0x01, 0x35, 0x99, 0xca, 0x44, 0xd4, 0xc7, 0x1e, 0x45, 0xfa, 0x27, 0x09, 0x16, 0x39, 0xec, 0x52,
|
0xb6, 0xd5, 0x01, 0xa3, 0x5c, 0xca, 0xc5, 0x3c, 0xa2, 0x21, 0xc7, 0xd6, 0xcf, 0x1a, 0xec, 0x48,
|
||||||
0xda, 0x42, 0x66, 0xb9, 0xfc, 0x66, 0x9f, 0x60, 0x1f, 0x53, 0xab, 0x31, 0x40, 0x8d, 0x0a, 0x7f,
|
0x98, 0x70, 0x3e, 0xc3, 0xee, 0x60, 0xf0, 0xed, 0x21, 0xa3, 0x11, 0xe5, 0xde, 0x64, 0x89, 0x1a,
|
||||||
0xf9, 0x9c, 0x85, 0x08, 0x17, 0x93, 0x33, 0x23, 0x5b, 0x9e, 0x81, 0x31, 0xd6, 0x56, 0xb2, 0x7c,
|
0x03, 0xde, 0x8a, 0x24, 0x0b, 0x33, 0x29, 0xa6, 0xe9, 0x66, 0x36, 0xba, 0x0d, 0x1b, 0x62, 0xae,
|
||||||
0x77, 0x8c, 0xb5, 0xe5, 0x02, 0x4c, 0x57, 0x1b, 0xb8, 0x76, 0xfc, 0x1a, 0xb9, 0x4e, 0x9d, 0x29,
|
0xd7, 0xa5, 0x77, 0x43, 0xcc, 0x51, 0x17, 0xb6, 0x87, 0x13, 0x3a, 0x3a, 0xfe, 0x06, 0x93, 0x60,
|
||||||
0xe3, 0x05, 0xa9, 0x98, 0x35, 0xe3, 0x5b, 0x7a, 0x01, 0xb4, 0x74, 0x05, 0x91, 0x48, 0x17, 0xf2,
|
0x2c, 0xf4, 0xcd, 0xae, 0xd6, 0xab, 0xbb, 0x45, 0x97, 0xd5, 0x05, 0xb3, 0x5a, 0x41, 0x26, 0x92,
|
||||||
0x15, 0xea, 0x54, 0x5c, 0x8f, 0x1d, 0xe2, 0x63, 0xe4, 0x0d, 0x50, 0xf6, 0x1c, 0xa6, 0x83, 0x7a,
|
0x40, 0xcb, 0xe1, 0x81, 0x43, 0x42, 0xf1, 0x92, 0x1e, 0xe3, 0x70, 0x89, 0xb2, 0x2f, 0x60, 0x3b,
|
||||||
0x98, 0x61, 0x4f, 0x88, 0x4a, 0xad, 0x26, 0x2b, 0x55, 0xe9, 0x91, 0xcc, 0xb8, 0x87, 0xbe, 0x08,
|
0xee, 0x87, 0x9b, 0xcc, 0x84, 0xea, 0xd4, 0x5e, 0xb9, 0x53, 0x4e, 0x4e, 0x72, 0x8b, 0x11, 0xd6,
|
||||||
0x0b, 0xf1, 0x54, 0x91, 0x84, 0x73, 0x89, 0x03, 0x31, 0x95, 0x43, 0xcf, 0x6c, 0x50, 0x95, 0x64,
|
0x0e, 0xb4, 0x8b, 0xa5, 0x32, 0x09, 0x6f, 0x34, 0x09, 0x14, 0x54, 0xae, 0xbc, 0xb3, 0x65, 0x5d,
|
||||||
0x18, 0x67, 0xed, 0xbd, 0xb2, 0xa8, 0x13, 0x5f, 0x8f, 0x50, 0x29, 0x0d, 0x56, 0xd2, 0x34, 0x44,
|
0x42, 0xb0, 0x29, 0xe6, 0x07, 0x03, 0xd5, 0x27, 0x79, 0x5e, 0xa3, 0x53, 0x26, 0x74, 0xaa, 0x34,
|
||||||
0x22, 0xbf, 0x4a, 0xf0, 0x4f, 0x85, 0x3a, 0xe5, 0x58, 0xc7, 0x0f, 0x55, 0xa9, 0xc0, 0x54, 0xc3,
|
0x64, 0x22, 0x7f, 0xd7, 0xe0, 0x1d, 0x87, 0x07, 0x83, 0xc2, 0xc4, 0xaf, 0x54, 0xa9, 0xc3, 0xd6,
|
||||||
0xa2, 0x41, 0x67, 0x70, 0x91, 0x59, 0xb3, 0x6b, 0x06, 0x88, 0x6d, 0xe1, 0xc3, 0x9e, 0xcc, 0xae,
|
0xc4, 0xe3, 0xf1, 0x64, 0x48, 0x91, 0x75, 0x37, 0x35, 0x63, 0xc4, 0xf7, 0xe8, 0xcb, 0x5c, 0x66,
|
||||||
0x29, 0xeb, 0x90, 0x77, 0xbd, 0x53, 0x44, 0x19, 0x26, 0x1c, 0x1e, 0xe7, 0x70, 0xdf, 0x5e, 0xe0,
|
0x6a, 0x22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, 0xe8, 0xd4, 0xce, 0x33,
|
||||||
|
0x15, 0x8e, 0xcf, 0x02, 0x6a, 0xcf, 0x93, 0x9f, 0x69, 0xaf, 0x23, 0xcc, 0x87, 0x0d, 0xf9, 0x53,
|
||||||
|
0xe5, 0xe3, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x76, 0xbe, 0x3b, 0xc7, 0x09, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -799,6 +915,7 @@ type MsgClient interface {
|
|||||||
DistributionRequest(ctx context.Context, in *MsgDistributionRequest, opts ...grpc.CallOption) (*MsgDistributionRequestResponse, error)
|
DistributionRequest(ctx context.Context, in *MsgDistributionRequest, opts ...grpc.CallOption) (*MsgDistributionRequestResponse, error)
|
||||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||||
ReportPopResult(ctx context.Context, in *MsgReportPopResult, opts ...grpc.CallOption) (*MsgReportPopResultResponse, error)
|
ReportPopResult(ctx context.Context, in *MsgReportPopResult, opts ...grpc.CallOption) (*MsgReportPopResultResponse, error)
|
||||||
|
InitPop(ctx context.Context, in *MsgInitPop, opts ...grpc.CallOption) (*MsgInitPopResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type msgClient struct {
|
type msgClient struct {
|
||||||
@ -872,6 +989,15 @@ func (c *msgClient) ReportPopResult(ctx context.Context, in *MsgReportPopResult,
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *msgClient) InitPop(ctx context.Context, in *MsgInitPop, opts ...grpc.CallOption) (*MsgInitPopResponse, error) {
|
||||||
|
out := new(MsgInitPopResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/planetmintgo.dao.Msg/InitPop", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// MsgServer is the server API for Msg service.
|
// MsgServer is the server API for Msg service.
|
||||||
type MsgServer interface {
|
type MsgServer interface {
|
||||||
ReissueRDDLProposal(context.Context, *MsgReissueRDDLProposal) (*MsgReissueRDDLProposalResponse, error)
|
ReissueRDDLProposal(context.Context, *MsgReissueRDDLProposal) (*MsgReissueRDDLProposalResponse, error)
|
||||||
@ -881,6 +1007,7 @@ type MsgServer interface {
|
|||||||
DistributionRequest(context.Context, *MsgDistributionRequest) (*MsgDistributionRequestResponse, error)
|
DistributionRequest(context.Context, *MsgDistributionRequest) (*MsgDistributionRequestResponse, error)
|
||||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||||
ReportPopResult(context.Context, *MsgReportPopResult) (*MsgReportPopResultResponse, error)
|
ReportPopResult(context.Context, *MsgReportPopResult) (*MsgReportPopResultResponse, error)
|
||||||
|
InitPop(context.Context, *MsgInitPop) (*MsgInitPopResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
|
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
|
||||||
@ -908,6 +1035,9 @@ func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateP
|
|||||||
func (*UnimplementedMsgServer) ReportPopResult(ctx context.Context, req *MsgReportPopResult) (*MsgReportPopResultResponse, error) {
|
func (*UnimplementedMsgServer) ReportPopResult(ctx context.Context, req *MsgReportPopResult) (*MsgReportPopResultResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method ReportPopResult not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method ReportPopResult not implemented")
|
||||||
}
|
}
|
||||||
|
func (*UnimplementedMsgServer) InitPop(ctx context.Context, req *MsgInitPop) (*MsgInitPopResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method InitPop not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
|
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
|
||||||
s.RegisterService(&_Msg_serviceDesc, srv)
|
s.RegisterService(&_Msg_serviceDesc, srv)
|
||||||
@ -1039,6 +1169,24 @@ func _Msg_ReportPopResult_Handler(srv interface{}, ctx context.Context, dec func
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Msg_InitPop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(MsgInitPop)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MsgServer).InitPop(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/planetmintgo.dao.Msg/InitPop",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MsgServer).InitPop(ctx, req.(*MsgInitPop))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
var _Msg_serviceDesc = grpc.ServiceDesc{
|
var _Msg_serviceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "planetmintgo.dao.Msg",
|
ServiceName: "planetmintgo.dao.Msg",
|
||||||
HandlerType: (*MsgServer)(nil),
|
HandlerType: (*MsgServer)(nil),
|
||||||
@ -1071,6 +1219,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "ReportPopResult",
|
MethodName: "ReportPopResult",
|
||||||
Handler: _Msg_ReportPopResult_Handler,
|
Handler: _Msg_ReportPopResult_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "InitPop",
|
||||||
|
Handler: _Msg_InitPop_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "planetmintgo/dao/tx.proto",
|
Metadata: "planetmintgo/dao/tx.proto",
|
||||||
@ -1557,6 +1709,85 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
|
|||||||
return len(dAtA) - i, nil
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPop) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPop) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPop) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Height != 0 {
|
||||||
|
i = encodeVarintTx(dAtA, i, uint64(m.Height))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x28
|
||||||
|
}
|
||||||
|
if len(m.Challengee) > 0 {
|
||||||
|
i -= len(m.Challengee)
|
||||||
|
copy(dAtA[i:], m.Challengee)
|
||||||
|
i = encodeVarintTx(dAtA, i, uint64(len(m.Challengee)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x22
|
||||||
|
}
|
||||||
|
if len(m.Challenger) > 0 {
|
||||||
|
i -= len(m.Challenger)
|
||||||
|
copy(dAtA[i:], m.Challenger)
|
||||||
|
i = encodeVarintTx(dAtA, i, uint64(len(m.Challenger)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
}
|
||||||
|
if len(m.Initiator) > 0 {
|
||||||
|
i -= len(m.Initiator)
|
||||||
|
copy(dAtA[i:], m.Initiator)
|
||||||
|
i = encodeVarintTx(dAtA, i, uint64(len(m.Initiator)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
if len(m.Creator) > 0 {
|
||||||
|
i -= len(m.Creator)
|
||||||
|
copy(dAtA[i:], m.Creator)
|
||||||
|
i = encodeVarintTx(dAtA, i, uint64(len(m.Creator)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPopResponse) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPopResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPopResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
|
||||||
offset -= sovTx(v)
|
offset -= sovTx(v)
|
||||||
base := offset
|
base := offset
|
||||||
@ -1773,6 +2004,43 @@ func (m *MsgUpdateParamsResponse) Size() (n int) {
|
|||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPop) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
l = len(m.Creator)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTx(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(m.Initiator)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTx(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(m.Challenger)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTx(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(m.Challengee)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTx(uint64(l))
|
||||||
|
}
|
||||||
|
if m.Height != 0 {
|
||||||
|
n += 1 + sovTx(uint64(m.Height))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgInitPopResponse) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
func sovTx(x uint64) (n int) {
|
func sovTx(x uint64) (n int) {
|
||||||
return (math_bits.Len64(x|1) + 6) / 7
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
}
|
}
|
||||||
@ -3125,6 +3393,253 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (m *MsgInitPop) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: MsgInitPop: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: MsgInitPop: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
stringLen |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intStringLen := int(stringLen)
|
||||||
|
if intStringLen < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Creator = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Initiator", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
stringLen |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intStringLen := int(stringLen)
|
||||||
|
if intStringLen < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Initiator = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 3:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Challenger", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
stringLen |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intStringLen := int(stringLen)
|
||||||
|
if intStringLen < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Challenger = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 4:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Challengee", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
stringLen |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intStringLen := int(stringLen)
|
||||||
|
if intStringLen < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Challengee = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 5:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
|
||||||
|
}
|
||||||
|
m.Height = 0
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
m.Height |= int64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipTx(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *MsgInitPopResponse) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: MsgInitPopResponse: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: MsgInitPopResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipTx(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func skipTx(dAtA []byte) (n int, err error) {
|
func skipTx(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user