mirror of
https://github.com/logos-messaging/logos-messaging-simulator.git
synced 2026-01-04 06:53:08 +00:00
read keys from foundry config and write to shared file
This commit is contained in:
parent
82267811f8
commit
00e8d65ba8
@ -21,11 +21,14 @@ services:
|
||||
--port=8545
|
||||
--host=0.0.0.0
|
||||
--chain-id=1337
|
||||
--accounts=1
|
||||
--accounts=${NUM_NWAKU_NODES:-5}
|
||||
--allow-origin=*
|
||||
--block-time=12
|
||||
--silent
|
||||
--config-out=anvil-config.txt
|
||||
volumes:
|
||||
- privatekeys-volume:/shared
|
||||
- ./getPrivateKeys.sh:/getPrivateKeys.sh
|
||||
networks:
|
||||
- simulation
|
||||
|
||||
@ -216,4 +219,7 @@ services:
|
||||
- redis
|
||||
- foundry
|
||||
networks:
|
||||
- simulation
|
||||
- simulation
|
||||
|
||||
volumes:
|
||||
privatekeys-volume:
|
||||
15
getPrivateKeys.sh
Normal file
15
getPrivateKeys.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Install json parser
|
||||
apk update
|
||||
apk add jq
|
||||
|
||||
# Read the JSON file
|
||||
json_content=$(cat anvil-config.txt)
|
||||
|
||||
# Extract private_keys array values using jq
|
||||
private_keys=$(echo "$json_content" | jq -r '.private_keys[]')
|
||||
|
||||
# Write private keys to a new file for easier access
|
||||
echo "Writing private keys to file"
|
||||
echo "$private_keys" > /shared/private-keys.txt
|
||||
Loading…
x
Reference in New Issue
Block a user