Skip to content

Commit

Permalink
updated dockerfile and entrypoint to deploy l1 contracts if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
RahulBansal123 committed Dec 10, 2024
1 parent 92e3500 commit 9c336c8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ RUN foundryup
# `-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-'
FROM $BASE_IMAGE AS builder

RUN git init
RUN git submodule init
RUN git submodule update --init --recursive

WORKDIR /app

COPY . .
Expand Down
16 changes: 11 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/bin/bash

if [ "$1" = "deploy-l1" ]; then
/app/deploy-l1.sh $L1_NODE_URL
else
exec supersim "$@"
fi
L1StandardBridgeProxy=0x5C7c905B505f0Cf40Ab6600d05e677F717916F6B

# Check if L1 contracts are deployed
CODE_SIZE=$(cast code $L1StandardBridgeProxy)

if [ "${#CODE_SIZE}" -eq 0 ] || [ "$CODE_SIZE" = "0x" ]; then
echo "Deploying L1 contracts..."
/app/deploy-l1.sh "$L1_NODE_URL"
fi

exec supersim "$@"
2 changes: 1 addition & 1 deletion optimism
Submodule optimism updated 3660 files

0 comments on commit 9c336c8

Please sign in to comment.