Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Commit eb0109d

Browse files
committed
updates
1 parent af44f9f commit eb0109d

12 files changed

+151
-9
lines changed

Dockerfile

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ COPY package.json ./
88

99
COPY yarn.lock ./
1010

11-
RUN yarn install
11+
ADD src/ ./src
12+
ADD config/ ./config
13+
ADD patches/ ./patches
14+
ADD scripts/ ./scripts
15+
ADD public/ ./public
16+
ADD docs/ ./docs
1217

13-
COPY . .
18+
RUN yarn install
1419

1520
EXPOSE 3000
1621

boba_ops/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ Add users:
22
docker exec -it boba_ops-safe-transaction-service-1 python manage.py createsuperuser
33

44
Add chain:
5+
./load_chain
6+
<!-- Add chain:
57
http://localhost:8001/admin/chains/chain/add/
68
79
Add master records:
8-
http://localhost:8000/admin/history/safemastercopy/add/
10+
http://localhost:8000/admin/history/safemastercopy/add/ -->

boba_ops/boba_chains.json

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[
2+
{
3+
"model": "chains.chain",
4+
"pk": 288,
5+
"fields": {
6+
"relevance": 1,
7+
"name": "Boba",
8+
"short_name": "boba",
9+
"description": "Boba Network",
10+
"l2": true,
11+
"rpc_authentication": "API_KEY_PATH",
12+
"rpc_uri": "https://mainnet.boba.network/",
13+
"safe_apps_rpc_authentication": "NO_AUTHENTICATION",
14+
"safe_apps_rpc_uri": "https://mainnet.boba.network/",
15+
"block_explorer_uri_address_template": "https://blockexplorer.boba.network/address/{{address}}",
16+
"block_explorer_uri_tx_hash_template": "https://blockexplorer.boba.network/tx/{{txHash}}",
17+
"currency_name": "Ether",
18+
"currency_symbol": "ETH",
19+
"currency_decimals": 18,
20+
"currency_logo_uri": "chains/1/currency_logo.png",
21+
"transaction_service_uri": "http://nginx-safe-transaction-service:8000",
22+
"vpc_transaction_service_uri": "http://nginx-safe-transaction-service:8000",
23+
"theme_text_color": "#001428",
24+
"theme_background_color": "#E8E7E6",
25+
"recommended_master_copy_version": "1.3.0"
26+
}
27+
},
28+
{
29+
"model": "chains.chain",
30+
"pk": 28,
31+
"fields": {
32+
"relevance": 2,
33+
"name": "Boba Rinkeby",
34+
"short_name": "boba_rinkeby",
35+
"description": "Boba Network Rinkeby",
36+
"l2": true,
37+
"rpc_authentication": "NO_AUTHENTICATION",
38+
"rpc_uri": "https://rinkeby.boba.network",
39+
"safe_apps_rpc_authentication": "NO_AUTHENTICATION",
40+
"safe_apps_rpc_uri": "https://rinkeby.boba.network",
41+
"block_explorer_uri_address_template": "https://blockexplorer.rinkeby.boba.network/address/{{address}}",
42+
"block_explorer_uri_tx_hash_template": "https://blockexplorer.rinkeby.boba.network/tx/{{txHash}}",
43+
"currency_name": "Ether",
44+
"currency_symbol": "ETH",
45+
"currency_decimals": 18,
46+
"currency_logo_uri": "chains/1/currency_logo.png",
47+
"transaction_service_uri": "http://nginx-safe-transaction-service:8000",
48+
"vpc_transaction_service_uri": "http://nginx-safe-transaction-service:8000",
49+
"theme_text_color": "#ffffff",
50+
"theme_background_color": "#E8673C",
51+
"recommended_master_copy_version": "1.3.0"
52+
}
53+
}
54+
]

boba_ops/build-ci.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DOCKER_BUILDKIT=1
2+
COMPOSE_DOCKER_CLI_BUILD=1
3+
docker-compose build -- safe-react safe-config-service safe-client-gateway safe-transaction-service

boba_ops/create_user

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
set -eo pipefail
4+
docker exec -it boba_ops-safe-transaction-service-1 python manage.py createsuperuser

boba_ops/docker-compose.yml

+17-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ services:
6262
- "8888:8888"
6363
volumes:
6464
- nginx-shared:/nginx
65+
restart: always
6566
command: ./docker/web/run_web.sh
6667

6768
worker: &worker
@@ -74,6 +75,7 @@ services:
7475
depends_on:
7576
- db
7677
- redis
78+
restart: always
7779
command: ./docker/web/celery/worker/run.sh
7880

