296 change distribution (#306)

* updated planetmint-go dependency in lib/tx
* added two additional distribution addresses. splitted up the previous investor pool of 31% into three pools:
* early investors 19%
* investors 10%
* strategic 2%

* adjusted distribution request message
* adjusted distribution result
* adjusted distribution order
* refactored reissuance and distribution msg methods to be more readable

* fixed token distribution test case

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Jürgen Eckel 2024-01-29 14:33:40 +01:00 committed by GitHub
parent f6509cfa64
commit bfbe9584a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 725 additions and 216 deletions

View File

@ -29,7 +29,9 @@ rpc-scheme = "{{ .PlmntConfig.RPCScheme }}"
rpc-wallet = "{{ .PlmntConfig.RPCWallet }}"
reissuance-asset = "{{ .PlmntConfig.ReissuanceAsset }}"
validator-address = "{{ .PlmntConfig.ValidatorAddress }}"
distribution-address-inv = "{{ .PlmntConfig.DistributionAddrInv }}"
distribution-address-investor = "{{ .PlmntConfig.DistributionAddrInvestor }}"
distribution-address-early-inv = "{{ .PlmntConfig.DistributionAddrEarlyInv }}"
distribution-address-strategic = "{{ .PlmntConfig.DistributionAddrStrategic }}"
distribution-address-dao = "{{ .PlmntConfig.DistributionAddrDAO }}"
distribution-address-pop = "{{ .PlmntConfig.DistributionAddrPop }}"
distribution-offset = {{ .PlmntConfig.DistributionOffset }}
@ -43,33 +45,35 @@ mqtt-response-timeout = {{ .PlmntConfig.MqttResponseTimeout }}
// Config defines Planetmint's top level configuration
type Config struct {
AssetRegistryScheme string `json:"asset-registry-scheme" mapstructure:"asset-registry-scheme"`
AssetRegistryDomain string `json:"asset-registry-domain" mapstructure:"asset-registry-domain"`
AssetRegistryPath string `json:"asset-registry-path" mapstructure:"asset-registry-path"`
TokenDenom string `json:"token-denom" mapstructure:"token-denom"`
FeeDenom string `json:"fee-denom" mapstructure:"fee-denom"`
StagedDenom string `json:"staged-denom" mapstructure:"staged-denom"`
ClaimDenom string `json:"claim-denom" mapstructure:"claim-denom"`
ConfigRootDir string `json:"config-root-dir" mapstructure:"config-root-dir"`
PopEpochs int `json:"pop-epochs" mapstructure:"pop-epochs"`
RPCHost string `json:"rpc-host" mapstructure:"rpc-host"`
RPCPort int `json:"rpc-port" mapstructure:"rpc-port"`
RPCUser string `json:"rpc-user" mapstructure:"rpc-user"`
RPCPassword string `json:"rpc-password" mapstructure:"rpc-password"`
RPCScheme string `json:"rpc-scheme" mapstructure:"rpc-scheme"`
RPCWallet string `json:"rpc-wallet" mapstructure:"rpc-wallet"`
ReissuanceAsset string `json:"reissuance-asset" mapstructure:"reissuance-asset"`
ValidatorAddress string `json:"validator-address" mapstructure:"validator-address"`
DistributionAddrInv string `json:"distribution-addr-inv" mapstructure:"distribution-addr-inv"`
DistributionAddrDAO string `json:"distribution-addr-dao" mapstructure:"distribution-addr-dao"`
DistributionAddrPop string `json:"distribution-addr-pop" mapstructure:"distribution-addr-pop"`
DistributionOffset int `json:"distribution-offset" mapstructure:"distribution-offset"`
ReissuanceEpochs int `json:"reissuance-epochs" mapstructure:"reissuance-epochs"`
MqttDomain string `json:"mqtt-domain" mapstructure:"mqtt-domain"`
MqttPort int `json:"mqtt-port" mapstructure:"mqtt-port"`
MqttUser string `json:"mqtt-user" mapstructure:"mqtt-user"`
MqttPassword string `json:"mqtt-password" mapstructure:"mqtt-password"`
MqttResponseTimeout int `json:"mqtt-response-timeout" mapstructure:"mqtt-response-timeout"`
AssetRegistryScheme string `json:"asset-registry-scheme" mapstructure:"asset-registry-scheme"`
AssetRegistryDomain string `json:"asset-registry-domain" mapstructure:"asset-registry-domain"`
AssetRegistryPath string `json:"asset-registry-path" mapstructure:"asset-registry-path"`
TokenDenom string `json:"token-denom" mapstructure:"token-denom"`
FeeDenom string `json:"fee-denom" mapstructure:"fee-denom"`
StagedDenom string `json:"staged-denom" mapstructure:"staged-denom"`
ClaimDenom string `json:"claim-denom" mapstructure:"claim-denom"`
ConfigRootDir string `json:"config-root-dir" mapstructure:"config-root-dir"`
PopEpochs int `json:"pop-epochs" mapstructure:"pop-epochs"`
RPCHost string `json:"rpc-host" mapstructure:"rpc-host"`
RPCPort int `json:"rpc-port" mapstructure:"rpc-port"`
RPCUser string `json:"rpc-user" mapstructure:"rpc-user"`
RPCPassword string `json:"rpc-password" mapstructure:"rpc-password"`
RPCScheme string `json:"rpc-scheme" mapstructure:"rpc-scheme"`
RPCWallet string `json:"rpc-wallet" mapstructure:"rpc-wallet"`
ReissuanceAsset string `json:"reissuance-asset" mapstructure:"reissuance-asset"`
ValidatorAddress string `json:"validator-address" mapstructure:"validator-address"`
DistributionAddrEarlyInv string `json:"distribution-addr-early-inv" mapstructure:"distribution-addr-early-inv"`
DistributionAddrInvestor string `json:"distribution-addr-investor" mapstructure:"distribution-addr-investor"`
DistributionAddrStrategic string `json:"distribution-addr-strategic" mapstructure:"distribution-addr-strategic"`
DistributionAddrDAO string `json:"distribution-addr-dao" mapstructure:"distribution-addr-dao"`
DistributionAddrPop string `json:"distribution-addr-pop" mapstructure:"distribution-addr-pop"`
DistributionOffset int `json:"distribution-offset" mapstructure:"distribution-offset"`
ReissuanceEpochs int `json:"reissuance-epochs" mapstructure:"reissuance-epochs"`
MqttDomain string `json:"mqtt-domain" mapstructure:"mqtt-domain"`
MqttPort int `json:"mqtt-port" mapstructure:"mqtt-port"`
MqttUser string `json:"mqtt-user" mapstructure:"mqtt-user"`
MqttPassword string `json:"mqtt-password" mapstructure:"mqtt-password"`
MqttResponseTimeout int `json:"mqtt-response-timeout" mapstructure:"mqtt-response-timeout"`
}
// cosmos-sdk wide global singleton
@ -81,26 +85,28 @@ var (
// DefaultConfig returns planetmint's default configuration.
func DefaultConfig() *Config {
return &Config{
AssetRegistryScheme: "https",
AssetRegistryDomain: "testnet-assets.rddl.io",
AssetRegistryPath: "register_asset",
TokenDenom: "plmnt",
FeeDenom: "plmnt",
StagedDenom: "stagedcrddl",
ClaimDenom: "crddl",
ConfigRootDir: "",
PopEpochs: 24, // 24 CometBFT epochs of 5s equate 120s
RPCHost: "localhost",
RPCPort: 18884,
RPCUser: "user",
RPCPassword: "password",
RPCScheme: "http",
RPCWallet: "rpcwallet",
ReissuanceAsset: "7add40beb27df701e02ee85089c5bc0021bc813823fedb5f1dcb5debda7f3da9",
ValidatorAddress: "plmnt1w5dww335zhh98pzv783hqre355ck3u4w4hjxcx",
DistributionAddrInv: "vjTyRN2G42Yq3T5TJBecHj1dF1xdhKF89hKV4HJN3uXxUbaVGVR76hAfVRQqQCovWaEpar7G5qBBprFG",
DistributionAddrDAO: "vjU8eMzU3JbUWZEpVANt2ePJuPWSPixgjiSj2jDMvkVVQQi2DDnZuBRVX4Ygt5YGBf5zvTWCr1ntdqYH",
DistributionAddrPop: "vjTvXCFSReRsZ7grdsAreRR12KuKpDw8idueQJK9Yh1BYS7ggAqgvCxCgwh13KGK6M52y37HUmvr4GdD",
AssetRegistryScheme: "https",
AssetRegistryDomain: "testnet-assets.rddl.io",
AssetRegistryPath: "register_asset",
TokenDenom: "plmnt",
FeeDenom: "plmnt",
StagedDenom: "stagedcrddl",
ClaimDenom: "crddl",
ConfigRootDir: "",
PopEpochs: 24, // 24 CometBFT epochs of 5s equate 120s
RPCHost: "localhost",
RPCPort: 18884,
RPCUser: "user",
RPCPassword: "password",
RPCScheme: "http",
RPCWallet: "rpcwallet",
ReissuanceAsset: "7add40beb27df701e02ee85089c5bc0021bc813823fedb5f1dcb5debda7f3da9",
ValidatorAddress: "plmnt1w5dww335zhh98pzv783hqre355ck3u4w4hjxcx",
DistributionAddrInvestor: "vjTyRN2G42Yq3T5TJBecHj1dF1xdhKF89hKV4HJN3uXxUbaVGVR76hAfVRQqQCovWaEpar7G5qBBprFG",
DistributionAddrEarlyInv: "vjTyRN2G42Yq3T5TJBecHj1dF1xdhKF89hKV4HJN3uXxUbaVGVR76hAfVRQqQCovWaEpar7G5qBBprFG",
DistributionAddrStrategic: "vjTyRN2G42Yq3T5TJBecHj1dF1xdhKF89hKV4HJN3uXxUbaVGVR76hAfVRQqQCovWaEpar7G5qBBprFG",
DistributionAddrDAO: "vjU8eMzU3JbUWZEpVANt2ePJuPWSPixgjiSj2jDMvkVVQQi2DDnZuBRVX4Ygt5YGBf5zvTWCr1ntdqYH",
DistributionAddrPop: "vjTvXCFSReRsZ7grdsAreRR12KuKpDw8idueQJK9Yh1BYS7ggAqgvCxCgwh13KGK6M52y37HUmvr4GdD",
// `DistributionOffset` relative to `ReissuanceEpochs`. CometBFT epochs of 5s equate 30 min (12*30)
// to wait for confirmations on the reissuance
DistributionOffset: 360,

View File

@ -46864,6 +46864,18 @@ paths:
format: int64
proposer:
type: string
earlyInvAddr:
type: string
earlyInvAmount:
type: string
earlyInvTxID:
type: string
strategicAddr:
type: string
strategicAmount:
type: string
strategicTxID:
type: string
default:
description: An unexpected error response.
schema:
@ -76322,6 +76334,18 @@ definitions:
format: int64
proposer:
type: string
earlyInvAddr:
type: string
earlyInvAmount:
type: string
earlyInvTxID:
type: string
strategicAddr:
type: string
strategicAmount:
type: string
strategicTxID:
type: string
planetmintgo.dao.MintRequest:
type: object
properties:
@ -76467,6 +76491,18 @@ definitions:
format: int64
proposer:
type: string
earlyInvAddr:
type: string
earlyInvAmount:
type: string
earlyInvTxID:
type: string
strategicAddr:
type: string
strategicAmount:
type: string
strategicTxID:
type: string
planetmintgo.dao.QueryGetMintRequestsByHashResponse:
type: object
properties:

View File

@ -5,7 +5,7 @@ go 1.20
require (
github.com/cometbft/cometbft v0.37.2
github.com/cosmos/cosmos-sdk v0.47.5
github.com/planetmint/planetmint-go v0.6.7
github.com/planetmint/planetmint-go v0.7.2
github.com/stretchr/testify v1.8.4
sigs.k8s.io/yaml v1.3.0
)
@ -67,6 +67,7 @@ require (
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
github.com/eclipse/paho.mqtt.golang v1.4.3 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/getsentry/sentry-go v0.23.0 // indirect
@ -135,7 +136,7 @@ require (
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rakyll/statik v0.1.7 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rddl-network/elements-rpc v0.4.0 // indirect
github.com/rddl-network/elements-rpc v0.5.2 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/cors v1.8.3 // indirect
github.com/rs/zerolog v1.30.0 // indirect
@ -160,6 +161,7 @@ require (
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect

View File

@ -407,6 +407,8 @@ github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
github.com/eclipse/paho.mqtt.golang v1.4.3 h1:2kwcUGn8seMUfWndX0hGbvH8r7crgcJguQNCyp70xik=
github.com/eclipse/paho.mqtt.golang v1.4.3/go.mod h1:CSYvoAlsMkhYOXh/oKyxa8EcBci6dVkLCbo5tTC1RIE=
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
@ -855,8 +857,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
github.com/planetmint/planetmint-go v0.6.7 h1:ZHHKCB0YMu0wx7WlLFz8KxS27GRKpr70hFuqx7CjEX0=
github.com/planetmint/planetmint-go v0.6.7/go.mod h1:xvzcOaX2pWx3SvdEyX6WSwh9323v1dZmob2syLbzj00=
github.com/planetmint/planetmint-go v0.7.2 h1:UmMRQYulYXWEjIb6yfP74eyGksW2ri0bk0fgP/pbLSI=
github.com/planetmint/planetmint-go v0.7.2/go.mod h1:RUsC/UcGRmN65dkRJKJgfHngZTZx5M2q0xcBZR8SA/s=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
@ -897,8 +899,8 @@ github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Ung
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rddl-network/elements-rpc v0.4.0 h1:A9I8JnbT7hcThGdcHoRZeBg5zMZp2EjDZOIT8EpHFIE=
github.com/rddl-network/elements-rpc v0.4.0/go.mod h1:WOSYDMhq+V74lReSInnSejbdEyGI8hiQZSn4cSoFuxo=
github.com/rddl-network/elements-rpc v0.5.2 h1:gHCJEJR72/bi98gSfLCL5GHxAJnWZIrhkUwCpvLA5j0=
github.com/rddl-network/elements-rpc v0.5.2/go.mod h1:WOSYDMhq+V74lReSInnSejbdEyGI8hiQZSn4cSoFuxo=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
@ -1196,6 +1198,7 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=

View File

@ -4,8 +4,6 @@ package planetmintgo.dao;
option go_package = "github.com/planetmint/planetmint-go/x/dao/types";
message DistributionOrder {
string daoAddr = 1;
string daoAmount = 2;
string daoTxID = 3;
@ -18,4 +16,10 @@ message DistributionOrder {
int64 firstPop = 10;
int64 lastPop = 11;
string proposer = 12;
string earlyInvAddr = 13;
string earlyInvAmount = 14;
string earlyInvTxID = 15;
string strategicAddr = 16;
string strategicAmount = 17;
string strategicTxID = 18;
}

View File

@ -59,11 +59,13 @@ message MsgReissueRDDLResult {
message MsgReissueRDDLResultResponse {}
message MsgDistributionResult {
string creator = 1;
int64 lastPop = 2;
string daoTxID = 3;
string investorTxID = 4;
string popTxID = 5;
string creator = 1;
int64 lastPop = 2;
string daoTxID = 3;
string investorTxID = 4;
string popTxID = 5;
string earlyInvestorTxID = 6;
string strategicTxID = 7;
}
message MsgDistributionResultResponse {}

View File

@ -70,9 +70,10 @@ func SendDistributionRequest(goCtx context.Context, distribution daotypes.Distri
buildSignBroadcastTx(goCtx, loggingContext, sendingValidatorAddress, msg)
}
func SendDistributionResult(goCtx context.Context, lastPoP int64, daoTxID string, invTxID string, popTxID string) {
func SendDistributionResult(goCtx context.Context, lastPoP int64, daoTxID string, invTxID string,
popTxID string, earlyInvestorTxID string, strategicTxID string) {
sendingValidatorAddress := config.GetConfig().ValidatorAddress
msg := daotypes.NewMsgDistributionResult(sendingValidatorAddress, lastPoP, daoTxID, invTxID, popTxID)
msg := daotypes.NewMsgDistributionResult(sendingValidatorAddress, lastPoP, daoTxID, invTxID, popTxID, earlyInvestorTxID, strategicTxID)
loggingContext := "distribution result"
buildSignBroadcastTx(goCtx, loggingContext, sendingValidatorAddress, msg)
}

View File

@ -15,9 +15,9 @@ var _ = strconv.Itoa(0)
func CmdDistributionResult() *cobra.Command {
cmd := &cobra.Command{
Use: "distribution-result [last-pop] [dao-txid] [investor-txid] [pop-txid]",
Use: "distribution-result [last-pop] [dao-txid] [investor-txid] [pop-txid] [early-investor-txid] [strategic-txid]",
Short: "Broadcast message DistributionResult",
Args: cobra.ExactArgs(4),
Args: cobra.ExactArgs(6),
RunE: func(cmd *cobra.Command, args []string) (err error) {
argLastPop, err := cast.ToInt64E(args[0])
if err != nil {
@ -26,6 +26,8 @@ func CmdDistributionResult() *cobra.Command {
argDaoTxid := args[1]
argInvestorTxid := args[2]
argPopTxid := args[3]
argEarlyInvestorTxid := args[4]
argStrategicTxid := args[5]
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
@ -38,6 +40,8 @@ func CmdDistributionResult() *cobra.Command {
argDaoTxid,
argInvestorTxid,
argPopTxid,
argEarlyInvestorTxid,
argStrategicTxid,
)
if err := msg.ValidateBasic(); err != nil {
return err

View File

@ -64,11 +64,15 @@ func ComputeDistribution(lastReissuance int64, blockHeight int64, amount uint64)
distribution.LastPop = blockHeight
distribution.DaoAddr = conf.DistributionAddrDAO
distribution.InvestorAddr = conf.DistributionAddrInv
distribution.EarlyInvAddr = conf.DistributionAddrEarlyInv
distribution.InvestorAddr = conf.DistributionAddrInvestor
distribution.StrategicAddr = conf.DistributionAddrStrategic
distribution.PopAddr = conf.DistributionAddrPop
distribution.DaoAmount = util.UintValueToRDDLTokenString(uint64(float64(amount) * types.PercentageDao))
distribution.EarlyInvAmount = util.UintValueToRDDLTokenString(uint64(float64(amount) * types.PercentageEarlyInvestor))
distribution.InvestorAmount = util.UintValueToRDDLTokenString(uint64(float64(amount) * types.PercentageInvestor))
distribution.StrategicAmount = util.UintValueToRDDLTokenString(uint64(float64(amount) * types.PercentageStrategic))
distribution.PopAmount = util.UintValueToRDDLTokenString(uint64(float64(amount) * types.PercentagePop))
return distribution

View File

@ -59,10 +59,14 @@ func TestTokenDistribution(t *testing.T) {
amount1, err1 := strconv.ParseFloat(distribution.DaoAmount, 64)
amount2, err2 := strconv.ParseFloat(distribution.InvestorAmount, 64)
amount3, err3 := strconv.ParseFloat(distribution.PopAmount, 64)
amount4, err4 := strconv.ParseFloat(distribution.EarlyInvAmount, 64)
amount5, err5 := strconv.ParseFloat(distribution.StrategicAmount, 64)
assert.Nil(t, err1)
assert.Nil(t, err2)
assert.Nil(t, err3)
sum := amount1 + amount2 + amount3
assert.Nil(t, err4)
assert.Nil(t, err5)
sum := amount1 + amount2 + amount3 + amount4 + amount5
expSum := reissuanceValue * Amount1stBatch // add the [0] of the
assert.True(t, expSum-sum < 0.000001)
@ -74,10 +78,14 @@ func TestTokenDistribution(t *testing.T) {
amount1, err1 = strconv.ParseFloat(lastDistribution.DaoAmount, 64)
amount2, err2 = strconv.ParseFloat(lastDistribution.InvestorAmount, 64)
amount3, err3 = strconv.ParseFloat(lastDistribution.PopAmount, 64)
amount4, err4 = strconv.ParseFloat(lastDistribution.EarlyInvAmount, 64)
amount5, err5 = strconv.ParseFloat(lastDistribution.StrategicAmount, 64)
assert.Nil(t, err1)
assert.Nil(t, err2)
assert.Nil(t, err3)
sum = amount1 + amount2 + amount3
assert.Nil(t, err4)
assert.Nil(t, err5)
sum = amount1 + amount2 + amount3 + amount4 + amount5
expSum = reissuanceValue * Amount2ndBatch // add the [0] of the
assert.True(t, expSum-sum < 0.000001)
assert.Equal(t, float64(reissuances), Amount1stBatch+Amount2ndBatch)

View File

@ -29,29 +29,36 @@ func (k msgServer) DistributionRequest(goCtx context.Context, msg *types.MsgDist
k.StoreDistributionOrder(ctx, *msg.GetDistribution())
validatorIdentity, validResult := util.GetValidatorCometBFTIdentity(ctx)
if validResult && msg.Distribution.GetProposer() == validatorIdentity {
util.GetAppLogger().Info(ctx, distributionRequestTag+"entering asset distribution mode")
// issue three distributions:
investorTx, err := util.DistributeAsset(msg.Distribution.InvestorAddr, msg.Distribution.InvestorAmount)
if err != nil {
util.GetAppLogger().Error(ctx, distributionRequestTag+"could not distribute asset to investors: "+err.Error())
}
popTx, err := util.DistributeAsset(msg.Distribution.PopAddr, msg.Distribution.PopAmount)
if err != nil {
util.GetAppLogger().Error(ctx, distributionRequestTag+"could not distribute asset to PoP: "+err.Error())
}
daoTx, err := util.DistributeAsset(msg.Distribution.DaoAddr, msg.Distribution.DaoAmount)
if err != nil {
util.GetAppLogger().Error(ctx, distributionRequestTag+"could not distribute asset to DAO: "+err.Error())
}
msg.Distribution.InvestorTxID = investorTx
msg.Distribution.PopTxID = popTx
msg.Distribution.DaoTxID = daoTx
util.SendDistributionResult(goCtx, msg.Distribution.LastPop, daoTx, investorTx, popTx)
} else {
util.GetAppLogger().Error(ctx, distributionRequestTag+"failed. valid result: %v proposer: %s validator identity: %s", validResult, msg.Distribution.GetProposer(), validatorIdentity)
if !validResult || msg.Distribution.GetProposer() != validatorIdentity {
util.GetAppLogger().Info(ctx, distributionRequestTag+"Not the proposer. valid result: %t proposer: %s validator identity: %s", validResult, msg.Distribution.GetProposer(), validatorIdentity)
return &types.MsgDistributionRequestResponse{}, nil
}
util.GetAppLogger().Info(ctx, distributionRequestTag+"entering asset distribution mode")
// issue 5 distributions:
earlyInvestorTx, err := util.DistributeAsset(msg.Distribution.EarlyInvAddr, msg.Distribution.EarlyInvAmount)
if err != nil {
util.GetAppLogger().Error(ctx, distributionRequestTag+"could not distribute asset to early investors: "+err.Error())
}
investorTx, err := util.DistributeAsset(msg.Distribution.InvestorAddr, msg.Distribution.InvestorAmount)
if err != nil {
util.GetAppLogger().Error(ctx, distributionRequestTag+"could not distribute asset to investors: "+err.Error())
}
strategicTx, err := util.DistributeAsset(msg.Distribution.StrategicAddr, msg.Distribution.StrategicAmount)
if err != nil {
util.GetAppLogger().Error(ctx, distributionRequestTag+"could not distribute asset to strategic investments: "+err.Error())
}
popTx, err := util.DistributeAsset(msg.Distribution.PopAddr, msg.Distribution.PopAmount)
if err != nil {
util.GetAppLogger().Error(ctx, distributionRequestTag+"could not distribute asset to PoP: "+err.Error())
}
daoTx, err := util.DistributeAsset(msg.Distribution.DaoAddr, msg.Distribution.DaoAmount)
if err != nil {
util.GetAppLogger().Error(ctx, distributionRequestTag+"could not distribute asset to DAO: "+err.Error())
}
util.SendDistributionResult(goCtx, msg.Distribution.LastPop, daoTx, investorTx, popTx, earlyInvestorTx, strategicTx)
return &types.MsgDistributionRequestResponse{}, nil
}

View File

@ -15,21 +15,26 @@ func (k msgServer) DistributionResult(goCtx context.Context, msg *types.MsgDistr
ctx := sdk.UnwrapSDKContext(goCtx)
distribution, found := k.LookupDistributionOrder(ctx, msg.GetLastPop())
if found {
distribution.DaoTxID = msg.DaoTxID
distribution.PopTxID = msg.PopTxID
distribution.InvestorTxID = msg.InvestorTxID
err := k.resolveStagedClaims(ctx, distribution.FirstPop, distribution.LastPop)
if err != nil {
util.GetAppLogger().Error(ctx, "%s for provided PoP heights: %d %d", types.ErrResolvingStagedClaims.Error(), distribution.FirstPop, distribution.LastPop)
return nil, errorsmod.Wrap(types.ErrConvertClaims, err.Error())
}
util.GetAppLogger().Info(ctx, "staged claims successfully for provided PoP heights: %d %d", distribution.FirstPop, distribution.LastPop)
k.StoreDistributionOrder(ctx, distribution)
} else {
util.GetAppLogger().Error(ctx, "%s for provided block height %s", types.ErrDistributionNotFound.Error(), strconv.FormatInt(msg.GetLastPop(), 10))
if !found {
errorMessage := types.ErrDistributionNotFound.Error() + " for provided block height " + strconv.FormatInt(msg.GetLastPop(), 10)
util.GetAppLogger().Error(ctx, errorMessage)
return nil, errorsmod.Wrap(types.ErrDistributionNotFound, errorMessage)
}
distribution.DaoTxID = msg.DaoTxID
distribution.PopTxID = msg.PopTxID
distribution.InvestorTxID = msg.InvestorTxID
distribution.EarlyInvAddr = msg.EarlyInvestorTxID
distribution.StrategicTxID = msg.StrategicTxID
err := k.resolveStagedClaims(ctx, distribution.FirstPop, distribution.LastPop)
if err != nil {
util.GetAppLogger().Error(ctx, "%s for provided PoP heights: %d %d", types.ErrResolvingStagedClaims.Error(), distribution.FirstPop, distribution.LastPop)
return nil, errorsmod.Wrap(types.ErrConvertClaims, err.Error())
}
util.GetAppLogger().Info(ctx, "staged claims successfully for provided PoP heights: %d %d", distribution.FirstPop, distribution.LastPop)
k.StoreDistributionOrder(ctx, distribution)
return &types.MsgDistributionResultResponse{}, nil
}

View File

@ -14,18 +14,6 @@ var (
func (k msgServer) ReissueRDDLProposal(goCtx context.Context, msg *types.MsgReissueRDDLProposal) (*types.MsgReissueRDDLProposalResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
validatorIdentity, validResult := util.GetValidatorCometBFTIdentity(ctx)
if validResult && msg.Proposer == validatorIdentity {
util.GetAppLogger().Info(ctx, reissueTag+"asset: "+msg.GetCommand())
txID, err := util.ReissueAsset(msg.Command)
if err != nil {
util.GetAppLogger().Error(ctx, reissueTag+"asset reissuance failed: "+err.Error())
}
// 3. notarize result by notarizing the liquid tx-id
util.SendReissuanceResult(goCtx, msg.GetProposer(), txID, msg.GetBlockHeight())
} else {
util.GetAppLogger().Error(ctx, reissueTag+"failed. valid result: %v proposer: %s validator identity: %s", validResult, msg.Proposer, validatorIdentity)
}
var reissuance types.Reissuance
reissuance.BlockHeight = msg.GetBlockHeight()
@ -34,5 +22,19 @@ func (k msgServer) ReissueRDDLProposal(goCtx context.Context, msg *types.MsgReis
reissuance.FirstIncludedPop = msg.GetFirstIncludedPop()
reissuance.LastIncludedPop = msg.GetLastIncludedPop()
k.StoreReissuance(ctx, reissuance)
validatorIdentity, validResult := util.GetValidatorCometBFTIdentity(ctx)
if !validResult || msg.Proposer != validatorIdentity {
util.GetAppLogger().Info(ctx, reissueTag+"Not the proposer. valid result: %t proposer: %s validator identity: %s", validResult, msg.Proposer, validatorIdentity)
return &types.MsgReissueRDDLProposalResponse{}, nil
}
util.GetAppLogger().Info(ctx, reissueTag+"asset: "+msg.GetCommand())
txID, err := util.ReissueAsset(msg.Command)
if err != nil {
util.GetAppLogger().Error(ctx, reissueTag+"asset reissuance failed: "+err.Error())
}
util.SendReissuanceResult(goCtx, msg.GetProposer(), txID, msg.GetBlockHeight())
return &types.MsgReissueRDDLProposalResponse{}, nil
}

View File

@ -1,7 +1,9 @@
package types
const PercentageDao float64 = 0.61
const PercentageInvestor float64 = 0.31
const PercentageEarlyInvestor float64 = 0.19
const PercentageInvestor float64 = 0.10
const PercentageStrategic float64 = 0.02
const PercentagePop float64 = 0.08
const PercentageChallenger float64 = 0.02
const PercentageChallengee float64 = 0.06

View File

@ -23,18 +23,24 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type DistributionOrder struct {
DaoAddr string `protobuf:"bytes,1,opt,name=daoAddr,proto3" json:"daoAddr,omitempty"`
DaoAmount string `protobuf:"bytes,2,opt,name=daoAmount,proto3" json:"daoAmount,omitempty"`
DaoTxID string `protobuf:"bytes,3,opt,name=daoTxID,proto3" json:"daoTxID,omitempty"`
InvestorAddr string `protobuf:"bytes,4,opt,name=investorAddr,proto3" json:"investorAddr,omitempty"`
InvestorAmount string `protobuf:"bytes,5,opt,name=investorAmount,proto3" json:"investorAmount,omitempty"`
InvestorTxID string `protobuf:"bytes,6,opt,name=investorTxID,proto3" json:"investorTxID,omitempty"`
PopAddr string `protobuf:"bytes,7,opt,name=popAddr,proto3" json:"popAddr,omitempty"`
PopAmount string `protobuf:"bytes,8,opt,name=popAmount,proto3" json:"popAmount,omitempty"`
PopTxID string `protobuf:"bytes,9,opt,name=popTxID,proto3" json:"popTxID,omitempty"`
FirstPop int64 `protobuf:"varint,10,opt,name=firstPop,proto3" json:"firstPop,omitempty"`
LastPop int64 `protobuf:"varint,11,opt,name=lastPop,proto3" json:"lastPop,omitempty"`
Proposer string `protobuf:"bytes,12,opt,name=proposer,proto3" json:"proposer,omitempty"`
DaoAddr string `protobuf:"bytes,1,opt,name=daoAddr,proto3" json:"daoAddr,omitempty"`
DaoAmount string `protobuf:"bytes,2,opt,name=daoAmount,proto3" json:"daoAmount,omitempty"`
DaoTxID string `protobuf:"bytes,3,opt,name=daoTxID,proto3" json:"daoTxID,omitempty"`
InvestorAddr string `protobuf:"bytes,4,opt,name=investorAddr,proto3" json:"investorAddr,omitempty"`
InvestorAmount string `protobuf:"bytes,5,opt,name=investorAmount,proto3" json:"investorAmount,omitempty"`
InvestorTxID string `protobuf:"bytes,6,opt,name=investorTxID,proto3" json:"investorTxID,omitempty"`
PopAddr string `protobuf:"bytes,7,opt,name=popAddr,proto3" json:"popAddr,omitempty"`
PopAmount string `protobuf:"bytes,8,opt,name=popAmount,proto3" json:"popAmount,omitempty"`
PopTxID string `protobuf:"bytes,9,opt,name=popTxID,proto3" json:"popTxID,omitempty"`
FirstPop int64 `protobuf:"varint,10,opt,name=firstPop,proto3" json:"firstPop,omitempty"`
LastPop int64 `protobuf:"varint,11,opt,name=lastPop,proto3" json:"lastPop,omitempty"`
Proposer string `protobuf:"bytes,12,opt,name=proposer,proto3" json:"proposer,omitempty"`
EarlyInvAddr string `protobuf:"bytes,13,opt,name=earlyInvAddr,proto3" json:"earlyInvAddr,omitempty"`
EarlyInvAmount string `protobuf:"bytes,14,opt,name=earlyInvAmount,proto3" json:"earlyInvAmount,omitempty"`
EarlyInvTxID string `protobuf:"bytes,15,opt,name=earlyInvTxID,proto3" json:"earlyInvTxID,omitempty"`
StrategicAddr string `protobuf:"bytes,16,opt,name=strategicAddr,proto3" json:"strategicAddr,omitempty"`
StrategicAmount string `protobuf:"bytes,17,opt,name=strategicAmount,proto3" json:"strategicAmount,omitempty"`
StrategicTxID string `protobuf:"bytes,18,opt,name=strategicTxID,proto3" json:"strategicTxID,omitempty"`
}
func (m *DistributionOrder) Reset() { *m = DistributionOrder{} }
@ -154,6 +160,48 @@ func (m *DistributionOrder) GetProposer() string {
return ""
}
func (m *DistributionOrder) GetEarlyInvAddr() string {
if m != nil {
return m.EarlyInvAddr
}
return ""
}
func (m *DistributionOrder) GetEarlyInvAmount() string {
if m != nil {
return m.EarlyInvAmount
}
return ""
}
func (m *DistributionOrder) GetEarlyInvTxID() string {
if m != nil {
return m.EarlyInvTxID
}
return ""
}
func (m *DistributionOrder) GetStrategicAddr() string {
if m != nil {
return m.StrategicAddr
}
return ""
}
func (m *DistributionOrder) GetStrategicAmount() string {
if m != nil {
return m.StrategicAmount
}
return ""
}
func (m *DistributionOrder) GetStrategicTxID() string {
if m != nil {
return m.StrategicTxID
}
return ""
}
func init() {
proto.RegisterType((*DistributionOrder)(nil), "planetmintgo.dao.DistributionOrder")
}
@ -163,27 +211,31 @@ func init() {
}
var fileDescriptor_2bd326325e0d716d = []byte{
// 309 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x51, 0xbf, 0x4e, 0xf3, 0x30,
0x10, 0xaf, 0xdb, 0xef, 0x6b, 0x1b, 0x53, 0x21, 0xc8, 0x64, 0x21, 0x64, 0x55, 0x1d, 0x50, 0x19,
0x48, 0x06, 0x9e, 0x00, 0xd4, 0xa5, 0x13, 0xa8, 0x62, 0x62, 0x41, 0x09, 0x0e, 0xc1, 0x52, 0x93,
0xb3, 0x1c, 0x07, 0x95, 0xb7, 0xe0, 0xb1, 0x18, 0x3b, 0x32, 0xa2, 0xe4, 0x29, 0xd8, 0x90, 0x2f,
0xa9, 0x9b, 0xb2, 0xdd, 0xef, 0x7e, 0xff, 0x6c, 0x1d, 0xbd, 0x54, 0xeb, 0x28, 0x4f, 0x4c, 0x26,
0x73, 0x93, 0x42, 0x28, 0x22, 0x08, 0x85, 0x2c, 0x8c, 0x96, 0x71, 0x69, 0x24, 0xe4, 0x4f, 0xa0,
0x45, 0xa2, 0x03, 0xa5, 0xc1, 0x80, 0x7f, 0xd2, 0x95, 0x06, 0x22, 0x82, 0xd9, 0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0x3c, 0xc4, 0xfb, 0x5e, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x44, 0x71, 0x90,
0x55, 0x0c, 0x02, 0x00, 0x00,
// 378 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x52, 0x3d, 0x6f, 0x22, 0x31,
0x10, 0x65, 0x0f, 0x8e, 0x0f, 0x1f, 0x9f, 0x5b, 0x59, 0xa7, 0xd3, 0x0a, 0xa1, 0x53, 0x44, 0x8a,
0xb0, 0x45, 0x7e, 0x41, 0x22, 0x1a, 0xaa, 0x44, 0x28, 0x55, 0x9a, 0xc8, 0x60, 0x67, 0x63, 0x09,
0x76, 0x2c, 0xaf, 0x41, 0xf0, 0x2f, 0xf2, 0xb3, 0x52, 0x52, 0xa6, 0x4b, 0x04, 0x7f, 0x24, 0xf2,
0x18, 0xcc, 0x2e, 0x9d, 0xdf, 0x9b, 0x79, 0xef, 0xcd, 0x58, 0x43, 0xae, 0xd5, 0x82, 0xa5, 0xc2,
0x2c, 0x65, 0x6a, 0x12, 0x88, 0x39, 0x83, 0x98, 0xcb, 0xcc, 0x68, 0x39, 0x5b, 0x19, 0x09, 0xe9,
0x0b, 0x68, 0x2e, 0xf4, 0x48, 0x69, 0x30, 0x10, 0x76, 0xf3, 0xad, 0x23, 0xce, 0x60, 0xf0, 0x55,
0x21, 0xbd, 0x71, 0xae, 0xfd, 0xc1, 0x76, 0x87, 0x94, 0xd4, 0x38, 0x83, 0x3b, 0xce, 0x35, 0x0d,
0xfa, 0xc1, 0xb0, 0x31, 0x3d, 0xc1, 0xf0, 0x1f, 0x69, 0xd8, 0xe7, 0x12, 0x56, 0xa9, 0xa1, 0xbf,
0xb0, 0x76, 0x26, 0x8e, 0xba, 0xa7, 0xcd, 0x64, 0x4c, 0xcb, 0x5e, 0x67, 0x61, 0x38, 0x20, 0x4d,
0x99, 0xae, 0x45, 0x66, 0x40, 0xa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0xe6, 0x9e, 0x37, 0x09,
0xc4, 0x1b, 0xbc, 0x68, 0xb3, 0x55, 0x22, 0x9b, 0x55, 0xf1, 0x8a, 0x6f, 0x7f, 0x02, 0x00, 0x00,
0xff, 0xff, 0x61, 0x1c, 0x03, 0x11, 0xf2, 0x02, 0x00, 0x00,
}
func (m *DistributionOrder) Marshal() (dAtA []byte, err error) {
@ -206,6 +258,54 @@ func (m *DistributionOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.StrategicTxID) > 0 {
i -= len(m.StrategicTxID)
copy(dAtA[i:], m.StrategicTxID)
i = encodeVarintDistributionOrder(dAtA, i, uint64(len(m.StrategicTxID)))
i--
dAtA[i] = 0x1
i--
dAtA[i] = 0x92
}
if len(m.StrategicAmount) > 0 {
i -= len(m.StrategicAmount)
copy(dAtA[i:], m.StrategicAmount)
i = encodeVarintDistributionOrder(dAtA, i, uint64(len(m.StrategicAmount)))
i--
dAtA[i] = 0x1
i--
dAtA[i] = 0x8a
}
if len(m.StrategicAddr) > 0 {
i -= len(m.StrategicAddr)
copy(dAtA[i:], m.StrategicAddr)
i = encodeVarintDistributionOrder(dAtA, i, uint64(len(m.StrategicAddr)))
i--
dAtA[i] = 0x1
i--
dAtA[i] = 0x82
}
if len(m.EarlyInvTxID) > 0 {
i -= len(m.EarlyInvTxID)
copy(dAtA[i:], m.EarlyInvTxID)
i = encodeVarintDistributionOrder(dAtA, i, uint64(len(m.EarlyInvTxID)))
i--
dAtA[i] = 0x7a
}
if len(m.EarlyInvAmount) > 0 {
i -= len(m.EarlyInvAmount)
copy(dAtA[i:], m.EarlyInvAmount)
i = encodeVarintDistributionOrder(dAtA, i, uint64(len(m.EarlyInvAmount)))
i--
dAtA[i] = 0x72
}
if len(m.EarlyInvAddr) > 0 {
i -= len(m.EarlyInvAddr)
copy(dAtA[i:], m.EarlyInvAddr)
i = encodeVarintDistributionOrder(dAtA, i, uint64(len(m.EarlyInvAddr)))
i--
dAtA[i] = 0x6a
}
if len(m.Proposer) > 0 {
i -= len(m.Proposer)
copy(dAtA[i:], m.Proposer)
@ -352,6 +452,30 @@ func (m *DistributionOrder) Size() (n int) {
if l > 0 {
n += 1 + l + sovDistributionOrder(uint64(l))
}
l = len(m.EarlyInvAddr)
if l > 0 {
n += 1 + l + sovDistributionOrder(uint64(l))
}
l = len(m.EarlyInvAmount)
if l > 0 {
n += 1 + l + sovDistributionOrder(uint64(l))
}
l = len(m.EarlyInvTxID)
if l > 0 {
n += 1 + l + sovDistributionOrder(uint64(l))
}
l = len(m.StrategicAddr)
if l > 0 {
n += 2 + l + sovDistributionOrder(uint64(l))
}
l = len(m.StrategicAmount)
if l > 0 {
n += 2 + l + sovDistributionOrder(uint64(l))
}
l = len(m.StrategicTxID)
if l > 0 {
n += 2 + l + sovDistributionOrder(uint64(l))
}
return n
}
@ -748,6 +872,198 @@ func (m *DistributionOrder) Unmarshal(dAtA []byte) error {
}
m.Proposer = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 13:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EarlyInvAddr", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributionOrder
}
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 ErrInvalidLengthDistributionOrder
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthDistributionOrder
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.EarlyInvAddr = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 14:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EarlyInvAmount", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributionOrder
}
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 ErrInvalidLengthDistributionOrder
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthDistributionOrder
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.EarlyInvAmount = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 15:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EarlyInvTxID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributionOrder
}
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 ErrInvalidLengthDistributionOrder
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthDistributionOrder
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.EarlyInvTxID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 16:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field StrategicAddr", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributionOrder
}
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 ErrInvalidLengthDistributionOrder
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthDistributionOrder
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.StrategicAddr = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 17:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field StrategicAmount", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributionOrder
}
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 ErrInvalidLengthDistributionOrder
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthDistributionOrder
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.StrategicAmount = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 18:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field StrategicTxID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDistributionOrder
}
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 ErrInvalidLengthDistributionOrder
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthDistributionOrder
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.StrategicTxID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipDistributionOrder(dAtA[iNdEx:])

View File

@ -10,13 +10,16 @@ const TypeMsgDistributionResult = "distribution_result"
var _ sdk.Msg = &MsgDistributionResult{}
func NewMsgDistributionResult(creator string, lastPop int64, daoTxID string, investorTxID string, popTxID string) *MsgDistributionResult {
func NewMsgDistributionResult(creator string, lastPop int64, daoTxID string, investorTxID string,
popTxID string, earlyInvestorTxID string, strategicTxID string) *MsgDistributionResult {
return &MsgDistributionResult{
Creator: creator,
LastPop: lastPop,
DaoTxID: daoTxID,
InvestorTxID: investorTxID,
PopTxID: popTxID,
Creator: creator,
LastPop: lastPop,
DaoTxID: daoTxID,
InvestorTxID: investorTxID,
PopTxID: popTxID,
EarlyInvestorTxID: earlyInvestorTxID,
StrategicTxID: strategicTxID,
}
}

View File

@ -432,11 +432,13 @@ func (m *MsgReissueRDDLResultResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgReissueRDDLResultResponse proto.InternalMessageInfo
type MsgDistributionResult struct {
Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
LastPop int64 `protobuf:"varint,2,opt,name=lastPop,proto3" json:"lastPop,omitempty"`
DaoTxID string `protobuf:"bytes,3,opt,name=daoTxID,proto3" json:"daoTxID,omitempty"`
InvestorTxID string `protobuf:"bytes,4,opt,name=investorTxID,proto3" json:"investorTxID,omitempty"`
PopTxID string `protobuf:"bytes,5,opt,name=popTxID,proto3" json:"popTxID,omitempty"`
Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
LastPop int64 `protobuf:"varint,2,opt,name=lastPop,proto3" json:"lastPop,omitempty"`
DaoTxID string `protobuf:"bytes,3,opt,name=daoTxID,proto3" json:"daoTxID,omitempty"`
InvestorTxID string `protobuf:"bytes,4,opt,name=investorTxID,proto3" json:"investorTxID,omitempty"`
PopTxID string `protobuf:"bytes,5,opt,name=popTxID,proto3" json:"popTxID,omitempty"`
EarlyInvestorTxID string `protobuf:"bytes,6,opt,name=earlyInvestorTxID,proto3" json:"earlyInvestorTxID,omitempty"`
StrategicTxID string `protobuf:"bytes,7,opt,name=strategicTxID,proto3" json:"strategicTxID,omitempty"`
}
func (m *MsgDistributionResult) Reset() { *m = MsgDistributionResult{} }
@ -507,6 +509,20 @@ func (m *MsgDistributionResult) GetPopTxID() string {
return ""
}
func (m *MsgDistributionResult) GetEarlyInvestorTxID() string {
if m != nil {
return m.EarlyInvestorTxID
}
return ""
}
func (m *MsgDistributionResult) GetStrategicTxID() string {
if m != nil {
return m.StrategicTxID
}
return ""
}
type MsgDistributionResultResponse struct {
}
@ -855,63 +871,65 @@ func init() {
func init() { proto.RegisterFile("planetmintgo/dao/tx.proto", fileDescriptor_7117c47dbc1828c7) }
var fileDescriptor_7117c47dbc1828c7 = []byte{
// 895 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4f, 0x6f, 0xdc, 0x44,
0x14, 0x8f, 0x9b, 0x74, 0xc3, 0xbe, 0x44, 0xa4, 0x9d, 0x86, 0xd4, 0x31, 0x89, 0xbb, 0xb8, 0x55,
0xd9, 0x46, 0x74, 0x0d, 0x45, 0x42, 0x02, 0x0e, 0x88, 0x10, 0x09, 0x22, 0x61, 0x11, 0xb9, 0xe5,
0x82, 0x90, 0x22, 0x67, 0x3d, 0x78, 0x47, 0xb1, 0x3d, 0xce, 0xcc, 0x6c, 0x95, 0x8a, 0x5b, 0x3f,
0x01, 0x27, 0x4e, 0xdc, 0xb8, 0x70, 0x2c, 0x12, 0x1f, 0xa2, 0xc7, 0x8a, 0x13, 0x27, 0x54, 0x25,
0x87, 0x7e, 0x8d, 0xca, 0x33, 0xe3, 0x3f, 0xbb, 0x76, 0x76, 0xf7, 0x92, 0xcc, 0x7b, 0xbf, 0xdf,
0x7b, 0xef, 0x37, 0xf3, 0x66, 0xde, 0x1a, 0xb6, 0xb3, 0x38, 0x48, 0xb1, 0x48, 0x48, 0x2a, 0x22,
0xea, 0x86, 0x01, 0x75, 0xc5, 0xf9, 0x20, 0x63, 0x54, 0x50, 0x74, 0xa3, 0x0e, 0x0d, 0xc2, 0x80,
0x5a, 0xbd, 0x06, 0x79, 0x38, 0x0a, 0xe2, 0x18, 0xa7, 0x11, 0x56, 0x31, 0xd6, 0xdd, 0x06, 0x23,
0x5f, 0x1e, 0x33, 0x7c, 0x36, 0xc6, 0x5c, 0x68, 0xd2, 0x83, 0x06, 0x29, 0x24, 0x5c, 0x30, 0x72,
0x32, 0x16, 0x84, 0xa6, 0xc7, 0x94, 0x85, 0x98, 0x69, 0xea, 0x6e, 0x83, 0x9a, 0x05, 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d, 0x81, 0xf6,
0x64, 0x85, 0xd9, 0x8d, 0xe1, 0x05, 0x6e, 0xdd, 0x9f, 0x8e, 0x17, 0x49, 0x4f, 0x60, 0xbd, 0xbe,
0x93, 0xee, 0xcf, 0xd2, 0xa6, 0x78, 0x56, 0x6f, 0x3e, 0x5e, 0x51, 0x2c, 0x01, 0xd4, 0xb0, 0x5b,
0x3e, 0x6a, 0xcc, 0x52, 0x27, 0x5a, 0xee, 0x9c, 0xc4, 0xa2, 0xde, 0x29, 0xdc, 0x6e, 0x9a, 0xd8,
0xee, 0x1c, 0x79, 0x24, 0xf3, 0x9a, 0x26, 0x4d, 0x19, 0x44, 0xf4, 0x33, 0xac, 0x56, 0x86, 0xf0,
0xc3, 0xc6, 0x0c, 0x65, 0x8a, 0xf5, 0x60, 0x26, 0xa5, 0xc8, 0x8e, 0x61, 0xed, 0xea, 0x37, 0xc5,
0xee, 0x35, 0x3d, 0xa8, 0xb0, 0xac, 0x87, 0xf3, 0xb0, 0x8a, 0x32, 0x1e, 0x2c, 0xe7, 0x53, 0xb9,
0xdd, 0x18, 0xa8, 0x51, 0x6b, 0x77, 0x1a, 0x9a, 0xa7, 0xdb, 0xef, 0xbf, 0xbc, 0xb0, 0x8d, 0x57,
0x17, 0xb6, 0xf1, 0xfa, 0xc2, 0x36, 0x7e, 0xbb, 0xb4, 0x17, 0x5e, 0x5d, 0xda, 0x0b, 0xff, 0x5e,
0xda, 0x0b, 0x3f, 0xb9, 0x11, 0x11, 0xc3, 0xf1, 0x71, 0x6f, 0x40, 0x47, 0xee, 0x24, 0x53, 0xe9,
0xf8, 0x28, 0xa2, 0xee, 0x99, 0xfa, 0xb4, 0x3c, 0x4f, 0x31, 0x3f, 0x6e, 0xc9, 0xcf, 0xab, 0x4f,
0xdf, 0x06, 0x00, 0x00, 0xff, 0xff, 0x31, 0xb7, 0xf0, 0x33, 0x7b, 0x0a, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1550,6 +1568,20 @@ func (m *MsgDistributionResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.StrategicTxID) > 0 {
i -= len(m.StrategicTxID)
copy(dAtA[i:], m.StrategicTxID)
i = encodeVarintTx(dAtA, i, uint64(len(m.StrategicTxID)))
i--
dAtA[i] = 0x3a
}
if len(m.EarlyInvestorTxID) > 0 {
i -= len(m.EarlyInvestorTxID)
copy(dAtA[i:], m.EarlyInvestorTxID)
i = encodeVarintTx(dAtA, i, uint64(len(m.EarlyInvestorTxID)))
i--
dAtA[i] = 0x32
}
if len(m.PopTxID) > 0 {
i -= len(m.PopTxID)
copy(dAtA[i:], m.PopTxID)
@ -1976,6 +2008,14 @@ func (m *MsgDistributionResult) Size() (n int) {
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = len(m.EarlyInvestorTxID)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = len(m.StrategicTxID)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
return n
}
@ -3061,6 +3101,70 @@ func (m *MsgDistributionResult) Unmarshal(dAtA []byte) error {
}
m.PopTxID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EarlyInvestorTxID", 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.EarlyInvestorTxID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field StrategicTxID", 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.StrategicTxID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:])