-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use no-market for the orchestrator runner * new scripts to deploy contract and run the runner from eth remove node
- Loading branch information
1 parent
eeccb77
commit 36ab867
Showing
6 changed files
with
142 additions
and
10 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
Binary file modified
BIN
+16 Bytes
(100%)
deploy/single-node-runner-rinkeby/client/linux/gbt
100644 → 100755
Binary file not shown.
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
59 changes: 59 additions & 0 deletions
59
deploy/single-node-runner-rinkeby/scripts/deploy-contractrun-with-remote-eth.sh
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,59 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
echo "running onomy with bridge" | ||
|
||
# Initial dir | ||
CURRENT_WORKING_DIR=$(pwd) | ||
# Name of the network to bootstrap | ||
CHAINID="onomy" | ||
# Name of the onomy artifact | ||
ONOMY=onomyd | ||
# The name of the onomy node | ||
ONOMY_NODE_NAME="onomy" | ||
# The prefix for cosmos addresses | ||
ONOMY_ADDRESS_PREFIX="onomy" | ||
# The address to run onomy node | ||
ONOMY_HOST="0.0.0.0" | ||
# The port of the onomy gRPC | ||
ONOMY_GRPC_PORT="9090" | ||
# Home folder for onomy config | ||
ONOMY_HOME="$CURRENT_WORKING_DIR/$CHAINID/$ONOMY_NODE_NAME" | ||
# Home flag for home folder | ||
ONOMY_HOME_FLAG="--home $ONOMY_HOME" | ||
# Onomy mnemonic used for fauset from (validator_key.json file) | ||
ONOMY_VALIDATOR_MNEMONIC=$(jq -r .mnemonic $ONOMY_HOME/validator_key.json) | ||
|
||
# The ETH key used for orchestrator signing of the transactions | ||
ETH_ORCHESTRATOR_PRIVATE_KEY=c40f62e75a11789dbaf6ba82233ce8a52c20efb434281ae6977bb0b3a69bf709 | ||
|
||
# ------------------ Run onomy ------------------ | ||
|
||
echo "Starting $ONOMY_NODE_NAME" | ||
$ONOMY $ONOMY_HOME_FLAG start --pruning=nothing & | ||
|
||
echo "Waiting $ONOMY_NODE_NAME to launch gRPC $ONOMY_GRPC_PORT..." | ||
|
||
while ! timeout 1 bash -c "</dev/tcp/$ONOMY_HOST/$ONOMY_GRPC_PORT"; do | ||
sleep 1 | ||
done | ||
|
||
echo "$ONOMY_NODE_NAME launched" | ||
|
||
#-------------------- Deploy the contract -------------------- | ||
|
||
echo "Deploying Gravity contract" | ||
cd /root/home/solidity | ||
|
||
contract-deployer \ | ||
--cosmos-node="http://$ONOMY_HOST:26657" \ | ||
--eth-node="$ETH_ADDRESS" \ | ||
--eth-privkey="$ETH_ORCHESTRATOR_PRIVATE_KEY" \ | ||
--contract=Gravity.json \ | ||
--test-mode=false | grep "Gravity deployed at Address" | grep -Eow '0x[0-9a-fA-F]{40}' >> $GRAVITY_HOME/eth_contract_address | ||
|
||
CONTRACT_ADDRESS=$(cat $GRAVITY_HOME/eth_contract_address) | ||
|
||
echo "Contract address: $CONTRACT_ADDRESS" | ||
|
||
|
65 changes: 65 additions & 0 deletions
65
deploy/single-node-runner-rinkeby/scripts/run-with-remote-eth.sh
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,65 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
echo "running onomy with bridge" | ||
|
||
# Initial dir | ||
CURRENT_WORKING_DIR=$(pwd) | ||
# Name of the network to bootstrap | ||
CHAINID="onomy" | ||
# Name of the onomy artifact | ||
ONOMY=onomyd | ||
# The name of the onomy node | ||
ONOMY_NODE_NAME="onomy" | ||
# The prefix for cosmos addresses | ||
ONOMY_ADDRESS_PREFIX="onomy" | ||
# The address to run onomy node | ||
ONOMY_HOST="0.0.0.0" | ||
# The port of the onomy gRPC | ||
ONOMY_GRPC_PORT="9090" | ||
# Home folder for onomy config | ||
ONOMY_HOME="$CURRENT_WORKING_DIR/$CHAINID/$ONOMY_NODE_NAME" | ||
# Home flag for home folder | ||
ONOMY_HOME_FLAG="--home $ONOMY_HOME" | ||
# Onomy mnemonic used for orchestrator signing of the transactions (orchestrator_key.json file) | ||
ONOMY_ORCHESTRATOR_MNEMONIC=$(jq -r .mnemonic $ONOMY_HOME/orchestrator_key.json) | ||
# Onomy mnemonic used for fauset from (validator_key.json file) | ||
ONOMY_VALIDATOR_MNEMONIC=$(jq -r .mnemonic $ONOMY_HOME/validator_key.json) | ||
|
||
# Onomy chain demons | ||
STAKE_DENOM="nom" | ||
|
||
# The ETH key used for orchestrator signing of the transactions | ||
ETH_ORCHESTRATOR_PRIVATE_KEY=c40f62e75a11789dbaf6ba82233ce8a52c20efb434281ae6977bb0b3a69bf709 | ||
|
||
ETH_CONTRACT_ADDRESS=0x8A0814b7251138Dea19054425D0dfF0C497305d3 | ||
|
||
# ------------------ Run onomy ------------------ | ||
|
||
echo "Starting $ONOMY_NODE_NAME" | ||
$ONOMY $ONOMY_HOME_FLAG start --pruning=nothing & | ||
|
||
echo "Waiting $ONOMY_NODE_NAME to launch gRPC $ONOMY_GRPC_PORT..." | ||
|
||
while ! timeout 1 bash -c "</dev/tcp/$ONOMY_HOST/$ONOMY_GRPC_PORT"; do | ||
sleep 1 | ||
done | ||
|
||
echo "$ONOMY_NODE_NAME launched" | ||
|
||
# ------------------ Run fauset ------------------ | ||
|
||
echo "Starting fauset based on validator account" | ||
faucet -cli-name=$ONOMY -mnemonic="$ONOMY_VALIDATOR_MNEMONIC" & | ||
|
||
#-------------------- Run orchestrator -------------------- | ||
|
||
echo "Starting orchestrator" | ||
|
||
gbt --address-prefix="$ONOMY_ADDRESS_PREFIX" orchestrator \ | ||
--cosmos-phrase="$ONOMY_ORCHESTRATOR_MNEMONIC" \ | ||
--ethereum-key="$ETH_ORCHESTRATOR_PRIVATE_KEY" \ | ||
--cosmos-grpc="http://$ONOMY_HOST:$ONOMY_GRPC_PORT/" \ | ||
--ethereum-rpc="$ETH_ADDRESS" \ | ||
--fees="1$STAKE_DENOM" \ | ||
--gravity-contract-address="$ETH_CONTRACT_ADDRESS" |
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