Skip to content

Commit b3695fc

Browse files
Filipp MakarovFilipp Makarov
authored andcommitted
chore: add skip-createx param to config
1 parent 3d6210e commit b3695fc

4 files changed

Lines changed: 143 additions & 28 deletions

File tree

.env.example

Lines changed: 124 additions & 6 deletions
Large diffs are not rendered by default.

foundry.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
# plasma-testnet = { key = "", url = "", chain = "9746"}
141141

142142
# ARC
143-
# arc-testnet = { key = "", url = "", chain = "1244"}
143+
# arc-testnet = { key = "", url = "", chain = "5042002"}
144144

145145
# SOPHON
146146
sophon-zk-testnet = { key = "", url = "https://block-explorer-api.zksync-os-testnet-sophon.zksync.dev/api", chain = "531050204"}

script/deploy/config.toml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -568,19 +568,7 @@ name = "Worldchain Sepolia"
568568
# FLUENT
569569
# ===============
570570

571-
### Fluent Testnet (20994)
572-
[20994]
573-
endpoint_url = "${RPC_20994}"
574-
575-
[20994.bool]
576-
is_testnet = true
577-
verify = true
578-
579-
[20994.uint]
580-
chain_id = 20994
581-
582-
[20994.string]
583-
name = "Fluent Testnet"
571+
## !! Fluent requires custom deployment tooling so ignored for now
584572

585573
# ===============
586574
# MONAD
@@ -650,18 +638,20 @@ name = "Plasma Testnet"
650638
# ARC
651639
# ===============
652640

653-
### Arc Testnet (1244)
654-
[1244]
655-
endpoint_url = "${RPC_1244}"
641+
### Arc Testnet (5042002)
642+
[5042002]
643+
endpoint_url = "${RPC_5042002}"
656644

657-
[1244.bool]
645+
[5042002.bool]
658646
is_testnet = true
659647
verify = true
648+
# skipping createx for this chain because pre-signed txn stucks by some reason
649+
skip_createx = true
660650

661-
[1244.uint]
662-
chain_id = 1244
651+
[5042002.uint]
652+
chain_id = 5042002
663653

664-
[1244.string]
654+
[5042002.string]
665655
name = "Arc Testnet"
666656

667657
# ===============

script/deploy/deploy-chain.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,12 @@ done
197197

198198
# Special flow for the Disperse contract
199199
## Verify if CreateX is present
200+
SKIP_CREATEX=$(awk -v id="$CHAIN_ID" '/^\['"$CHAIN_ID"'\.bool\]/{flag=1;next} /^\[/{flag=0} flag && /^skip_createx =/{gsub(/"/, "", $3); print $3}' config.toml)
201+
if [ -z "$SKIP_CREATEX" ]; then
202+
SKIP_CREATEX="false"
203+
fi
200204
CREATEX_SIZE=$(cast codesize --rpc-url $RPC_VAR $CREATEX_ADDRESS)
201-
if [ $CREATEX_SIZE -eq 0 ]; then
205+
if [ $CREATEX_SIZE -eq 0 ] && [ "$SKIP_CREATEX" = "false" ]; then
202206
log_warning "CreateX is not deployed on chain $CHAIN_ID. Deploying it..."
203207
{
204208
# estimate the gas cost of the CreateX deployment transaction
@@ -244,6 +248,9 @@ if [ $CREATEX_SIZE -eq 0 ]; then
244248
log_warning "Continuing with deployment without CreateX."
245249
log_warning "Disperse contract will not be deployed."
246250
}
251+
elif [ "$SKIP_CREATEX" = "true" ]; then
252+
log_info "CreateX is not deployed on chain $CHAIN_ID. Skipping its deployment because it is skipped in config.toml"
253+
log_info "Disperse contract will not be deployed ."
247254
else
248255
# createx has already been deployed
249256
log_info "CreateX is already deployed on chain $CHAIN_ID"

0 commit comments

Comments
 (0)