diff --git a/.gitignore b/.gitignore index d1e18c6..9c01453 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,5 @@ src/contracts # env .env config.*.yaml -!config.example.yaml \ No newline at end of file +!config.example.yaml +*.keystore \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index f7ddd52..f8b1a09 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -46,6 +46,7 @@ services: - NODE_ENV=${NODE_ENV} - REDIS_HOST=redis - SPY_HOST=spy + - RELAYER_PRIVATE_KEY=${RELAYER_PRIVATE_KEY} expose: - ${RELAYER_PORT}:${RELAYER_PORT} container_name: relayer diff --git a/scripts/start-docker-keystore.sh b/scripts/start-docker-keystore.sh new file mode 100755 index 0000000..ffbdac2 --- /dev/null +++ b/scripts/start-docker-keystore.sh @@ -0,0 +1,4 @@ +#!/bin/bash +PRIVATE_KEY_RESPONSE=$(cast wallet decrypt-keystore --keystore-dir ./ $NODE_ENV.keystore) || exit 1 +RELAYER_PRIVATE_KEY="${PRIVATE_KEY_RESPONSE: -66}" +RELAYER_PRIVATE_KEY="$RELAYER_PRIVATE_KEY" docker compose up -d