generated from dymensionxyz/rollapp
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(local setup): update init scripts (#98)
- Loading branch information
1 parent
823dee3
commit e41b5c5
Showing
3 changed files
with
192 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,25 @@ | ||
#!/bin/bash | ||
|
||
KEYRING_PATH="$HOME/.rollapp-wasm/sequencer_keys" | ||
MAX_SEQUENCERS=5 | ||
MAX_SEQUENCERS=1 | ||
|
||
# this account must be whitelisted on the hub for permissioned deployment setup | ||
DEPLOYER="$HUB_KEY_WITH_FUNDS" | ||
DEPLOYER=${HUB_PERMISSIONED_KEY-"$HUB_KEY_WITH_FUNDS"} | ||
SEQUENCER_ADDR=$(dymd keys show sequencer --address --keyring-backend test --keyring-dir "$ROLLAPP_HOME_DIR"/sequencer_keys) | ||
|
||
if [ -z "$HUB_RPC_URL" ]; then | ||
if [ "$HUB_RPC_URL" = "" ]; then | ||
echo "HUB_RPC_URL is not set, using 'http://localhost:36657'" | ||
HUB_RPC_URL="http://localhost:36657" | ||
fi | ||
|
||
if [ -z "$HUB_CHAIN_ID" ]; then | ||
if [ "$HUB_CHAIN_ID" = "" ]; then | ||
echo "HUB_CHAIN_ID is not set, using 'dymension_100-1'" | ||
HUB_CHAIN_ID="dymension_100-1" | ||
fi | ||
|
||
# this file is generated using the scripts/settlement/generate_denom_metadata.sh | ||
DENOM_METADATA_PATH="${ROLLAPP_SETTLEMENT_INIT_DIR_PATH}/denommetadata.json" | ||
# this file is generated using the scripts/settlement/add_genesis_accounts.sh | ||
GENESIS_ACCOUNTS_PATH="${ROLLAPP_SETTLEMENT_INIT_DIR_PATH}/genesis_accounts.json" | ||
|
||
#Register rollapp | ||
set -x | ||
dymd tx rollapp create-rollapp "$ROLLAPP_CHAIN_ID" "$MAX_SEQUENCERS" '{"Addresses":[]}' \ | ||
"$DENOM_METADATA_PATH" \ | ||
--genesis-accounts-path "$GENESIS_ACCOUNTS_PATH" \ | ||
--from "$DEPLOYER" \ | ||
--keyring-backend test \ | ||
--broadcast-mode block \ | ||
--node "$HUB_RPC_URL" \ | ||
--chain-id "$HUB_CHAIN_ID" \ | ||
--fees 1dym \ | ||
-y | ||
dymd tx rollapp create-rollapp "$ROLLAPP_CHAIN_ID" "$MAX_SEQUENCERS" "{\"Addresses\":[\"${SEQUENCER_ADDR}\"]}" \ | ||
"$ROLLAPP_HOME_DIR"/init/denommetadata.json \ | ||
--genesis-accounts-path "$ROLLAPP_HOME_DIR"/init/genesis_accounts.json \ | ||
--from "$DEPLOYER" \ | ||
--keyring-backend test --broadcast-mode block \ | ||
--fees 1dym | ||
set +x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters