From 1870de479ac70490a9533ddba32139c89a3857df Mon Sep 17 00:00:00 2001 From: allthatjazzleo Date: Sat, 25 Sep 2021 17:55:43 +0800 Subject: [PATCH 1/3] allow vest portion of allocated fund in account --- pystarport/cluster.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pystarport/cluster.py b/pystarport/cluster.py index 09d053a..de57412 100644 --- a/pystarport/cluster.py +++ b/pystarport/cluster.py @@ -707,10 +707,12 @@ def create_account(cli, account, use_ledger=False): seconds=durations.Duration(vesting).to_seconds() ) vend = int(end_time.timestamp()) + # allow vest only some of coins allocated, where account["coins"] must larger than account["vesting_coins"] if any vesting_coins specified in config.yaml. + vesting_amount = account.get("vesting_coins", account["coins"]) cli.add_genesis_account( acct["address"], account["coins"], - vesting_amount=account["coins"], + vesting_amount=vesting_amount, vesting_end_time=vend, ) return acct From dd9037ef478deb95bccd178402e15ae45459b08c Mon Sep 17 00:00:00 2001 From: allthatjazzleo Date: Sat, 25 Sep 2021 17:58:46 +0800 Subject: [PATCH 2/3] update README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d531e7e..4b95fdb 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ chainmaind: coins: 200cro - name: reserve coins: 200cro + vesting_coins: 100cro # if not provided, the all of coins will be vested vesting: "1d" - name: launch coins: 100cro From 656fb0ce043799c033c4cfd524ede628472d90da Mon Sep 17 00:00:00 2001 From: allthatjazzleo Date: Sat, 25 Sep 2021 18:04:10 +0800 Subject: [PATCH 3/3] update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fb6262..251ac2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- [29](https://github.com/crypto-com/pystarport/pull/29) Allow vesting portion of the allocated fund in account - [28](https://github.com/crypto-com/pystarport/pull/28) Support overwrite default relayer config with configs used to setup chains - [13](https://github.com/crypto-com/pystarport/issues/13) Support configure start command flags - [19](https://github.com/crypto-com/pystarport/issues/19) Support `config` to patch `config.toml` for each validator