68 lines
1.4 KiB
TypeScript
68 lines
1.4 KiB
TypeScript
import '@nomiclabs/hardhat-ethers';
|
|
import '@nomiclabs/hardhat-web3';
|
|
import '@nomicfoundation/hardhat-chai-matchers';
|
|
import 'hardhat-deploy';
|
|
import 'solidity-coverage';
|
|
import 'hardhat-gas-reporter';
|
|
import 'hardhat-contract-sizer';
|
|
import * as dotenv from 'dotenv';
|
|
import { HardhatUserConfig } from 'hardhat/types';
|
|
|
|
dotenv.config();
|
|
|
|
const {
|
|
API_URL = 'https://polygon-mainnet.alchemyapi.io/v2/your-api-key',
|
|
PRIVATE_KEY,
|
|
REPORT_GAS,
|
|
} = process.env;
|
|
|
|
const config: HardhatUserConfig = {
|
|
defaultNetwork: 'hardhat',
|
|
networks: {
|
|
hardhat: {
|
|
chainId: 31337,
|
|
},
|
|
localhost: {
|
|
chainId: 31337,
|
|
},
|
|
mumbai: {
|
|
url: API_URL,
|
|
accounts: PRIVATE_KEY ? [PRIVATE_KEY] : [],
|
|
saveDeployments: true,
|
|
chainId: 80001,
|
|
},
|
|
},
|
|
gasReporter: {
|
|
enabled: REPORT_GAS === 'true' || false,
|
|
currency: 'USD',
|
|
outputFile: 'gas-report.txt',
|
|
noColors: true,
|
|
// coinmarketcap: process.env.COINMARKETCAP_API_KEY,
|
|
},
|
|
contractSizer: {
|
|
runOnCompile: false,
|
|
only: ['NftMarketplace'],
|
|
},
|
|
namedAccounts: {
|
|
deployer: {
|
|
default: 1, // here this will by default take the first account as deployer
|
|
1: 0,
|
|
},
|
|
privateKey: {
|
|
default: `privatekey://${PRIVATE_KEY}`,
|
|
},
|
|
},
|
|
solidity: {
|
|
compilers: [
|
|
{
|
|
version: '0.8.7',
|
|
},
|
|
],
|
|
},
|
|
mocha: {
|
|
timeout: 200000, // 200 seconds max for running tests
|
|
},
|
|
};
|
|
|
|
export default config;
|