From ebd0d158f2d9f4a277021c69d6a0b18ff7660d3f Mon Sep 17 00:00:00 2001 From: Solovyov1796 Date: Fri, 21 Jun 2024 09:36:32 +0800 Subject: [PATCH] update localtestnet script, add dynamic timestamp for vesting account --- localtestnet.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/localtestnet.sh b/localtestnet.sh index a5137590..2c1040f0 100755 --- a/localtestnet.sh +++ b/localtestnet.sh @@ -66,9 +66,12 @@ userKeyName="user" printf "$userMnemonic\n" | $BINARY keys add $userKeyName --eth --recover $BINARY add-genesis-account $userKeyName 1000000000000000000000ua0gi +VESTING_ACCOUNT_START_TIME=$(date -u +%s) +VESTING_ACCOUNT_END_TIME=$((VESTING_ACCOUNT_START_TIME + 30 * 60)) + vestingKeyName="vesting" printf "$vestingMnemonic\n" | $BINARY keys add $vestingKeyName --eth --recover -$BINARY add-genesis-account $vestingKeyName 1000000000000000000000ua0gi --vesting-amount 1000000000000000000000ua0gi --vesting-start-time 1717200000 --vesting-end-time 1719791999 +$BINARY add-genesis-account $vestingKeyName 1000000000000000000000ua0gi --vesting-amount 1000000000000000000000ua0gi --vesting-start-time $VESTING_ACCOUNT_START_TIME --vesting-end-time $VESTING_ACCOUNT_END_TIME storageContractAcc="0g1vsjpjgw8p5f4x0nwp8ernl9lkszewcqqss7r5d" $BINARY add-genesis-account $storageContractAcc 1000000000000000000000ua0gi