2021-05-19 09:36:43 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Script to retrieve the enode
|
|
|
|
#
|
|
|
|
# This is copied into the validator container by Hive
|
|
|
|
# and used to provide a client-specific enode id retriever
|
|
|
|
#
|
|
|
|
|
|
|
|
# Immediately abort the script on any error encountered
|
|
|
|
set -e
|
|
|
|
|
2023-10-03 12:44:08 +00:00
|
|
|
TARGET_RESPONSE=$(curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1}' "localhost:8545" )
|
2021-05-19 09:36:43 +00:00
|
|
|
|
|
|
|
TARGET_ENODE=$(echo ${TARGET_RESPONSE}| jq -r '.result.enode')
|
|
|
|
echo "$TARGET_ENODE"
|