You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hardhat.config.ts 3.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. import 'dotenv/config';
  2. import { HardhatUserConfig } from 'hardhat/types';
  3. // import '@nomicfoundation/hardhat-chai-matchers';
  4. import '@nomicfoundation/hardhat-ethers';
  5. import '@nomicfoundation/hardhat-network-helpers';
  6. import '@nomicfoundation/hardhat-verify';
  7. import '@openzeppelin/hardhat-upgrades';
  8. import '@typechain/hardhat';
  9. import 'hardhat-deploy';
  10. import 'hardhat-contract-sizer';
  11. import 'hardhat-gas-reporter';
  12. import 'solidity-coverage';
  13. const config: HardhatUserConfig = {
  14. solidity: {
  15. compilers: [
  16. {
  17. version: '0.8.20',
  18. settings: {
  19. optimizer: { enabled: true, runs: 50 },
  20. viaIR: true,
  21. },
  22. },
  23. ],
  24. },
  25. typechain: {
  26. outDir: 'typechain',
  27. target: 'ethers-v6',
  28. },
  29. paths: {
  30. sources: './contracts',
  31. tests: './test',
  32. cache: './cache',
  33. artifacts: './artifacts',
  34. },
  35. defaultNetwork: 'hardhat',
  36. networks: {
  37. hardhat: {
  38. allowUnlimitedContractSize: true,
  39. accounts: {
  40. mnemonic: 'test test test test test test test test test test test junk',
  41. initialIndex: 0,
  42. accountsBalance: '10000000000000000000000000', // 10,000,000 ETH
  43. },
  44. },
  45. besu_on_premise_dev: {
  46. chainId: 1337,
  47. gas: 'auto',
  48. url: 'http://172.25.1.104/',
  49. accounts: [
  50. '0xccb3131e009c579f16e6088f89218744f670e9b09c28514c671d5ae239f0c532', // admin 0xf1114837ed4a1fA9C03e8CC9F1D74Eb853D69456
  51. '0x633942d3d1a3e26d00b45c3141534ce70201ef45a7f770464a51b4843d1fded6', // issuer
  52. '0x55d1000aa2057a878b5f7902158615f889cb1e9b811f7e1e9c0b4518399ba84a', // controller
  53. '0x60c092d6bdcd9c9ea1afcab4febd2f344b7cde3cdebc99f279b35deaa40b87b7', // controller
  54. '0xefb3c2ae169b7521c82fff0f9cf26acae190f11de0532ce3691159e695274b0b',
  55. '0xbd426a98e7c9fd367b0a77eb73f5c93df95f24304facfe3f8083ceda371975d2',
  56. '0xddc3bd701644512b63fae4934bc0359d346af7f64404786b1ebf6b16fef6dc70',
  57. // nonce-manager test accounts (do not use if possible)
  58. '0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3', // admin 0x627306090abaB3A6e1400e9345bC60c78a8BEf57
  59. '0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63', // issuer
  60. '0xae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f', // controller
  61. '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80', // controller
  62. ],
  63. },
  64. besu_local: {
  65. chainId: 1337,
  66. gas: 'auto',
  67. url: 'http://localhost:8545' ,
  68. accounts: [
  69. '0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3',
  70. '0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63',
  71. '0xae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f',
  72. '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
  73. ]
  74. },
  75. besu_oci: {
  76. chainId: 1337,
  77. gas: 'auto',
  78. url: 'http://193.123.252.127' ,
  79. accounts: [
  80. '0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3',
  81. '0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63',
  82. '0xae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f',
  83. '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
  84. ]
  85. },
  86. },
  87. gasReporter: {
  88. currency: 'USD',
  89. coinmarketcap: process.env.COINMARKETCAP_API_KEY || '',
  90. enabled: true,
  91. },
  92. mocha: {
  93. timeout: 60000,
  94. },
  95. };
  96. export default config;