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 <[email protected]>
  • Loading branch information
pcaversaccio committed Dec 11, 2024
1 parent 08cf064 commit 78f7250
Show file tree
Hide file tree
Showing 3 changed files with 284 additions and 242 deletions.
33 changes: 32 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const config: HardhatUserConfig = {
},
},
zksolc: {
version: "1.5.7",
version: "1.5.8",
compilerSource: "binary",
settings: {
enableEraVMExtensions: false,
Expand Down Expand Up @@ -954,6 +954,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: "CobieEscrow",
Expand Down Expand Up @@ -1177,6 +1189,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 @@ -1953,6 +1968,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 @@ -159,6 +159,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 @@ -184,7 +186,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 @@ -200,8 +202,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 78f7250

Please sign in to comment.