forked from cerc-io/laconicd-deprecated
chore: rename the ethermint to chibaclonk
1. rename `ethermint` to `chiba-clonk` 2. fix the `make localnet-start`
This commit is contained in:
+16
-16
@@ -1,41 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
KEY="mykey"
|
||||
CHAINID="ethermint_9000-1"
|
||||
CHAINID="chibaclonk_9000-1"
|
||||
MONIKER="localtestnet"
|
||||
|
||||
# stop and remove existing daemon and client data and process(es)
|
||||
rm -rf ~/.ethermint*
|
||||
pkill -f "ethermint*"
|
||||
rm -rf ~/.chibaclonk*
|
||||
pkill -f "chibaclonk*"
|
||||
|
||||
make build-ethermint
|
||||
make build
|
||||
|
||||
# if $KEY exists it should be override
|
||||
"$PWD"/build/ethermintd keys add $KEY --keyring-backend test --algo "eth_secp256k1"
|
||||
"$PWD"/build/chibaclonkd keys add $KEY --keyring-backend test --algo "eth_secp256k1"
|
||||
|
||||
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
|
||||
"$PWD"/build/ethermintd init $MONIKER --chain-id $CHAINID
|
||||
"$PWD"/build/chibaclonkd init $MONIKER --chain-id $CHAINID
|
||||
|
||||
# Change parameter token denominations to aphoton
|
||||
cat $HOME/.ethermint/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="stake"' > $HOME/.ethermint/config/tmp_genesis.json && mv $HOME/.ethermint/config/tmp_genesis.json $HOME/.ethermint/config/genesis.json
|
||||
cat $HOME/.ethermint/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"' > $HOME/.ethermint/config/tmp_genesis.json && mv $HOME/.ethermint/config/tmp_genesis.json $HOME/.ethermint/config/genesis.json
|
||||
cat $HOME/.ethermint/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"' > $HOME/.ethermint/config/tmp_genesis.json && mv $HOME/.ethermint/config/tmp_genesis.json $HOME/.ethermint/config/genesis.json
|
||||
cat $HOME/.ethermint/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.ethermint/config/tmp_genesis.json && mv $HOME/.ethermint/config/tmp_genesis.json $HOME/.ethermint/config/genesis.json
|
||||
cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="stake"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
|
||||
cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
|
||||
cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
|
||||
cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
|
||||
|
||||
# Allocate genesis accounts (cosmos formatted addresses)
|
||||
"$PWD"/build/ethermintd add-genesis-account "$("$PWD"/build/ethermintd keys show "$KEY" -a --keyring-backend test)" 100000000000000000000aphoton,10000000000000000000stake --keyring-backend test
|
||||
"$PWD"/build/chibaclonkd add-genesis-account "$("$PWD"/build/chibaclonkd keys show "$KEY" -a --keyring-backend test)" 100000000000000000000aphoton,10000000000000000000stake --keyring-backend test
|
||||
|
||||
# Sign genesis transaction
|
||||
"$PWD"/build/ethermintd gentx $KEY 10000000000000000000stake --amount=100000000000000000000aphoton --keyring-backend test --chain-id $CHAINID
|
||||
"$PWD"/build/chibaclonkd gentx $KEY 10000000000000000000stake --amount=100000000000000000000aphoton --keyring-backend test --chain-id $CHAINID
|
||||
|
||||
# Collect genesis tx
|
||||
"$PWD"/build/ethermintd collect-gentxs
|
||||
"$PWD"/build/chibaclonkd collect-gentxs
|
||||
|
||||
# Run this to ensure everything worked and that the genesis file is setup correctly
|
||||
"$PWD"/build/ethermintd validate-genesis
|
||||
"$PWD"/build/chibaclonkd validate-genesis
|
||||
|
||||
# Start the node (remove the --pruning=nothing flag if historical queries are not needed) in background and log to file
|
||||
"$PWD"/build/ethermintd start --pruning=nothing --rpc.unsafe --json-rpc.address="0.0.0.0:8545" --keyring-backend test > ethermintd.log 2>&1 &
|
||||
"$PWD"/build/chibaclonkd start --pruning=nothing --rpc.unsafe --json-rpc.address="0.0.0.0:8545" --keyring-backend test > ethermintd.log 2>&1 &
|
||||
|
||||
# Give ethermintd node enough time to launch
|
||||
sleep 5
|
||||
@@ -51,7 +51,7 @@ echo "$ACCT"
|
||||
# Start testcases (not supported)
|
||||
# curl -X POST --data '{"jsonrpc":"2.0","method":"personal_unlockAccount","params":["'$ACCT'", ""],"id":1}' -H "Content-Type: application/json" http://localhost:8545
|
||||
|
||||
#PRIVKEY="$("$PWD"/build/ethermintd keys export $KEY)"
|
||||
#PRIVKEY="$("$PWD"/build/chibaclonkd keys export $KEY)"
|
||||
|
||||
## need to get the private key from the account in order to check this functionality.
|
||||
cd tests/solidity/suites/basic/ && go get && go run main.go $ACCT
|
||||
|
||||
@@ -67,14 +67,14 @@ make build
|
||||
arr=()
|
||||
|
||||
init_func() {
|
||||
"$PWD"/build/ethermintd keys add $KEY"$i" --keyring-backend test --home "$DATA_DIR$i" --no-backup --algo "eth_secp256k1"
|
||||
"$PWD"/build/ethermintd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i"
|
||||
"$PWD"/build/ethermintd add-genesis-account \
|
||||
"$("$PWD"/build/ethermintd keys show "$KEY$i" --keyring-backend test -a --home "$DATA_DIR$i")" 1000000000000000000aphoton,1000000000000000000stake \
|
||||
"$PWD"/build/chibaclonkd keys add $KEY"$i" --keyring-backend test --home "$DATA_DIR$i" --no-backup --algo "eth_secp256k1"
|
||||
"$PWD"/build/chibaclonkd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i"
|
||||
"$PWD"/build/chibaclonkd add-genesis-account \
|
||||
"$("$PWD"/build/chibaclonkd keys show "$KEY$i" --keyring-backend test -a --home "$DATA_DIR$i")" 1000000000000000000aphoton,1000000000000000000stake \
|
||||
--keyring-backend test --home "$DATA_DIR$i"
|
||||
"$PWD"/build/ethermintd gentx "$KEY$i" 1000000000000000000stake --chain-id $CHAINID --keyring-backend test --home "$DATA_DIR$i"
|
||||
"$PWD"/build/ethermintd collect-gentxs --home "$DATA_DIR$i"
|
||||
"$PWD"/build/ethermintd validate-genesis --home "$DATA_DIR$i"
|
||||
"$PWD"/build/chibaclonkd gentx "$KEY$i" 1000000000000000000stake --chain-id $CHAINID --keyring-backend test --home "$DATA_DIR$i"
|
||||
"$PWD"/build/chibaclonkd collect-gentxs --home "$DATA_DIR$i"
|
||||
"$PWD"/build/chibaclonkd validate-genesis --home "$DATA_DIR$i"
|
||||
|
||||
if [[ $MODE == "pending" ]]; then
|
||||
ls $DATA_DIR$i
|
||||
@@ -104,7 +104,7 @@ init_func() {
|
||||
|
||||
start_func() {
|
||||
echo "starting ethermint node $i in background ..."
|
||||
"$PWD"/build/ethermintd start --pruning=nothing --rpc.unsafe \
|
||||
"$PWD"/build/chibaclonkd start --pruning=nothing --rpc.unsafe \
|
||||
--p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" --address tcp://$IP_ADDR:$NODE_PORT"$i" --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \
|
||||
--json-rpc.address=$IP_ADDR:$RPC_PORT"$i" \
|
||||
--json-rpc.api="eth,txpool,personal,net,debug,web3" \
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
echo "prepare genesis: Run validate-genesis to ensure everything worked and that the genesis file is setup correctly"
|
||||
./ethermintd validate-genesis --home /ethermint
|
||||
chibaclonkd validate-genesis --home /chibaclonk
|
||||
|
||||
echo "starting ethermint node $ID in background ..."
|
||||
./ethermintd start \
|
||||
--home /ethermint \
|
||||
echo "starting chibaclonk node $ID in background ..."
|
||||
chibaclonkd start \
|
||||
--home /chibaclonk \
|
||||
--keyring-backend test
|
||||
|
||||
echo "started ethermint node"
|
||||
|
||||
+9
-9
@@ -63,7 +63,7 @@ fi
|
||||
|
||||
# Compile ethermint
|
||||
echo "compiling ethermint"
|
||||
make build-ethermint
|
||||
make build
|
||||
|
||||
# PID array declaration
|
||||
arr=()
|
||||
@@ -73,24 +73,24 @@ arrcli=()
|
||||
|
||||
init_func() {
|
||||
echo "create and add new keys"
|
||||
"$PWD"/build/ethermintd keys add $KEY"$i" --home "$DATA_DIR$i" --no-backup --chain-id $CHAINID --algo "eth_secp256k1" --keyring-backend test
|
||||
"$PWD"/build/chibaclonkd keys add $KEY"$i" --home "$DATA_DIR$i" --no-backup --chain-id $CHAINID --algo "eth_secp256k1" --keyring-backend test
|
||||
echo "init Ethermint with moniker=$MONIKER and chain-id=$CHAINID"
|
||||
"$PWD"/build/ethermintd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i"
|
||||
"$PWD"/build/chibaclonkd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i"
|
||||
echo "prepare genesis: Allocate genesis accounts"
|
||||
"$PWD"/build/ethermintd add-genesis-account \
|
||||
"$("$PWD"/build/ethermintd keys show "$KEY$i" -a --home "$DATA_DIR$i" --keyring-backend test)" 1000000000000000000aphoton,1000000000000000000stake \
|
||||
"$PWD"/build/chibaclonkd add-genesis-account \
|
||||
"$("$PWD"/build/chibaclonkd keys show "$KEY$i" -a --home "$DATA_DIR$i" --keyring-backend test)" 1000000000000000000aphoton,1000000000000000000stake \
|
||||
--home "$DATA_DIR$i" --keyring-backend test
|
||||
echo "prepare genesis: Sign genesis transaction"
|
||||
"$PWD"/build/ethermintd gentx $KEY"$i" 1000000000000000000stake --keyring-backend test --home "$DATA_DIR$i" --keyring-backend test --chain-id $CHAINID
|
||||
"$PWD"/build/chibaclonkd gentx $KEY"$i" 1000000000000000000stake --keyring-backend test --home "$DATA_DIR$i" --keyring-backend test --chain-id $CHAINID
|
||||
echo "prepare genesis: Collect genesis tx"
|
||||
"$PWD"/build/ethermintd collect-gentxs --home "$DATA_DIR$i"
|
||||
"$PWD"/build/chibaclonkd collect-gentxs --home "$DATA_DIR$i"
|
||||
echo "prepare genesis: Run validate-genesis to ensure everything worked and that the genesis file is setup correctly"
|
||||
"$PWD"/build/ethermintd validate-genesis --home "$DATA_DIR$i"
|
||||
"$PWD"/build/chibaclonkd validate-genesis --home "$DATA_DIR$i"
|
||||
}
|
||||
|
||||
start_func() {
|
||||
echo "starting ethermint node $i in background ..."
|
||||
"$PWD"/build/ethermintd start --pruning=nothing --rpc.unsafe \
|
||||
"$PWD"/build/chibaclonkd start --pruning=nothing --rpc.unsafe \
|
||||
--p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" --address tcp://$IP_ADDR:$NODE_PORT"$i" --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \
|
||||
--json-rpc.address=$IP_ADDR:$RPC_PORT"$i" \
|
||||
--keyring-backend test --home "$DATA_DIR$i" \
|
||||
|
||||
Reference in New Issue
Block a user