hardhat.config.ts 3.7 KB

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