Skip to content

Commit

Permalink
➕ Add XDC 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 20, 2024
1 parent bbc4813 commit 9f953ba
Show file tree
Hide file tree
Showing 3 changed files with 249 additions and 204 deletions.
33 changes: 32 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const config: HardhatUserConfig = {
},
},
zksolc: {
version: "1.5.4",
version: "1.5.6",
compilerSource: "binary",
settings: {
enableEraVMExtensions: false,
Expand Down Expand Up @@ -755,6 +755,18 @@ const config: HardhatUserConfig = {
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
xdcTestnet: {
chainId: 51,
url: process.env.XDC_TESTNET_URL || "",
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
xdcMain: {
chainId: 50,
url: process.env.XDC_MAINNET_URL || "",
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
Expand Down Expand Up @@ -933,6 +945,9 @@ const config: HardhatUserConfig = {
plumeTestnet: process.env.PLUME_API_KEY || "",
// For Unichain testnet
unichainTestnet: process.env.UNICHAIN_API_KEY || "",
// For XDC testnet & mainnet
xdc: process.env.XDC_API_KEY || "",
xdcTestnet: process.env.XDC_API_KEY || "",
},
customChains: [
{
Expand Down Expand Up @@ -1613,6 +1628,22 @@ const config: HardhatUserConfig = {
browserURL: "https://sepolia.uniscan.xyz",
},
},
{
network: "xdc",
chainId: 50,
urls: {
apiURL: "https://bapi.blocksscan.io",
browserURL: "https://xdcscan.io",
},
},
{
network: "xdcTestnet",
chainId: 51,
urls: {
apiURL: "https://abapi.blocksscan.io",
browserURL: "https://apothem.xdcscan.io",
},
},
],
},
};
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"deploy:worldchainmain": "npx hardhat run --network worldChainMain scripts/deploy.ts",
"deploy:plumetestnet": "npx hardhat run --network plumeTestnet scripts/deploy.ts",
"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",
"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 @@ -149,7 +151,7 @@
"lint:fix": "pnpm run prettier:fix && pnpm run solhint:fix && npx eslint . --fix"
},
"devDependencies": {
"@eslint/js": "^9.12.0",
"@eslint/js": "^9.13.0",
"@matterlabs/hardhat-zksync-deploy": "^1.5.0",
"@matterlabs/hardhat-zksync-ethers": "1.2.1",
"@matterlabs/hardhat-zksync-solc": "^1.2.5",
Expand All @@ -163,10 +165,10 @@
"@typechain/hardhat": "^9.1.0",
"@types/chai": "^4.3.20",
"@types/mocha": "^10.0.9",
"@types/node": "^22.7.5",
"@types/node": "^22.7.7",
"chai": "^4.5.0",
"dotenv": "^16.4.5",
"eslint": "^9.12.0",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"ethers": "^6.13.4",
"hardhat": "^2.22.13",
Expand All @@ -180,7 +182,7 @@
"ts-node": "^10.9.2",
"typechain": "^8.3.2",
"typescript": "^5.6.3",
"typescript-eslint": "^8.9.0",
"typescript-eslint": "^8.10.0",
"zksync-ethers": "^6.14.0"
}
}
Loading

0 comments on commit 9f953ba

Please sign in to comment.