hardhat.config.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. goerli: {
  19. url: `https://goerli.infura.io/v3/${process.env.INFURA_KEY}`,
  20. zksync: false,
  21. },
  22. zkSyncTestnet: {
  23. url: "https://zksync2-testnet.zksync.dev", // URL of the zkSync network RPC
  24. ethNetwork: "goerli", // Can also be the RPC URL of the Ethereum network (e.g. `https://goerli.infura.io/v3/<API_KEY>`)
  25. zksync: true,
  26. chainId: 280,
  27. verifyURL:
  28. "https://zksync2-testnet-explorer.zksync.dev/contract_verification",
  29. },
  30. zkSyncMainnet: {
  31. url: "https://zksync2-mainnet.zksync.io",
  32. ethNetwork: "mainnet",
  33. zksync: true,
  34. chainId: 324,
  35. verifyURL:
  36. "https://zksync2-mainnet-explorer.zksync.io/contract_verification",
  37. },
  38. neon_devnet: {
  39. url: "https://devnet.neonevm.org",
  40. chainId: 245022926,
  41. accounts: {
  42. mnemonic: process.env.MNEMONIC,
  43. },
  44. },
  45. shimmer_testnet: {
  46. url: "https://json-rpc.evm.testnet.shimmer.network",
  47. chainId: 1071,
  48. accounts: {
  49. mnemonic: process.env.MNEMONIC,
  50. },
  51. },
  52. },
  53. etherscan: {
  54. apiKey: {
  55. neon_devnet: "there_should_be_a_dummy_value_here_to_avoid_error",
  56. shimmer_testnet: "there_should_be_a_dummy_value_here_to_avoid_error",
  57. },
  58. customChains: [
  59. {
  60. network: "neon_devnet",
  61. chainId: 245022926,
  62. urls: {
  63. apiURL: "https://devnet-api.neonscan.org/hardhat/verify",
  64. browserURL: "https://devnet.neonscan.org",
  65. },
  66. },
  67. {
  68. network: "shimmer_testnet",
  69. chainId: 1071,
  70. urls: {
  71. apiURL: "https://explorer.evm.testnet.shimmer.network/api",
  72. browserURL: "https://explorer.evm.testnet.shimmer.network",
  73. },
  74. },
  75. ],
  76. },
  77. solidity: {
  78. version: "0.8.4",
  79. settings: {
  80. optimizer: {
  81. enabled: true,
  82. runs: 2000,
  83. },
  84. },
  85. },
  86. };