aboutsummaryrefslogtreecommitdiffstats
path: root/packages/devnet/run.sh
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-07 18:21:44 +0800
committerFabio Berger <me@fabioberger.com>2018-06-07 18:21:44 +0800
commit10478a6b2fd1f2a01597a88afde9cf582640a849 (patch)
tree3ebbb29656cf59b2547ec3c5a3c5b90ee6264483 /packages/devnet/run.sh
parentcf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78 (diff)
parente0bc01eea1c20e0afda296f331c6a475e062b59c (diff)
downloaddexon-sol-tools-10478a6b2fd1f2a01597a88afde9cf582640a849.tar
dexon-sol-tools-10478a6b2fd1f2a01597a88afde9cf582640a849.tar.gz
dexon-sol-tools-10478a6b2fd1f2a01597a88afde9cf582640a849.tar.bz2
dexon-sol-tools-10478a6b2fd1f2a01597a88afde9cf582640a849.tar.lz
dexon-sol-tools-10478a6b2fd1f2a01597a88afde9cf582640a849.tar.xz
dexon-sol-tools-10478a6b2fd1f2a01597a88afde9cf582640a849.tar.zst
dexon-sol-tools-10478a6b2fd1f2a01597a88afde9cf582640a849.zip
Merge branch 'v2-prototype' into refactor/move-spawn-switch-to-utils
* v2-prototype: (66 commits) Run prettier Remove unused variable Fix linting issues Change shouldRenderHeader prop to shouldHideHeader Get build and tests to pass typo Apply prettier Update contracts tests after rebase Apply various fixes based on PR feedback Document debug_increaseTime method and fix typo in devnet README Use an enum for ProviderType in contracts/src/utils/web3_wrapper Update contracts package README Update relevant changelogs Remove global gas estimate buffer Add Async suffix to relevant assertions Fix linter errors Update package.json and yarn.lock Update more things to work with both Geth and Ganache Small fixes and cleanup Add additional gas to calls to fillOrderNoThrow ... # Conflicts: # packages/order-watcher/src/order_watcher/order_watcher.ts # packages/react-docs/src/components/type.tsx # packages/website/ts/components/ui/lifecycle_raised_button.tsx # packages/website/ts/components/wallet/wallet.tsx
Diffstat (limited to 'packages/devnet/run.sh')
-rwxr-xr-xpackages/devnet/run.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/packages/devnet/run.sh b/packages/devnet/run.sh
new file mode 100755
index 000000000..85d223c61
--- /dev/null
+++ b/packages/devnet/run.sh
@@ -0,0 +1,42 @@
+set -e
+
+# Create log directory for Geth
+mkdir -p /var/log
+
+# Start Geth in background and redirect output to log file
+/geth \
+ --verbosity 5 \
+ --datadir node0/ \
+ --syncmode 'full' \
+ --nat none \
+ --nodiscover \
+ --port 30310 \
+ --txpool.journal '' \
+ --rpc \
+ --rpcaddr '0.0.0.0' \
+ --rpcport 8501 \
+ --rpcapi 'personal,db,eth,net,web3,txpool,miner,debug' \
+ --networkid 50 \
+ --gasprice '2000000000' \
+ --targetgaslimit '0x4c4b400000' \
+ --mine \
+ --etherbase '0xe8816898d851d5b61b7f950627d04d794c07ca37' \
+ --unlock '0xe8816898d851d5b61b7f950627d04d794c07ca37,0x5409ed021d9299bf6814279a6a1411a7e866a631,0x6ecbe1db9ef729cbe972c83fb886247691fb6beb,0xe36ea790bc9d7ab70c55260c66d52b1eca985f84,0xe834ec434daba538cd1b9fe1582052b880bd7e63,0x78dc5d2d739606d31509c31d654056a45185ecb6,0xa8dda8d7f5310e4a9e24f8eba77e091ac264f872,0x06cef8e666768cc40cc78cf93d9611019ddcb628,0x4404ac8bd8f9618d27ad2f1485aa1b2cfd82482d,0x7457d5e02197480db681d3fdf256c7aca21bdc12,0x91c987bf62d25945db517bdaa840a6c661374402' \
+ --password=node0/password.txt \
+ > /var/log/geth &
+
+# Wait for Geth to unlock the first account
+sleep 10
+
+# Send some transactions.
+# HACK(albrow): 🐉 We have to do this so that debug.setHead works correctly.
+# (Geth does not seem to like debug.setHead(0), so by sending some transactions
+# we increase the current block number beyond 0). Additionally, some tests seem
+# to break when there are fewer than 3 blocks in the chain. (We have no idea
+# why, but it was consistently reproducible).
+/geth --datadir node0/ attach --exec 'eth.sendTransaction({"from": "0x5409ED021D9299bf6814279A6A1411A7e866A631", "to": "0x84bd1cfa409cb0bb9b23b8b1a33515b4ac00a0af", "value": "0x1"})'
+/geth --datadir node0/ attach --exec 'eth.sendTransaction({"from": "0x5409ED021D9299bf6814279A6A1411A7e866A631", "to": "0x84bd1cfa409cb0bb9b23b8b1a33515b4ac00a0af", "value": "0x1"})'
+/geth --datadir node0/ attach --exec 'eth.sendTransaction({"from": "0x5409ED021D9299bf6814279A6A1411A7e866A631", "to": "0x84bd1cfa409cb0bb9b23b8b1a33515b4ac00a0af", "value": "0x1"})'
+
+# Use tail to re-attach to the log file and actually see the output.
+tail -f /var/log/geth