From 4aa25c1f4ff9a2d3c891bd0b56f7ac58060c76bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Bl=C3=A4cker?= <d.blaecker@gmail.com>
Date: Mon, 25 Nov 2024 16:32:02 +0700
Subject: [PATCH] skips syncdexs script for testnets

---
 script/tasks/diamondSyncDEXs.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/script/tasks/diamondSyncDEXs.sh b/script/tasks/diamondSyncDEXs.sh
index 55cca535e..de0fc38ee 100755
--- a/script/tasks/diamondSyncDEXs.sh
+++ b/script/tasks/diamondSyncDEXs.sh
@@ -49,6 +49,16 @@ function diamondSyncDEXs {
 
   # go through all networks and execute the script
   for NETWORK in "${NETWORKS[@]}"; do
+
+    # Skip for localanvil or any testnet
+    if [[ "$NETWORK" == "localanvil" || \
+          "$NETWORK" == "bsc-testnet" || \
+          "$NETWORK" == "lineatest" || \
+          "$NETWORK" == "mumbai" || \
+          "$NETWORK" == "sepolia" ]]; then
+        continue
+    fi
+
     # get diamond address from deployments script
     DIAMOND_ADDRESS=$(getContractAddressFromDeploymentLogs "$NETWORK" "$ENVIRONMENT" "$DIAMOND_CONTRACT_NAME")