Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
chore: update local node run script
Browse files Browse the repository at this point in the history
  • Loading branch information
kenta-mori3322 committed Apr 30, 2024
1 parent 51a1999 commit 9644662
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/local_faucet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export HOME_DIR=$(eval echo "${HOME_DIR:-"~/.ethermintd"}")
export BINARY=${BINARY:-"./build/ethermintd"}
export DENOM=${DENOM:-ainco}

export FHEVM_GO_KEYS_DIR="$HOME_DIR/keys/network-fhe-keys"

# if which binary does not exist, exit
if [ -z `which $BINARY` ]; then
echo "Ensure $BINARY is installed and in your PATH"
Expand Down Expand Up @@ -48,7 +50,8 @@ AMOUNT="1000000000000000000$DENOM" # 10**18, so 1INCO
# The `$BINARY debug addr` outputs 4 lines, the 3rd one is:
# Bech32 Acc: inco1n7g8ek2znyua9dqua554pjvkh8vysxejlsfmcp
# We extract the inco1... part
BECH32_ADDR=$($BINARY debug addr $RECIPIENT | sed -n '3 p' | sed 's/Bech32 Acc: //')
echo "BECH32_ADDR $($BINARY debug addr $RECIPIENT)"
BECH32_ADDR=$($BINARY debug addr $RECIPIENT | sed -n '5 p' | sed 's/Bech32 Acc: //')
echo "Sending $AMOUNT to $BECH32_ADDR"

$BINARY tx bank send $KEY $BECH32_ADDR $AMOUNT --gas-prices 1000000000$DENOM --yes
4 changes: 4 additions & 0 deletions scripts/node_config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[fhevm]

# Add mock functionality using trivial encrypt. DO NOT USE in production.
mock_ops_flag = true
7 changes: 7 additions & 0 deletions scripts/run_local_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export GRPC_WEB=${GRPC_WEB:-"9091"}
export ROSETTA=${ROSETTA:-"8080"}
export BLOCK_TIME=${BLOCK_TIME:-"5s"}


# if which binary does not exist, exit
if [ -z `which $BINARY` ]; then
echo "Ensure $BINARY is installed and in your PATH"
Expand All @@ -54,6 +55,12 @@ from_scratch () {
fi
rm -rf $HOME_DIR && echo "Removed $HOME_DIR"

mkdir -p $HOME_DIR/config
cp ./scripts/node_config.toml $HOME_DIR/config

mkdir -p $HOME_DIR/keys/network-fhe-keys
fhevm-tfhe-cli generate-keys -d $HOME_DIR/keys/network-fhe-keys

# reset values if not set already after whipe
set_config

Expand Down

0 comments on commit 9644662

Please sign in to comment.