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 <pascal.caversaccio@hotmail.ch>
  • Loading branch information
pcaversaccio committed Oct 26, 2024
1 parent 9278804 commit cffb329
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 110 deletions.
31 changes: 31 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,18 @@ const config: HardhatUserConfig = {
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
sxTestnet: {
chainId: 79479957,
url: process.env.SX_TESTNET_URL || "",
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
sxMain: {
chainId: 4162,
url: process.env.SX_MAINNET_URL || "",
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
Expand Down Expand Up @@ -948,6 +960,9 @@ const config: HardhatUserConfig = {
// For XDC testnet & mainnet
xdc: process.env.XDC_API_KEY || "",
xdcTestnet: process.env.XDC_API_KEY || "",
// For SX testnet & mainnet
sx: process.env.SX_API_KEY || "",
sxTestnet: process.env.SX_API_KEY || "",
},
customChains: [
{
Expand Down Expand Up @@ -1644,6 +1659,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",
},
},
],
},
};
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,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 @@ -152,7 +154,7 @@
},
"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",
Expand All @@ -165,13 +167,13 @@
"@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",
"dotenv": "^16.4.5",
"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 Down
Loading

0 comments on commit cffb329

Please sign in to comment.