diff --git a/.env.example b/.env.example index 29ca43c32..73edc3aa1 100644 --- a/.env.example +++ b/.env.example @@ -95,6 +95,18 @@ ZKEVM_ETHERSCAN_URL=https://api-zkevm.polygonscan.com/api ZKEVM_ETHERSCAN_KEY=PasteYourOwnKeyPlease # TESTNET CHAINS +# Arbitrum Sepolia +ARB_SEPOLIA_API=https://arbitrum-sepolia.blockpi.network/v1/rpc/public +ARB_SEPOLIA_ETHERSCAN_URL=https://api-sepolia.arbiscan.io/api +ARB_SEPOLIA_ETHERSCAN_KEY=YourArbiScanKey +# Base Sepolia +BASE_SEPOLIA_API=https://base-sepolia.blockpi.network/v1/rpc/public +BASE_SEPOLIA_ETHERSCAN_URL=https://api-sepolia.basescan.org/api +BASE_SEPOLIA_ETHERSCAN_KEY=YourBaseScanKey +# BNB Testnet +BNB_TESTNET_API=https://bsc-testnet.blockpi.network/v1/rpc/public +BNB_TESTNET_ETHERSCAN_URL=https://api-testnet.bscscan.com/api +BNB_TESTNET_ETHERSCAN_KEY=YourBscScanKey # Ethereum Sepolia ETH_SEPOLIA_API=https://rpc.sepolia.org ETH_SEPOLIA_ETHERSCAN_URL=https://api-sepolia.etherscan.io/api @@ -103,3 +115,7 @@ ETH_SEPOLIA_ETHERSCAN_KEY=YourEtherScanKey OP_SEPOLIA_API=https://optimism-sepolia.blockpi.network/v1/rpc/public OP_SEPOLIA_ETHERSCAN_URL=https://api-sepolia-optimistic.etherscan.io/api OP_SEPOLIA_ETHERSCAN_KEY=YourOptimismEtherScanKey +# Scroll Sepolia +SCROLL_SEPOLIA_API=https://scroll-sepolia.blockpi.network/v1/rpc/public +SCROLL_SEPOLIA_ETHERSCAN_URL=https://api-sepolia.scrollscan.com/api +SCROLL_SEPOLIA_ETHERSCAN_KEY=YourScrollScanKey diff --git a/deployments/arb_sepolia/.chainId b/deployments/arb_sepolia/.chainId new file mode 100644 index 000000000..71ba4d632 --- /dev/null +++ b/deployments/arb_sepolia/.chainId @@ -0,0 +1 @@ +421614 \ No newline at end of file diff --git a/deployments/arb_sepolia/Create2Factory.json b/deployments/arb_sepolia/Create2Factory.json new file mode 100644 index 000000000..66ac39a50 --- /dev/null +++ b/deployments/arb_sepolia/Create2Factory.json @@ -0,0 +1,4 @@ +{ + "address": "0xa6190aBC82427800935E0598892f7488a7F73A04", + "constructorArgs": "0x" +} \ No newline at end of file diff --git a/deployments/base_sepolia/.chainId b/deployments/base_sepolia/.chainId new file mode 100644 index 000000000..667f99daf --- /dev/null +++ b/deployments/base_sepolia/.chainId @@ -0,0 +1 @@ +84532 \ No newline at end of file diff --git a/deployments/base_sepolia/Create2Factory.json b/deployments/base_sepolia/Create2Factory.json new file mode 100644 index 000000000..66ac39a50 --- /dev/null +++ b/deployments/base_sepolia/Create2Factory.json @@ -0,0 +1,4 @@ +{ + "address": "0xa6190aBC82427800935E0598892f7488a7F73A04", + "constructorArgs": "0x" +} \ No newline at end of file diff --git a/deployments/bnb_testnet/.chainId b/deployments/bnb_testnet/.chainId new file mode 100644 index 000000000..c4fbb1cfa --- /dev/null +++ b/deployments/bnb_testnet/.chainId @@ -0,0 +1 @@ +97 \ No newline at end of file diff --git a/deployments/bnb_testnet/Create2Factory.json b/deployments/bnb_testnet/Create2Factory.json new file mode 100644 index 000000000..66ac39a50 --- /dev/null +++ b/deployments/bnb_testnet/Create2Factory.json @@ -0,0 +1,4 @@ +{ + "address": "0xa6190aBC82427800935E0598892f7488a7F73A04", + "constructorArgs": "0x" +} \ No newline at end of file diff --git a/deployments/eth_sepolia/Create2Factory.json b/deployments/eth_sepolia/Create2Factory.json new file mode 100644 index 000000000..66ac39a50 --- /dev/null +++ b/deployments/eth_sepolia/Create2Factory.json @@ -0,0 +1,4 @@ +{ + "address": "0xa6190aBC82427800935E0598892f7488a7F73A04", + "constructorArgs": "0x" +} \ No newline at end of file diff --git a/deployments/op_sepolia/Create2Factory.json b/deployments/op_sepolia/Create2Factory.json new file mode 100644 index 000000000..66ac39a50 --- /dev/null +++ b/deployments/op_sepolia/Create2Factory.json @@ -0,0 +1,4 @@ +{ + "address": "0xa6190aBC82427800935E0598892f7488a7F73A04", + "constructorArgs": "0x" +} \ No newline at end of file diff --git a/deployments/scroll_sepolia/.chainId b/deployments/scroll_sepolia/.chainId new file mode 100644 index 000000000..b4c1846d0 --- /dev/null +++ b/deployments/scroll_sepolia/.chainId @@ -0,0 +1 @@ +534351 \ No newline at end of file diff --git a/deployments/scroll_sepolia/Create2Factory.json b/deployments/scroll_sepolia/Create2Factory.json new file mode 100644 index 000000000..66ac39a50 --- /dev/null +++ b/deployments/scroll_sepolia/Create2Factory.json @@ -0,0 +1,4 @@ +{ + "address": "0xa6190aBC82427800935E0598892f7488a7F73A04", + "constructorArgs": "0x" +} \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 4819570aa..ccb98dcc3 100644 --- a/foundry.toml +++ b/foundry.toml @@ -42,8 +42,11 @@ optimism = "${OPTIMISM_API}" polygon = "${POLYGON_API}" zkevm = "${ZKEVM_API}" # Testnets +arb_sepolia = "${ARB_SEPOLIA_API}" +base_sepolia = "${BASE_SEPOLIA_API}" eth_sepolia = "${ETH_SEPOLIA_API}" op_sepolia = "${OP_SEPOLIA_API}" +scroll_sepolia = "${SCROLL_SEPOLIA_API}" [etherscan] arbitrum = { key = "${ARBITRUM_ETHERSCAN_KEY}", url = "${ARBITRUM_ETHERSCAN_URL}" } @@ -69,5 +72,8 @@ optimism = { key = "${OPTIMISM_ETHERSCAN_KEY}", url = "${OPTIMISM_ETHERSCAN_URL} polygon = { key = "${POLYGON_ETHERSCAN_KEY}", url = "${POLYGON_ETHERSCAN_URL}" } zkevm = { key = "${ZKEVM_ETHERSCAN_KEY}", url = "${ZKEVM_ETHERSCAN_URL}" } # Testnets +arb_sepolia = { key = "${ARB_SEPOLIA_ETHERSCAN_KEY}", url = "${ARB_SEPOLIA_ETHERSCAN_URL}" } +base_sepolia = { key = "${BASE_SEPOLIA_ETHERSCAN_KEY}", url = "${BASE_SEPOLIA_ETHERSCAN_URL}" } eth_sepolia = { key = "${ETH_SEPOLIA_ETHERSCAN_KEY}", url = "${ETH_SEPOLIA_ETHERSCAN_URL}" } op_sepolia = { key = "${OP_SEPOLIA_ETHERSCAN_KEY}", url = "${OP_SEPOLIA_ETHERSCAN_URL}" } +scroll_sepolia = { key = "${SCROLL_SEPOLIA_ETHERSCAN_KEY}", url = "${SCROLL_SEPOLIA_ETHERSCAN_URL}" } diff --git a/script/chain-id.sh b/script/chain-id.sh new file mode 100755 index 000000000..01ac5422a --- /dev/null +++ b/script/chain-id.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# This script fetches the cahin ID using cast and saves it to deployments//.chainId +# Usage: ./script/chain-id.sh + +# Colors +RED="\033[0;31m" +NC="\033[0m" # No Color + +chainName=$1 +# Check that chainName is passed +if [ -z "$chainName" ]; then + echo -e "${RED}Usage: ./script/chain-id.sh ${NC}" + exit 1 +fi + +# Fetch the RPC URL for the chain from .env +source .env +chainRpcEnv=${chainName^^}_API +chainRpc=${!chainRpcEnv} + +# Create the deployments/ directory if it doesn't exist +mkdir -p "deployments/$chainName" +chainId=$(cast chain-id -r "$chainRpc") +# Print chainId without a newline +echo -n "$chainId" >"deployments/$chainName/.chainId"