-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docker for local development) (#523)
* fix(docker for local development) * Update Dockerfile * Compile contracts * Remove comment Co-authored-by: Marcelo <[email protected]>
- Loading branch information
Showing
10 changed files
with
199 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/node_modules | ||
Dockerfile |
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 |
---|---|---|
@@ -1,11 +1,14 @@ | ||
node_modules | ||
artifacts | ||
cache | ||
coverage | ||
coverage.json | ||
testdata | ||
node_modules | ||
target | ||
testdata | ||
vendor | ||
|
||
# Ignore ethashproof binaries | ||
eth2near/ethashproof/cmd/cache/cache | ||
eth2near/ethashproof/cmd/epoch/epoch | ||
eth2near/ethashproof/cmd/relayer/relayer | ||
eth2near/ethashproof/cmd/cache/cache | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/bash | ||
#!/bin/bash | ||
set -xeo pipefail | ||
|
||
./cli/index.js clean | ||
|
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,23 @@ | ||
#!/bin/bash | ||
set -xeo pipefail | ||
|
||
pip3 install nearup | ||
./cli/index.js clean | ||
./cli/index.js prepare | ||
mkdir -p ~/.near/localnet/node0 | ||
echo '{"account_id":"node0","public_key":"ed25519:7PGseFbWxvYVgZ89K1uTJKYoKetWs7BJtbyXDzfbAcqX","secret_key":"ed25519:3D4YudUQRE39Lc4JHghuB5WM8kbgDDa34mnrEP5DdTApVH81af7e2dWgNPEaiQfdJnZq1CNPp5im4Rg5b733oiMP"}' > ~/.near/localnet/node0/validator_key.json | ||
echo '{"account_id":"","public_key":"ed25519:7PGseFbWxvYVgZ89K1uTJKYoKetWs7BJtbyXDzfbAcqX","secret_key":"ed25519:3D4YudUQRE39Lc4JHghuB5WM8kbgDDa34mnrEP5DdTApVH81af7e2dWgNPEaiQfdJnZq1CNPp5im4Rg5b733oiMP"}' > ~/.near/localnet/node0/node_key.json | ||
|
||
./cli/index.js start near-node | ||
./cli/index.js start ganache | ||
sleep 10 | ||
./cli/index.js init-near-contracts | ||
./cli/index.js init-eth-ed25519 | ||
./cli/index.js init-eth-client --eth-client-lock-eth-amount 1000000000 --eth-client-lock-duration 10 | ||
./cli/index.js init-eth-prover | ||
./cli/index.js init-eth-erc20 | ||
./cli/index.js init-eth-locker | ||
./cli/index.js init-near-token-factory | ||
|
||
./cli/index.js stop near-node | ||
./cli/index.js stop ganache |
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,19 @@ | ||
#!/bin/bash | ||
set -xeo pipefail | ||
|
||
if [ -f "/root/.nearup/node.pid" ]; then | ||
rm /root/.nearup/node.pid | ||
fi | ||
|
||
if [ -f "/root/.nearup/watcher.pid" ]; then | ||
rm /root/.nearup/watcher.pid | ||
fi | ||
|
||
nearup run localnet --num-nodes 1 --binary-path ~/.rainbow/core/target/debug | ||
./cli/index.js start ganache | ||
sleep 10 | ||
./cli/index.js start eth2near-relay --metrics-port 8080 | ||
./cli/index.js start near2eth-relay --eth-master-sk 0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501201 --metrics-port 8181 | ||
./cli/index.js start bridge-watchdog --eth-master-sk 0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501202 | ||
nohup ./node_modules/.bin/http-server ~/.near/localnet/node0/ -p 9000 -d & | ||
./node_modules/.bin/pm2 logs |
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
Oops, something went wrong.