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 0bbfb75 commit c35d800
Show file tree
Hide file tree
Showing 3 changed files with 245 additions and 245 deletions.
33 changes: 32 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const config: HardhatUserConfig = {
},
},
zksolc: {
version: "1.5.7",
version: "1.5.8",
compilerSource: "binary",
settings: {
enableEraVMExtensions: false,
Expand Down Expand Up @@ -962,6 +962,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: {
// Change this name to the name of your main contract
Expand Down Expand Up @@ -1208,6 +1220,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 @@ -1984,6 +1999,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",
},
},
],
},
// tenderly: {
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,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 Down Expand Up @@ -194,7 +196,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 @@ -210,8 +212,8 @@
"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",
"zksync-ethers": "^6.15.3"
}
}
Loading

0 comments on commit c35d800

Please sign in to comment.