Skip to content

Commit

Permalink
➕ Add Sonic 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 Dec 11, 2024
1 parent 0f1def9 commit a7bf18d
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 138 deletions.
31 changes: 31 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,18 @@ const config: HardhatUserConfig = {
accounts,
ledgerAccounts,
},
sonicTestnet: {
chainId: 57054,
url: vars.get("SONIC_TESTNET_URL", "https://rpc.blaze.soniclabs.com"),
accounts,
ledgerAccounts,
},
sonicMain: {
chainId: 146,
url: vars.get("SONIC_MAINNET_URL", "https://rpc.soniclabs.com"),
accounts,
ledgerAccounts,
},
},
xdeploy: {
contract: "Create",
Expand Down Expand Up @@ -1119,6 +1131,9 @@ const config: HardhatUserConfig = {
superseedTestnet: vars.get("SUPERSEED_API_KEY", ""),
// For Story testnet
storyTestnet: vars.get("STORY_API_KEY", ""),
// For Sonic testnet & mainnet
sonic: vars.get("SONIC_API_KEY", ""),
sonicTestnet: vars.get("SONIC_API_KEY", ""),
},
customChains: [
{
Expand Down Expand Up @@ -1879,6 +1894,22 @@ const config: HardhatUserConfig = {
browserURL: "https://odyssey.storyscan.xyz",
},
},
{
network: "sonic",
chainId: 146,
urls: {
apiURL: "https://api.sonicscan.org/api",
browserURL: "https://sonicscan.org",
},
},
{
network: "sonicTestnet",
chainId: 57054,
urls: {
apiURL: "https://api-testnet.sonicscan.org/api",
browserURL: "https://testnet.sonicscan.org",
},
},
],
},
};
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@
"deploy:superseedtestnet": "npx hardhat run --network superseedTestnet scripts/deploy.ts",
"deploy:superseedmain": "npx hardhat run --network superseedMain scripts/deploy.ts",
"deploy:storytestnet": "npx hardhat run --network storyTestnet scripts/deploy.ts",
"deploy:sonictestnet": "npx hardhat run --network sonicTestnet scripts/deploy.ts",
"deploy:sonicmain": "npx hardhat run --network sonicMain 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 @@ -176,7 +178,7 @@
"@typechain/hardhat": "^9.1.0",
"@types/chai": "^4.3.20",
"@types/mocha": "^10.0.10",
"@types/node": "^22.10.1",
"@types/node": "^22.10.2",
"chai": "^4.5.0",
"eslint": "^9.16.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -192,7 +194,7 @@
"ts-node": "^10.9.2",
"typechain": "^8.3.2",
"typescript": "^5.7.2",
"typescript-eslint": "^8.17.0",
"xdeployer": "^3.1.7"
"typescript-eslint": "^8.18.0",
"xdeployer": "^3.1.8"
}
}
Loading

0 comments on commit a7bf18d

Please sign in to comment.