hardhat.config.ts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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.3.1",
  9. compilerSource: "binary",
  10. settings: {
  11. optimizer: {
  12. enabled: true,
  13. },
  14. },
  15. },
  16. defaultNetwork: "zkSyncTestnet",
  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. neon_devnet: {
  46. url: "https://devnet.neonevm.org",
  47. chainId: 245022926,
  48. accounts: {
  49. mnemonic: process.env.MNEMONIC,
  50. },
  51. },
  52. shimmer_testnet: {
  53. url: "https://json-rpc.evm.testnet.shimmer.network",
  54. chainId: 1071,
  55. accounts: {
  56. mnemonic: process.env.MNEMONIC,
  57. },
  58. },
  59. },
  60. etherscan: {
  61. apiKey: {
  62. neon_devnet: "there_should_be_a_dummy_value_here_to_avoid_error",
  63. shimmer_testnet: "there_should_be_a_dummy_value_here_to_avoid_error",
  64. boba_goerli: "there_should_be_a_dummy_value_here_to_avoid_error",
  65. boba: "there_should_be_a_dummy_value_here_to_avoid_error",
  66. },
  67. customChains: [
  68. {
  69. network: "neon_devnet",
  70. chainId: 245022926,
  71. urls: {
  72. apiURL: "https://devnet-api.neonscan.org/hardhat/verify",
  73. browserURL: "https://devnet.neonscan.org",
  74. },
  75. },
  76. {
  77. network: "shimmer_testnet",
  78. chainId: 1071,
  79. urls: {
  80. apiURL: "https://explorer.evm.testnet.shimmer.network/api",
  81. browserURL: "https://explorer.evm.testnet.shimmer.network",
  82. },
  83. },
  84. {
  85. network: "boba",
  86. chainId: 288,
  87. urls: {
  88. apiURL:
  89. "https://api.routescan.io/v2/network/mainnet/evm/288/etherscan",
  90. browserURL: "https://boba.routescan.io",
  91. },
  92. },
  93. {
  94. network: "boba_goerli",
  95. chainId: 2888,
  96. urls: {
  97. apiURL:
  98. "https://api.routescan.io/v2/network/testnet/evm/2888/etherscan",
  99. browserURL: "https://boba.testnet.routescan.io",
  100. },
  101. },
  102. ],
  103. },
  104. solidity: {
  105. version: "0.8.4",
  106. settings: {
  107. optimizer: {
  108. enabled: true,
  109. runs: 200,
  110. },
  111. },
  112. },
  113. };