hardhat.config.ts 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. import { http } from "wagmi";
  2. import "@nomiclabs/hardhat-etherscan";
  3. import "@openzeppelin/hardhat-upgrades";
  4. import "@matterlabs/hardhat-zksync-deploy";
  5. import "@matterlabs/hardhat-zksync-solc";
  6. // import "@matterlabs/hardhat-zksync-verify"; UNCOMMENT THIS AND INSTALL THIS PACKAGE TO VERIFY ZKSYNC
  7. module.exports = {
  8. zksolc: {
  9. version: "1.4.1",
  10. compilerSource: "binary",
  11. settings: {
  12. optimizer: {
  13. enabled: true,
  14. },
  15. },
  16. },
  17. defaultNetwork: "cronosZkEvmMainnet",
  18. 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. zkSyncTestnet: {
  27. url: "https://zksync2-testnet.zksync.dev", // URL of the zkSync network RPC
  28. ethNetwork: "goerli", // Can also be the RPC URL of the Ethereum network (e.g. `https://goerli.infura.io/v3/<API_KEY>`)
  29. zksync: true,
  30. chainId: 280,
  31. verifyURL:
  32. "https://zksync2-testnet-explorer.zksync.dev/contract_verification",
  33. },
  34. zkSyncMainnet: {
  35. url: "https://zksync2-mainnet.zksync.io",
  36. ethNetwork: "mainnet",
  37. zksync: true,
  38. chainId: 324,
  39. verifyURL:
  40. "https://zksync2-mainnet-explorer.zksync.io/contract_verification",
  41. },
  42. cronosZkEvmTestnet: {
  43. url: "https://testnet.zkevm.cronos.org",
  44. ethNetwork: "sepolia", // or a Sepolia RPC endpoint from Infura/Alchemy/Chainstack etc.
  45. zksync: true,
  46. verifyURL: "https://explorer.zkevm.cronos.org/contract_verification",
  47. },
  48. cronosZkEvmMainnet: {
  49. url: "https://mainnet.zkevm.cronos.org",
  50. ethNetwork: "sepolia", // or a Sepolia RPC endpoint from Infura/Alchemy/Chainstack etc.
  51. zksync: true,
  52. verifyURL:
  53. "https://explorer-api.zkevm.cronos.org/api/v1/contract/verify/hardhat?apikey=",
  54. },
  55. },
  56. etherscan: {
  57. apiKey: {
  58. neon_devnet: "there_should_be_a_dummy_value_here_to_avoid_error",
  59. shimmer_testnet: "there_should_be_a_dummy_value_here_to_avoid_error",
  60. boba_goerli: "there_should_be_a_dummy_value_here_to_avoid_error",
  61. boba: "there_should_be_a_dummy_value_here_to_avoid_error",
  62. },
  63. customChains: [
  64. {
  65. network: "neon_devnet",
  66. chainId: 245022926,
  67. urls: {
  68. apiURL: "https://devnet-api.neonscan.org/hardhat/verify",
  69. browserURL: "https://devnet.neonscan.org",
  70. },
  71. },
  72. {
  73. network: "shimmer_testnet",
  74. chainId: 1071,
  75. urls: {
  76. apiURL: "https://explorer.evm.testnet.shimmer.network/api",
  77. browserURL: "https://explorer.evm.testnet.shimmer.network",
  78. },
  79. },
  80. {
  81. network: "boba",
  82. chainId: 288,
  83. urls: {
  84. apiURL:
  85. "https://api.routescan.io/v2/network/mainnet/evm/288/etherscan",
  86. browserURL: "https://boba.routescan.io",
  87. },
  88. },
  89. {
  90. network: "boba_goerli",
  91. chainId: 2888,
  92. urls: {
  93. apiURL:
  94. "https://api.routescan.io/v2/network/testnet/evm/2888/etherscan",
  95. browserURL: "https://boba.testnet.routescan.io",
  96. },
  97. },
  98. ],
  99. },
  100. solidity: {
  101. version: "0.8.4",
  102. settings: {
  103. optimizer: {
  104. enabled: true,
  105. runs: 200,
  106. },
  107. },
  108. },
  109. };