7981
scheduler:
@@ -107,4 +109,18 @@ services:
107109
env_file:
108110
- envs/.env_safe_config_service
109111
depends_on:
110-
- db
112+
- db
113+
114+
safe-react:
115+
image: bobanetwork/safe-react
116+
build:
117+
context: ../
118+
dockerfile: ./Dockerfile
119+
env_file:
120+
- envs/.env_safe_react
121+
volumes:
122+
- /app/node_modules
123+
- ../:/app
124+
restart: always
125+
ports:
126+
- 3000:3000

boba_ops/envs/.env_safe_client_gateway

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ CHAIN_INFO_REQUEST_TIMEOUT=15000
5757

5858
# Exchange rate API: https://exchangeratesapi.io/
5959
EXCHANGE_API_BASE_URI=http://api.exchangeratesapi.io/latest
60-
EXCHANGE_API_KEY=your_exchange_rate_api_token
60+
EXCHANGE_API_KEY=

boba_ops/envs/.env_safe_transaction_service

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ ETHEREUM_TRACING_NODE_URL=https://rinkeby.boba.network
99
ETH_L2_NETWORK=1
1010
REDIS_URL=redis://redis:6379/0
1111
CELERY_BROKER_URL=redis://redis:6379/1
12+
DJANGO_ALLOWED_HOSTS="localhost,0.0.0.0,127.0.0.1,*,172.22.0.9"

boba_ops/load_chain

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -eo pipefail
4+
docker compose cp boba_chains.json safe-config-service:/tmp/boba_chains.json
5+
./run manage loaddata /tmp/boba_chains.json

boba_ops/run

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env bash
2+
3+
set -eo pipefail
4+
5+
DC="${DC:-exec}"
6+
7+
# If we're running in CI we need to disable TTY allocation for docker-compose
8+
# commands that enable it by default, such as exec and run.
9+
TTY=""
10+
if [[ ! -t 1 ]]; then
11+
TTY="-T"
12+
fi
13+
14+
# -----------------------------------------------------------------------------
15+
# Helper functions start with _ and aren't listed in this script's help menu.
16+
# -----------------------------------------------------------------------------
17+
18+
function _dc {
19+
docker-compose "${DC}" ${TTY} "${@}"
20+
}
21+
22+
# -----------------------------------------------------------------------------
23+
24+
function cmd {
25+
# Run any command you want in the safe-config-service container
26+
_dc safe-config-service "${@}"
27+
}
28+
29+
function manage {
30+
# Run any manage.py commands
31+
32+
# We need to collectstatic before we run our tests.
33+
if [ "${1-''}" == "test" ]; then
34+
cmd python src/manage.py collectstatic --no-input
35+
fi
36+
37+
cmd python src/manage.py "${@}"
38+
}
39+
40+
function help {
41+
printf "%s <task> [args]\n\nTasks:\n" "${0}"
42+
43+
compgen -A function | grep -v "^_" | cat -n
44+
45+
printf "\nExtended help:\n Each task has comments for general usage\n"
46+
}
47+
48+
# This idea is heavily inspired by: https://github.com/adriancooney/Taskfile
49+
TIMEFORMAT=$'\nTask completed in %3lR'
50+
time "${@:-help}"

src/config/networks/boba.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ import {
99
} from 'src/config/networks/network.d'
1010

1111
const baseConfig: EnvironmentSettings = {
12-
clientGatewayUrl: 'http://127.0.0.1:8000/v1',
13-
txServiceUrl: 'http://127.0.0.1:8001/api/v1',
14-
safeUrl: 'http://localhost:3000/app',
12+
//this is the frontend2backend url
13+
clientGatewayUrl: 'http://127.0.0.1:8002/v1',
14+
txServiceUrl: 'http://127.0.0.1:8000/api/v1',
15+
safeUrl: 'http://gnosis-safe.mainnet.boba:3000/app',
1516
gasPriceOracles: [
1617
{
1718
url: 'https://mainnet.boba.network/',

src/config/networks/boba_rinkeby.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ import {
99
} from 'src/config/networks/network.d'
1010

1111
const baseConfig: EnvironmentSettings = {
12+
//this is the frontend2backend url
1213
clientGatewayUrl: 'http://127.0.0.1:8002/v1',
1314
txServiceUrl: 'http://127.0.0.1:8000/api/v1',
14-
safeUrl: 'http://localhost:3000/app',
15+
safeUrl: 'http://gnosis-safe.rinkeby.boba:3000/app',
1516
gasPriceOracles: [
1617
{
1718
url: 'https://rinkeby.boba.network/',

0 commit comments

Comments
 (0)