Skip to content

Commit

Permalink
➕ Add SX Network Test and Main Network Configurations
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Marco Caversaccio <[email protected]>
  • Loading branch information
pcaversaccio committed Oct 26, 2024
1 parent 7615aed commit f0371d5
Show file tree
Hide file tree
Showing 4 changed files with 226 additions and 200 deletions.
2 changes: 1 addition & 1 deletion contracts/lib/forge-std
Submodule forge-std updated 1 files
+1 −1 package.json
34 changes: 34 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,21 @@ const config: HardhatUserConfig = {
accounts,
ledgerAccounts,
},
sxTestnet: {
chainId: 79479957,
url: vars.get(
"SX_TESTNET_URL",
"https://rpc.sx-rollup-testnet.t.raas.gelato.cloud",
),
accounts,
ledgerAccounts,
},
sxMain: {
chainId: 4162,
url: vars.get("SX_MAINNET_URL", "https://rpc.sx-rollup.gelato.digital"),
accounts,
ledgerAccounts,
},
},
xdeploy: {
// Change this name to the name of your main contract
Expand Down Expand Up @@ -1130,6 +1145,9 @@ const config: HardhatUserConfig = {
// For XDC testnet & mainnet
xdc: vars.get("XDC_API_KEY", ""),
xdcTestnet: vars.get("XDC_API_KEY", ""),
// For SX testnet & mainnet
sx: vars.get("SX_API_KEY", ""),
sxTestnet: vars.get("SX_API_KEY", ""),
},
customChains: [
{
Expand Down Expand Up @@ -1818,6 +1836,22 @@ const config: HardhatUserConfig = {
browserURL: "https://testnet.xdcscan.com",
},
},
{
network: "sx",
chainId: 4162,
urls: {
apiURL: "https://explorerl2.sx.technology/api",
browserURL: "https://explorerl2.sx.technology",
},
},
{
network: "sxTestnet",
chainId: 79479957,
urls: {
apiURL: "https://explorerl2.toronto.sx.technology/api",
browserURL: "https://explorerl2.toronto.sx.technology",
},
},
],
},
// tenderly: {
Expand Down
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@
"deploy:unichaintestnet": "npx hardhat run --network unichainTestnet scripts/deploy.ts",
"deploy:xdctestnet": "npx hardhat run --network xdcTestnet scripts/deploy.ts",
"deploy:xdcmain": "npx hardhat run --network xdcMain scripts/deploy.ts",
"deploy:sxtestnet": "npx hardhat run --network sxTestnet scripts/deploy.ts",
"deploy:sxmain": "npx hardhat run --network sxMain scripts/deploy.ts",
"prettier:check": "npx prettier -c \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
"prettier:fix": "npx prettier -w \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
"solhint:check": "npx solhint \"contracts/**/*.sol\"",
Expand All @@ -165,32 +167,32 @@
},
"devDependencies": {
"@eslint/js": "^9.13.0",
"@matterlabs/hardhat-zksync-deploy": "^1.5.0",
"@matterlabs/hardhat-zksync-deploy": "^1.6.0",
"@matterlabs/hardhat-zksync-ethers": "1.2.1",
"@matterlabs/hardhat-zksync-solc": "^1.2.5",
"@matterlabs/hardhat-zksync-verify": "^1.6.0",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.8",
"@nomicfoundation/hardhat-ethers": "^3.0.8",
"@nomicfoundation/hardhat-foundry": "^1.1.2",
"@nomicfoundation/hardhat-ignition": "^0.15.6",
"@nomicfoundation/hardhat-ignition-ethers": "^0.15.6",
"@nomicfoundation/hardhat-ignition": "^0.15.7",
"@nomicfoundation/hardhat-ignition-ethers": "^0.15.7",
"@nomicfoundation/hardhat-ledger": "^1.0.3",
"@nomicfoundation/hardhat-network-helpers": "^1.0.12",
"@nomicfoundation/hardhat-verify": "^2.0.11",
"@nomicfoundation/ignition-core": "^0.15.6",
"@nomicfoundation/ignition-core": "^0.15.7",
"@openzeppelin/contracts": "^5.1.0",
"@tenderly/hardhat-tenderly": "^2.4.0",
"@truffle/dashboard-hardhat-plugin": "^0.2.15",
"@typechain/ethers-v6": "^0.5.1",
"@typechain/hardhat": "^9.1.0",
"@types/chai": "^4.3.20",
"@types/mocha": "^10.0.9",
"@types/node": "^22.7.8",
"@types/node": "^22.8.1",
"chai": "^4.5.0",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"ethers": "^6.13.4",
"hardhat": "^2.22.14",
"hardhat": "^2.22.15",
"hardhat-abi-exporter": "^2.10.1",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-gas-reporter": "^2.2.1",
Expand All @@ -202,7 +204,7 @@
"typechain": "^8.3.2",
"typescript": "^5.6.3",
"typescript-eslint": "^8.11.0",
"xdeployer": "^3.1.4",
"xdeployer": "^3.1.5",
"zksync-ethers": "^6.14.0"
}
}
Loading

0 comments on commit f0371d5

Please sign in to comment.