Skip to content

Commit

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

Add ZetaChain test and main network deployments:
- [ZetaChain Testnet
(Athens-3)](https://athens.explorer.zetachain.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed),
-
[ZetaChain](https://explorer.zetachain.com/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://7001.rpc.thirdweb.com)
0xbd8a7ea8cfca7b4e5f5041d7d4b17bc317c5ce42cfbc42066a00cf26b43eb53f
~$ cast keccak $(cast code 0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed --rpc-url https://7000.rpc.thirdweb.com)
0xbd8a7ea8cfca7b4e5f5041d7d4b17bc317c5ce42cfbc42066a00cf26b43eb53f
```

---------
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
  • Loading branch information
pcaversaccio authored Aug 22, 2024
1 parent 7b9fd88 commit 70a6b59
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 152 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
uses: actions/checkout@v4

- name: Run codespell
uses: codespell-project/actions-codespell@v2.0
uses: codespell-project/actions-codespell@v2
with:
check_filenames: true
skip: ./.git,pnpm-lock.yaml
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2218,6 +2218,7 @@ To verify a deployed [`CreateX`](./src/CreateX.sol) contract on a block explorer
- [Taraxa](https://mainnet.explorer.taraxa.io/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Gravity Alpha](https://explorer.gravity.xyz/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Taiko](https://taikoscan.io/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [ZetaChain](https://explorer.zetachain.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)

#### Ethereum Test Networks

Expand Down Expand Up @@ -2265,6 +2266,7 @@ To verify a deployed [`CreateX`](./src/CreateX.sol) contract on a block explorer
- [Chiliz Testnet (Spicy)](https://testnet.chiliscan.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Taraxa Testnet](https://testnet.explorer.taraxa.io/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Taiko Holešky Testnet](https://hekla.taikoscan.io/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [ZetaChain Testnet (Athens-3)](https://athens.explorer.zetachain.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)

## Integration With External Tooling

Expand Down
16 changes: 16 additions & 0 deletions deployments/deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,14 @@
"https://taikoscan.io/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed"
]
},
{
"name": "ZetaChain",
"chainId": 7000,
"urls": [
"https://explorer.zetachain.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed",
"https://repo.sourcify.dev/contracts/partial_match/7000/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed/"
]
},
{
"name": "Sepolia",
"chainId": 11155111,
Expand Down Expand Up @@ -644,5 +652,13 @@
"urls": [
"https://hekla.taikoscan.io/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed"
]
},
{
"name": "ZetaChain Testnet (Athens-3)",
"chainId": 7000,
"urls": [
"https://athens.explorer.zetachain.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed",
"https://repo.sourcify.dev/contracts/partial_match/7001/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed/"
]
}
]
29 changes: 29 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,16 @@ const config: HardhatUserConfig = {
url: vars.get("TAIKO_MAINNET_URL", "https://rpc.taiko.xyz"),
accounts,
},
zetaChainTestnet: {
chainId: 7001,
url: vars.get("ZETA_CHAIN_TESTNET_URL", "https://7001.rpc.thirdweb.com"),
accounts,
},
zetaChainMain: {
chainId: 7000,
url: vars.get("ZETA_CHAIN_MAINNET_URL", "https://7000.rpc.thirdweb.com"),
accounts,
},
},
contractSizer: {
alphaSort: true,
Expand Down Expand Up @@ -795,6 +805,9 @@ const config: HardhatUserConfig = {
// For Taiko testnet & mainnet
taiko: vars.get("TAIKO_API_KEY", ""),
taikoTestnet: vars.get("TAIKO_API_KEY", ""),
// For ZetaChain testnet & mainnet
zetaChain: vars.get("ZETA_CHAIN_API_KEY", ""),
zetaChainTestnet: vars.get("ZETA_CHAIN_API_KEY", ""),
},
customChains: [
{
Expand Down Expand Up @@ -1387,6 +1400,22 @@ const config: HardhatUserConfig = {
browserURL: "https://hekla.taikoscan.io",
},
},
{
network: "zetaChain",
chainId: 7000,
urls: {
apiURL: "https://zetachain.blockscout.com/api",
browserURL: "https://zetachain.blockscout.com",
},
},
{
network: "zetaChainTestnet",
chainId: 7001,
urls: {
apiURL: "https://zetachain-athens-3.blockscout.com/api",
browserURL: "https://zetachain-athens-3.blockscout.com",
},
},
],
},
};
Expand Down
10 changes: 5 additions & 5 deletions interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"@headlessui/react": "^2.1.2",
"@heroicons/react": "^2.1.5",
"next": "^14.2.5",
"next": "^14.2.6",
"next-themes": "^0.3.0",
"prismjs": "^1.29.0",
"react": "^18.3.1",
Expand All @@ -41,14 +41,14 @@
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@next/eslint-plugin-next": "^14.2.5",
"@next/eslint-plugin-next": "^14.2.6",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^22.4.1",
"@types/react": "^18.3.3",
"@types/node": "^22.5.0",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.20",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.5",
"eslint-config-next": "^14.2.6",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"next-seo": "^6.5.0",
Expand Down
2 changes: 1 addition & 1 deletion lib/openzeppelin-contracts
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@
"deploy:gravityalphamain": "npx hardhat run --no-compile --network gravityAlphaMain scripts/deploy.ts",
"deploy:taikotestnet": "npx hardhat run --no-compile --network taikoTestnet scripts/deploy.ts",
"deploy:taikomain": "npx hardhat run --no-compile --network taikoMain scripts/deploy.ts",
"deploy:zetachaintestnet": "npx hardhat run --no-compile --network zetaChainTestnet scripts/deploy.ts",
"deploy:zetachainmain": "npx hardhat run --no-compile --network zetaChainMain scripts/deploy.ts",
"prettier:check": "npx prettier -c \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
"prettier:check:interface": "cd interface && pnpm prettier:check",
"prettier:fix": "npx prettier -w \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
Expand All @@ -153,14 +155,14 @@
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@nomicfoundation/hardhat-ethers": "^3.0.6",
"@nomicfoundation/hardhat-ethers": "^3.0.7",
"@nomicfoundation/hardhat-verify": "^2.0.9",
"@typechain/ethers-v6": "^0.5.1",
"@typechain/hardhat": "^9.1.0",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"ethers": "^6.13.2",
"hardhat": "^2.22.8",
"hardhat": "^2.22.9",
"hardhat-abi-exporter": "^2.10.1",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-gas-reporter": "^2.2.1",
Expand Down
Loading

0 comments on commit 70a6b59

Please sign in to comment.