This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add second sidechain to interop examples (#8345)
* 🌱 Add second sidechain example * 💅🏻Rename sidechain one to pos-sidechain-example-one * ⚙️ Add configurations for multiple side/mainchain nodes * 🌱 Add support for cross chain transfers on example apps * 🌱 Add cross chain transfer scripts * ♻️ Update interoperability genesis assets and bump sdk version * ♻️ Bump version of SDK and update genesis-block * 🌱 Add second sidechain example * 💅🏻Rename sidechain one to pos-sidechain-example-one * ⚙️ Add configurations for multiple side/mainchain nodes * ⬆️ Bump sdk version and update genesis-blocks * ♻️ Resolve merge conflicts and update genesis block * 🌱 Add recovery plugin script * ♻️ Update recover LSK script * Add scripts and updated README * ♻️ Store storeValue with each inclusionProof * ⬆️ Bump sdk version * 🌱 Add second sidechain example * 💅🏻Rename sidechain one to pos-sidechain-example-one * ⚙️ Add configurations for multiple side/mainchain nodes * 🌱 Add cross chain transfer scripts * ♻️ Update interoperability genesis assets and bump sdk version * 🌱 Add second sidechain example * 💅🏻Rename sidechain one to pos-sidechain-example-one * ⚙️ Add configurations for multiple side/mainchain nodes * Move mainchain registration to common file * Fix typo * ♻️ Update genesisBlock * ♻️ Update genesisBlock * 🌱 Add genesis-assets for 103 validators * 💅🏻Update readme --------- Co-authored-by: Franco NG <[email protected]> Co-authored-by: Khalid Hameed <[email protected]>
- Loading branch information
1 parent
2dfa374
commit 7abc8bb
Showing
153 changed files
with
13,698 additions
and
531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/sh | ||
|
||
if ! command -v jq &> /dev/null | ||
then | ||
echo "jq Not installed in this computer." | ||
echo "Please go to https://stedolan.github.io/jq/" | ||
exit | ||
fi | ||
|
||
while [ true ] | ||
do | ||
now=$(date +"%T") | ||
echo "Captured At: $now" | ||
|
||
#mainchain 1 | ||
RESULT=$(curl --location -s 'http://127.0.0.1:7881/rpc' \ | ||
--header 'Content-Type: text/plain' \ | ||
--data '{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"method": "interoperability_getAllChainAccounts", | ||
"params": { | ||
"chainID": "00000000" | ||
} | ||
}') | ||
echo "- Mainchain_1:" | ||
echo "$(echo $RESULT | jq '.result.chains[0].name') : Height: $(echo $RESULT | jq '.result.chains[0].lastCertificate.height') | Status: $(echo $RESULT | jq '.result.chains[0].status')" | ||
echo "$(echo $RESULT | jq '.result.chains[1].name') : Height: $(echo $RESULT | jq '.result.chains[0].lastCertificate.height') | Status: $(echo $RESULT | jq '.result.chains[1].status')" | ||
|
||
#mainchain 2 | ||
RESULT=$(curl --location -s 'http://127.0.0.1:7882/rpc' \ | ||
--header 'Content-Type: text/plain' \ | ||
--data '{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"method": "interoperability_getAllChainAccounts", | ||
"params": { | ||
"chainID": "00000000" | ||
} | ||
}') | ||
echo "- Mainchain_2:" | ||
echo "$(echo $RESULT | jq '.result.chains[0].name') : Height: $(echo $RESULT | jq '.result.chains[0].lastCertificate.height') | Status: $(echo $RESULT | jq '.result.chains[0].status')" | ||
echo "$(echo $RESULT | jq '.result.chains[1].name') : Height: $(echo $RESULT | jq '.result.chains[0].lastCertificate.height') | Status: $(echo $RESULT | jq '.result.chains[1].status')" | ||
|
||
#sidechain 1 | ||
RESULT=$(curl --location -s 'http://127.0.0.1:7885/rpc' \ | ||
--header 'Content-Type: text/plain' \ | ||
--data '{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"method": "interoperability_getAllChainAccounts", | ||
"params": { | ||
"chainID": "00000000" | ||
} | ||
}') | ||
echo "- Sidechain_1:" | ||
echo "$(echo $RESULT | jq '.result.chains[0].name') : Height: $(echo $RESULT | jq '.result.chains[0].lastCertificate.height') | Status: $(echo $RESULT | jq '.result.chains[0].status')" | ||
|
||
#sidechain 2 | ||
RESULT=$(curl --location -s 'http://127.0.0.1:7886/rpc' \ | ||
--header 'Content-Type: text/plain' \ | ||
--data '{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"method": "interoperability_getAllChainAccounts", | ||
"params": { | ||
"chainID": "00000000" | ||
} | ||
}') | ||
echo "- Sidechain 2:" | ||
echo "$(echo $RESULT | jq '.result.chains[0].name') : Height: $(echo $RESULT | jq '.result.chains[0].lastCertificate.height') | Status: $(echo $RESULT | jq '.result.chains[0].status')" | ||
|
||
echo "=====================================" | ||
sleep 5; | ||
done |
Oops, something went wrong.