Skip to content

Commit 1702629

Browse files
committed
Add predeploys of Rollup factory contracts
1 parent 45f7a40 commit 1702629

File tree

6 files changed

+294
-79
lines changed

6 files changed

+294
-79
lines changed

scripts/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ RUN yarn
77
# Stage 2: Copy files and run build
88
FROM base AS pre-build
99
COPY ./*.ts ./tsconfig.json ./
10+
11+
# Stage 3: Copy resources
12+
COPY ./resources ./resources
1013
RUN echo "Intermediate image created before yarn build"
1114

12-
# Stage 3: Final build
15+
# Stage 4: Final build
1316
FROM pre-build AS final
1417
RUN yarn build
1518
ENTRYPOINT ["node", "index.js"]

scripts/config.ts

Lines changed: 82 additions & 76 deletions
Large diffs are not rendered by default.

scripts/consts.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export const l1keystore = "/home/user/l1keystore";
22
export const l1passphrase = "passphrase";
33
export const configpath = "/config";
4+
export const resourcespath = "./resources";
45
export const tokenbridgedatapath = "/tokenbridge-data";
56
// Not secure. Do not use for production purposes
67
export const l1mnemonic =

scripts/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ async function main() {
4949
validationNodeUrl: { string: true, default: "ws://validation_node:8549" },
5050
l2owner: { string: true, default: "0x3f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E" },
5151
committeeMember: { string: true, default: "not_set" },
52+
usePredeploys: { boolean: true, default: false, describe: "Whether to include predeployed contracts in the genesis allocation" },
5253
})
5354
.options(stressOptions)
5455
.command(bridgeFundsCommand)

scripts/resources/predeploys.json

Lines changed: 204 additions & 0 deletions
Large diffs are not rendered by default.

test-node.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8
88
# nitro-contract workaround for testnode
99
# 1. authorizing validator signer key since validator wallet is buggy
1010
# - gas estimation sent from 0x0000 lead to balance and permission error
11-
DEFAULT_NITRO_CONTRACTS_VERSION="v3.1.0"
11+
DEFAULT_NITRO_CONTRACTS_VERSION="v3.2.0-beta.0"
1212
DEFAULT_TOKEN_BRIDGE_VERSION="v1.2.5"
1313

1414
# Set default versions if not overriden by provided env vars
@@ -469,7 +469,7 @@ if $force_init; then
469469
docker compose run --rm --entrypoint sh geth -c "chown -R 1000:1000 /config"
470470

471471
echo == Writing geth configs
472-
run_script write-geth-genesis-config
472+
run_script write-geth-genesis-config --usePredeploys
473473

474474
if $consensusclient; then
475475
echo == Writing prysm configs

0 commit comments

Comments
 (0)