Skip to content

Commit

Permalink
started adding a yachli example and taskfile
Browse files Browse the repository at this point in the history
Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon committed Jan 9, 2025
1 parent ed6527b commit 329a328
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Taskfile.helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ tasks:
- |
if [[ "{{ .use_port_forwards }}" == "true" ]];then
echo "Enable port forwarding for Hedera Node"
kubectl port-forward -n "${SOLO_NAMESPACE}" svc/haproxy-node1-svc 50211:50211 &
nohup kubectl port-forward -n "${SOLO_NAMESPACE}" svc/haproxy-node1-svc 50211:50211 &
sleep 4
fi
Expand All @@ -221,7 +221,7 @@ tasks:
- |
if [[ "{{ .use_port_forwards }}" == "true" ]];then
echo "Enable port forwarding for Hedera JSON RPC Relay"
kubectl port-forward -n "${SOLO_NAMESPACE}" svc/relay-node1-hedera-json-rpc-relay 7546:7546 &
nohup kubectl port-forward -n "${SOLO_NAMESPACE}" svc/relay-node1-hedera-json-rpc-relay 7546:7546 &
sleep 4
fi
Expand Down Expand Up @@ -391,8 +391,8 @@ tasks:
- |
if [[ "{{ .use_port_forwards }}" == "true" ]];then
echo "Enable port forwarding for Hedera Explorer & Mirror Node Network"
kubectl port-forward -n "${SOLO_NAMESPACE}" svc/hedera-explorer 8080:80 &
kubectl port-forward svc/mirror-grpc -n "${SOLO_NAMESPACE}" 5600:5600 &
nohup kubectl port-forward -n "${SOLO_NAMESPACE}" svc/hedera-explorer 8080:80 &
nohup kubectl port-forward svc/mirror-grpc -n "${SOLO_NAMESPACE}" 5600:5600 &
sleep 4
fi
Expand Down
3 changes: 3 additions & 0 deletions examples/address-book/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output/
syserr.log
/localhost/sysfiles/addressBook.json
Empty file added examples/address-book/README.md
Empty file.
31 changes: 31 additions & 0 deletions examples/address-book/Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: 3
tasks:
verify:port:forwarding:
# silent: true
desc: verify that port forwarding is working
cmds:
- |
export PORT_FORWARDING=$(ps -ef | grep 50211 | grep -v grep)
if [[ "${PORT_FORWARDING}" != "" ]]; then
echo "found existing port forwarding for 50211"
else
echo "Port forwarding is not working"
fi
get:ledger:addressbook:
# silent: true
desc: retrieve the address book from the ledger
cmds:
- java -jar yahcli.jar --verbose=DEBUG -n localhost -p 2 sysfiles download address-book

update:ledger:addressbook:
# silent: true
desc: update the address book on the ledger
cmds:
- java -jar yahcli.jar --verbose=DEBUG -n localhost -p 2 sysfiles upload address-book

get:mirror:addressbook:
# silent: true
desc: retrieve the address book from the mirror node
cmds:
- echo "not implemented"
6 changes: 6 additions & 0 deletions examples/address-book/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
defaultNetwork: localhost
networks:
localhost:
allowedReceiverAccountIds: []
nodes:
- { id: 0, account: 3, ipv4Addr: 127.0.0.1 }
1 change: 1 addition & 0 deletions examples/address-book/localhost/keys/account2.pass
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
swirlds
7 changes: 7 additions & 0 deletions examples/address-book/localhost/keys/account2.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIHDMH8GCSqGSIb3DQEFDTByMFEGCSqGSIb3DQEFDDBEBDAqNosoP7Vz+faodhk1
2N4Lykgs3AjiaZws0sajodGNLax8pG0FIFarGWtJyRPSKvgCAicQMAwGCCqGSIb3
DQIKBQAwHQYJYIZIAWUDBAEqBBC6ckCkLqfdzlIynrvwtracBECvr1K4KI1PWJ5z
YY7WKfjy57ffuuQ2GlNZUrp6yylRlRPGqZ015XT2Cbph6sZNE4xwn0NMxGp7Wf2f
j0A8/Il/
-----END ENCRYPTED PRIVATE KEY-----
1 change: 1 addition & 0 deletions examples/address-book/localhost/keys/account55.pass
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
myOHiYnunypq
7 changes: 7 additions & 0 deletions examples/address-book/localhost/keys/account55.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIHDMH8GCSqGSIb3DQEFDTByMFEGCSqGSIb3DQEFDDBEBDAAjYrJqdRn+yhHliur
S1x8C89N3CTmjwLsB6C5n2fLs8oaB+7SpgDBkWibsrlc8+ACAicQMAwGCCqGSIb3
DQIKBQAwHQYJYIZIAWUDBAEqBBCRaztcTLabmkKgzlaF4vP9BEBb9fqmaZXq86dr
SnlCMX1xu5+zz0sJIYTT9oV4tVvqeW+CLT8FdReh3Zu86T6IoGN4sCU9C/FmyhOZ
JZlpLoFO
-----END ENCRYPTED PRIVATE KEY-----
Binary file added examples/address-book/yahcli.jar
Binary file not shown.

0 comments on commit 329a328

Please sign in to comment.