Skip to content

Commit

Permalink
➕ Add Sonic Test and Main Network Deployments (#159)
Browse files Browse the repository at this point in the history
### 🕓 Changelog

Add Sonic test and main network deployments:
- [Sonic Testnet
(Blaze)](https://testnet.sonicscan.org/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed),
-
[Sonic](https://sonicscan.org/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed).

#### Verification

Compare the `keccak256` hash of the runtime bytecode with the canonical
`keccak256` hash of the runtime bytecode
[here](https://github.com/pcaversaccio/createx#security-considerations)
(`0xbd8a7ea8cfca7b4e5f5041d7d4b17bc317c5ce42cfbc42066a00cf26b43eb53f`):

```console
~$ cast keccak $(cast code 0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed --rpc-url https://rpc.blaze.soniclabs.com)
0xbd8a7ea8cfca7b4e5f5041d7d4b17bc317c5ce42cfbc42066a00cf26b43eb53f
~$ cast keccak $(cast code 0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed --rpc-url https://rpc.soniclabs.com)
0xbd8a7ea8cfca7b4e5f5041d7d4b17bc317c5ce42cfbc42066a00cf26b43eb53f
```

---------

Signed-off-by: Pascal Marco Caversaccio <[email protected]>
  • Loading branch information
pcaversaccio authored Dec 11, 2024
2 parents 45b4206 + 02ee657 commit 68ef45e
Show file tree
Hide file tree
Showing 9 changed files with 330 additions and 292 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2230,6 +2230,7 @@ To verify a deployed [`CreateX`](./src/CreateX.sol) contract on a block explorer
- [Lisk](https://blockscout.lisk.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Metal L2](https://explorer.metall2.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Superseed](https://explorer.superseed.xyz/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Sonic](https://sonicscan.org/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)

#### Ethereum Test Networks

Expand Down Expand Up @@ -2289,6 +2290,7 @@ To verify a deployed [`CreateX`](./src/CreateX.sol) contract on a block explorer
- [Metal L2 Sepolia Testnet](https://testnet.explorer.metall2.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Superseed Sepolia Testnet](https://sepolia-explorer.superseed.xyz/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Story Testnet (Odyssey)](https://odyssey.storyscan.xyz/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Sonic Testnet (Blaze)](https://testnet.sonicscan.org/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)

## Integration With External Tooling

Expand Down
17 changes: 16 additions & 1 deletion deployments/deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,13 @@
"https://explorer.superseed.xyz/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed"
]
},
{
"name": "Sonic",
"chainId": 146,
"urls": [
"https://sonicscan.org/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed"
]
},
{
"name": "Sepolia",
"chainId": 11155111,
Expand Down Expand Up @@ -794,7 +801,15 @@
"name": "Story Testnet (Odyssey)",
"chainId": 1516,
"urls": [
"https://odyssey.storyscan.xyz/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed"
"https://odyssey.storyscan.xyz/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed",
"https://repo.sourcify.dev/contracts/partial_match/1516/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed/"
]
},
{
"name": "Sonic Testnet (Blaze)",
"chainId": 57054,
"urls": [
"https://testnet.sonicscan.org/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed"
]
}
]
29 changes: 29 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,16 @@ const config: HardhatUserConfig = {
url: vars.get("STORY_TESTNET_URL", "https://odyssey.storyrpc.io"),
accounts,
},
sonicTestnet: {
chainId: 57054,
url: vars.get("SONIC_TESTNET_URL", "https://rpc.blaze.soniclabs.com"),
accounts,
},
sonicMain: {
chainId: 146,
url: vars.get("SONIC_MAINNET_URL", "https://rpc.soniclabs.com"),
accounts,
},
},
contractSizer: {
alphaSort: true,
Expand Down Expand Up @@ -948,6 +958,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 @@ -1708,6 +1721,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
15 changes: 7 additions & 8 deletions interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"@headlessui/react": "^2.2.0",
"@heroicons/react": "^2.2.0",
"next": "^15.0.4",
"next": "^15.1.0",
"next-themes": "^0.4.4",
"prismjs": "^1.29.0",
"react": "^19.0.0",
Expand All @@ -41,23 +41,22 @@
},
"devDependencies": {
"@eslint/js": "^9.16.0",
"@next/eslint-plugin-next": "^15.0.4",
"@trivago/prettier-plugin-sort-imports": "^5.1.0",
"@types/node": "^22.10.1",
"@next/eslint-plugin-next": "^15.1.0",
"@trivago/prettier-plugin-sort-imports": "^5.2.0",
"@types/node": "^22.10.2",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.1",
"@types/react-dom": "^19.0.2",
"autoprefixer": "^10.4.20",
"eslint": "^9.16.0",
"eslint-config-next": "^15.0.4",
"eslint-config-next": "^15.1.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.1.0",
"next-seo": "^6.6.0",
"postcss": "^8.4.49",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.2",
"prettier-plugin-tailwindcss": "^0.6.9",
"tailwindcss": "^3.4.16",
"typescript": "^5.7.2",
"typescript-eslint": "^8.17.0"
"typescript-eslint": "^8.18.0"
}
}
2 changes: 1 addition & 1 deletion interface/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import type { AppProps } from "next/app";
import { DefaultSeo } from "next-seo";
import { ThemeProvider } from "next-themes";
import type { AppProps } from "next/app";
import { Layout } from "@/components/layout/Layout";
import "@/styles/globals.css";
import DefaultSeoProps from "../../next-seo.config";
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@
"deploy:superseedtestnet": "npx hardhat run --no-compile --network superseedTestnet scripts/deploy.ts",
"deploy:superseedmain": "npx hardhat run --no-compile --network superseedMain scripts/deploy.ts",
"deploy:storytestnet": "npx hardhat run --no-compile --network storyTestnet scripts/deploy.ts",
"deploy:sonictestnet": "npx hardhat run --no-compile --network sonicTestnet scripts/deploy.ts",
"deploy:sonicmain": "npx hardhat run --no-compile --network sonicMain scripts/deploy.ts",
"prettier:check": "npx prettier -c \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
"prettier:check:interface": "pnpm -C interface prettier:check",
"prettier:fix": "npx prettier -w \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
Expand Down Expand Up @@ -191,6 +193,6 @@
"ts-node": "^10.9.2",
"typechain": "^8.3.2",
"typescript": "^5.7.2",
"typescript-eslint": "^8.17.0"
"typescript-eslint": "^8.18.0"
}
}
Loading

0 comments on commit 68ef45e

Please sign in to comment.