Skip to content

Commit acf5a40

Browse files
authored
Zkcronos mainnet deployment (#1826)
* temp * update * tiny changes * tiny changes
1 parent 8966444 commit acf5a40

File tree

10 files changed

+3911
-1495
lines changed

10 files changed

+3911
-1495
lines changed

contract_manager/store/chains/EvmChains.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,4 +678,8 @@
678678
mainnet: true
679679
rpcUrl: https://mainnet-rpc.b3.fun/http
680680
networkId: 8333
681+
- id: cronos_zkevm_mainnet
682+
mainnet: true
683+
rpcUrl: https://mainnet.zkevm.cronos.org
684+
networkId: 388
681685
type: EvmChain

contract_manager/store/contracts/EvmPriceFeedContracts.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,3 +376,6 @@
376376
- chain: reya_testnet
377377
address: "0x2880aB155794e7179c9eE2e38200202908C17B43"
378378
type: EvmPriceFeedContract
379+
- chain: cronos_zkevm_mainnet
380+
address: "0x056f829183Ec806A78c26C98961678c24faB71af"
381+
type: EvmPriceFeedContract

contract_manager/store/contracts/EvmWormholeContracts.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,3 +364,6 @@
364364
- chain: b3_mainnet
365365
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
366366
type: EvmWormholeContract
367+
- chain: cronos_zkevm_mainnet
368+
address: "0xc10F5BE78E464BB0E1f534D66E5A6ecaB150aEFa"
369+
type: EvmWormholeContract

governance/xc_admin/packages/xc_admin_common/src/chains.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export const RECEIVER_CHAINS = {
8080
klaytn: 60056,
8181
kinto: 60057,
8282
b3_mainnet: 60058,
83+
cronos_zkevm_mainnet: 60059,
8384

8485
// Testnets as a separate chain ids (to use stable data sources and governance for them)
8586
injective_testnet: 60013,

pnpm-lock.yaml

Lines changed: 3868 additions & 1464 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

target_chains/ethereum/contracts/deploy/zkSyncDeploy.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { Deployer } from "@matterlabs/hardhat-zksync-deploy";
55
import { CHAINS } from "@pythnetwork/xc-admin-common";
66
import { assert } from "chai";
77
import { writeFileSync } from "fs";
8+
// import {Wallet as ZkWallet} from "zksync-ethers"; // Use These packages if "zksync-web3" doesn't work
9+
// import { Deployer as ZkDeployer } from "@matterlabs/hardhat-zksync";
810

911
const { getDefaultConfig } = require("../scripts/contractManagerConfig");
1012

@@ -46,7 +48,6 @@ export default async function (hre: HardhatRuntimeEnvironment) {
4648
emitterAddresses,
4749
emitterChainIds,
4850
} = getDefaultConfig(envOrErr("MIGRATIONS_NETWORK"));
49-
5051
const chainName = envOrErr("MIGRATIONS_NETWORK");
5152
const wormholeReceiverChainId = CHAINS[chainName];
5253
assert(wormholeReceiverChainId !== undefined);
@@ -59,10 +60,17 @@ export default async function (hre: HardhatRuntimeEnvironment) {
5960
"WormholeReceiver"
6061
);
6162

63+
console.log("Deploying WormholeReceiver contract...");
6264
const receiverSetupContract = await deployer.deploy(receiverSetupArtifact);
65+
console.log("Deployed ReceiverSetup on", receiverSetupContract.address);
6366

67+
console.log("Deploying ReceiverImplementation contract...");
6468
// deploy implementation
6569
const receiverImplContract = await deployer.deploy(receiverImplArtifact);
70+
console.log(
71+
"Deployed ReceiverImplementation on",
72+
receiverImplContract.address
73+
);
6674

6775
// encode initialisation data
6876
const whInitData = receiverSetupContract.interface.encodeFunctionData(

target_chains/ethereum/contracts/hardhat.config.ts

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { http } from "wagmi";
12
import "@nomiclabs/hardhat-etherscan";
23
import "@openzeppelin/hardhat-upgrades";
34
import "@matterlabs/hardhat-zksync-deploy";
@@ -14,19 +15,15 @@ module.exports = {
1415
},
1516
},
1617
},
17-
defaultNetwork: "cronosZkEvmTestnet",
18+
defaultNetwork: "cronosZkEvmMainnet",
1819
networks: {
19-
[process.env.MIGRATIONS_NETWORK!]: {
20-
url: process.env.RPC_URL,
21-
chainId: Number(process.env.NETWORK_ID),
22-
accounts: {
23-
mnemonic: process.env.MNEMONIC,
24-
},
25-
},
26-
goerli: {
27-
url: `https://goerli.infura.io/v3/${process.env.INFURA_KEY}`,
28-
zksync: false,
29-
},
20+
// [process.env.MIGRATIONS_NETWORK!]: {
21+
// url: process.env.RPC_URL,
22+
// chainId: Number(process.env.NETWORK_ID),
23+
// accounts: {
24+
// mnemonic: process.env.MNEMONIC,
25+
// },
26+
// },
3027
zkSyncTestnet: {
3128
url: "https://zksync2-testnet.zksync.dev", // URL of the zkSync network RPC
3229
ethNetwork: "goerli", // Can also be the RPC URL of the Ethereum network (e.g. `https://goerli.infura.io/v3/<API_KEY>`)
@@ -49,19 +46,12 @@ module.exports = {
4946
zksync: true,
5047
verifyURL: "https://explorer.zkevm.cronos.org/contract_verification",
5148
},
52-
neon_devnet: {
53-
url: "https://devnet.neonevm.org",
54-
chainId: 245022926,
55-
accounts: {
56-
mnemonic: process.env.MNEMONIC,
57-
},
58-
},
59-
shimmer_testnet: {
60-
url: "https://json-rpc.evm.testnet.shimmer.network",
61-
chainId: 1071,
62-
accounts: {
63-
mnemonic: process.env.MNEMONIC,
64-
},
49+
cronosZkEvmMainnet: {
50+
url: "https://mainnet.zkevm.cronos.org",
51+
ethNetwork: "sepolia", // or a Sepolia RPC endpoint from Infura/Alchemy/Chainstack etc.
52+
zksync: true,
53+
verifyURL:
54+
"https://explorer-api.zkevm.cronos.org/api/v1/contract/verify/hardhat?apikey=",
6555
},
6656
},
6757
etherscan: {

target_chains/ethereum/contracts/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,17 @@
2828
"license": "Apache-2.0",
2929
"dependencies": {
3030
"@certusone/wormhole-sdk": "^0.9.22",
31-
"@matterlabs/hardhat-zksync-deploy": "^0.6.2",
31+
"@matterlabs/hardhat-zksync": "^1.1.0",
32+
"@matterlabs/hardhat-zksync-deploy": "^0.6.6",
3233
"@matterlabs/hardhat-zksync-solc": "^0.3.14",
3334
"@nomiclabs/hardhat-etherscan": "^3.1.7",
3435
"@openzeppelin/contracts": "=4.8.1",
3536
"@openzeppelin/contracts-upgradeable": "=4.8.1",
3637
"@openzeppelin/hardhat-upgrades": "^1.22.1",
37-
"@pythnetwork/pyth-sdk-solidity": "workspace:*",
38-
"@pythnetwork/entropy-sdk-solidity": "workspace:*",
3938
"@pythnetwork/contract-manager": "workspace:*",
39+
"@pythnetwork/entropy-sdk-solidity": "workspace:*",
40+
"@pythnetwork/pyth-sdk-solidity": "workspace:*",
41+
"@pythnetwork/xc-admin-common": "workspace:*",
4042
"dotenv": "^10.0.0",
4143
"elliptic": "^6.5.2",
4244
"ethers": "^5.7.2",
@@ -51,7 +53,7 @@
5153
"web3": "^1.2.2",
5254
"web3-eth-abi": "^1.2.2",
5355
"web3-utils": "^1.2.2",
54-
"@pythnetwork/xc-admin-common": "workspace:*",
56+
"zksync-ethers": "^6.11.2",
5557
"zksync-web3": "^0.13.4"
5658
}
5759
}

target_chains/ethereum/sdk/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/pyth-evm-js",
3-
"version": "1.61.0",
3+
"version": "1.62.0",
44
"description": "Pyth Network EVM Utils in JS",
55
"homepage": "https://pyth.network",
66
"author": {

target_chains/ethereum/sdk/js/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export const CONTRACT_ADDR: Record<string, string> = {
2626
conflux_espace: "0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc",
2727
core_dao: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
2828
cronos: "0xE0d0e68297772Dd5a1f1D99897c581E2082dbA5B",
29+
cronos_zkevm_mainnet: "0x056f829183ec806a78c26c98961678c24fab71af",
2930
eos: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
3031
evmos: "0x354bF866A4B006C9AF9d9e06d9364217A8616E12",
3132
ethereum: "0x4305FB66699C3B2702D4d05CF36551390A4c69C6",

0 commit comments

Comments
 (0)