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 a548c11 commit 28589d0
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 103 deletions.
34 changes: 34 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,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: {
contract: "Create",
Expand Down Expand Up @@ -1048,6 +1063,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 @@ -1736,6 +1754,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 @@ -148,6 +148,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 @@ -167,12 +169,12 @@
"@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 @@ -184,6 +186,6 @@
"typechain": "^8.3.2",
"typescript": "^5.6.3",
"typescript-eslint": "^8.11.0",
"xdeployer": "^3.1.4"
"xdeployer": "^3.1.5"
}
}
Loading

0 comments on commit 28589d0

Please sign in to comment.