Skip to content

Commit

Permalink
chore: move vesting accounts to separate step
Browse files Browse the repository at this point in the history
  • Loading branch information
artemijspavlovs committed Mar 28, 2024
1 parent 814edc5 commit c9c7199
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,16 @@ sed -i 's/settlement_layer.*/settlement_layer = "dymension"/' ${ROLLAPP_HOME_DIR
### Update the Genesis file to include the denommetadata, genesis accounts, module account and elevated accounts

```shell
# this script automatically adds 2 vesting accounts, adjust the timestampts to your liking or remove them
sh scripts/update_genesis_file.sh
```

### Update the Genesis file to include the denommetadata, genesis accounts, module account and elevated accounts

```shell
# this script automatically adds 2 vesting accounts, adjust the timestampts to your liking or skip this step
sh scripts/add_vesting_accounts_to_genesis_file.sh
```

### Run rollapp locally

```shell
Expand Down
12 changes: 12 additions & 0 deletions scripts/add_vesting_accounts_to_genesis_file.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
rollapp_evm keys add three-year-vester --keyring-backend test
rollapp_evm add-genesis-account three-year-vester \
10000000000000000000000a${BASE_DENOM} --keyring-backend test \
--vesting-amount 10000000000000000000000a${BASE_DENOM} \
--vesting-end-time 1805902584

rollapp_evm keys add two-year-vester-after-1-week --keyring-backend test
rollapp_evm add-genesis-account two-year-vester-after-1-week \
10000000000000000000000a${BASE_DENOM} --keyring-backend test \
--vesting-amount 10000000000000000000000a${BASE_DENOM} \
--vesting-end-time 1774366584 --vesting-start-time 1711985835
14 changes: 0 additions & 14 deletions scripts/update_genesis_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,3 @@ jq '.app_state.hubgenesis.hub.hub_id = "dymension_100-1"' "$GENESIS_FILE" >"$tmp
denom_metadata=$(cat $ROLLAPP_SETTLEMENT_INIT_DIR_PATH/denommetadata.json)
jq --argjson denom_metadata "$denom_metadata" '.app_state.bank.denom_metadata = $denom_metadata' "$GENESIS_FILE" >"$tmp" && mv "$tmp" "$GENESIS_FILE"
jq --arg elevated_address "$elevated_address" '.app_state.denommetadata.params.allowed_addresses += [$elevated_address]' "$GENESIS_FILE" >"$tmp" && mv "$tmp" "$GENESIS_FILE"

# ---------------------------- add denom metadata ---------------------------- #
rollapp_evm keys add three-year-vester --keyring-backend test
rollapp_evm add-genesis-account three-year-vester \
10000000000000000000000a${DENOM} --keyring-backend test \
--vesting-amount 10000000000000000000000a${DENOM} \
--vesting-end-time 1805902584

rollapp_evm keys add two-year-vester-after-1-week --keyring-backend test

rollapp_evm add-genesis-account two-year-vester-after-1-week \
10000000000000000000000a${DENOM} --keyring-backend test \
--vesting-amount 10000000000000000000000a${DENOM} \
--vesting-end-time 1774366584 --vesting-start-time 1711985835

0 comments on commit c9c7199

Please sign in to comment.