hardhat.config.ts 3.4 KB

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