Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added local arb infra setup #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions infra/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# Arbitrum
#

export ARBITRUM_MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become"
export ARBITRUM_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A

#
# Binance Smart Chain
#
Expand Down
15 changes: 15 additions & 0 deletions infra/arbitrum/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:xenial

RUN apt-get update --fix-missing
RUN apt-get install --yes curl

RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get install --yes nodejs
RUN npm install -g ganache-cli

COPY run.sh /root/run.sh
RUN chmod +x /root/run.sh

EXPOSE 8565

ENTRYPOINT ["./root/run.sh"]
15 changes: 15 additions & 0 deletions infra/arbitrum/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
MNEMONIC=$1
ADDRESS=$2

ganache-cli \
-h 0.0.0.0 \
-a 105 \
-k muirGlacier \
-i 421 \
-m "$MNEMONIC" \
-p 8565 \
-u $ADDRESS \
-b 1 \
-l 60000000 \
--chainId 421
13 changes: 13 additions & 0 deletions infra/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ services:
- "${BINANCE_MNEMONIC}"
- "${BINANCE_ADDRESS}"

#
# Arbitrum
#
arbitrum:
build:
context: ./arbitrum
ports:
- "0.0.0.0:8565:8565"
entrypoint:
- "./root/run.sh"
- "${ARBITRUM_MNEMONIC}"
- "${ARBITRUM_ADDRESS}"

#
# Bitcoin
#
Expand Down