hardhat.config.ts 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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: "mathMainnet",
  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. abstractTestnet: {
  56. url: "https://api.testnet.abs.xyz",
  57. ethNetwork: "sepolia",
  58. zksync: true,
  59. verifyURL:
  60. "https://api-explorer-verify.testnet.abs.xyz/contract_verification",
  61. },
  62. abstract: {
  63. url: "https://api.mainnet.abs.xyz",
  64. ethNetwork: "mainnet",
  65. zksync: true,
  66. verifyURL:
  67. "https://api-explorer-verify.mainnet.abs.xyz/contract_verification",
  68. },
  69. mathMainnet: {
  70. url: "https://redacted.master.dev/",
  71. ethNetwork: "mainnet",
  72. zksync: true,
  73. verifyURL: "https://redacted.master.dev/contract_verification",
  74. },
  75. },
  76. etherscan: {
  77. apiKey: {
  78. neon_devnet: "there_should_be_a_dummy_value_here_to_avoid_error",
  79. shimmer_testnet: "there_should_be_a_dummy_value_here_to_avoid_error",
  80. boba_goerli: "there_should_be_a_dummy_value_here_to_avoid_error",
  81. boba: "there_should_be_a_dummy_value_here_to_avoid_error",
  82. },
  83. customChains: [
  84. {
  85. network: "neon_devnet",
  86. chainId: 245022926,
  87. urls: {
  88. apiURL: "https://devnet-api.neonscan.org/hardhat/verify",
  89. browserURL: "https://devnet.neonscan.org",
  90. },
  91. },
  92. {
  93. network: "shimmer_testnet",
  94. chainId: 1071,
  95. urls: {
  96. apiURL: "https://explorer.evm.testnet.shimmer.network/api",
  97. browserURL: "https://explorer.evm.testnet.shimmer.network",
  98. },
  99. },
  100. {
  101. network: "boba",
  102. chainId: 288,
  103. urls: {
  104. apiURL:
  105. "https://api.routescan.io/v2/network/mainnet/evm/288/etherscan",
  106. browserURL: "https://boba.routescan.io",
  107. },
  108. },
  109. {
  110. network: "boba_goerli",
  111. chainId: 2888,
  112. urls: {
  113. apiURL:
  114. "https://api.routescan.io/v2/network/testnet/evm/2888/etherscan",
  115. browserURL: "https://boba.testnet.routescan.io",
  116. },
  117. },
  118. ],
  119. },
  120. solidity: {
  121. version: "0.8.20",
  122. evmVersion: "paris",
  123. settings: {
  124. optimizer: {
  125. enabled: true,
  126. runs: 200,
  127. },
  128. },
  129. },
  130. };