Skip to content

Commit

Permalink
chore: hardhat config
Browse files Browse the repository at this point in the history
  • Loading branch information
Orlando committed Aug 28, 2023
1 parent 813fd0e commit b63ed4d
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import dotenv from 'dotenv';
dotenv.config();
import { task } from 'hardhat/config';
import { HardhatUserConfig } from 'hardhat/types';
import '@shardlabs/starknet-hardhat-plugin';
import '@typechain/hardhat';
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-waffle';
import 'hardhat-gas-reporter';
import '@nomiclabs/hardhat-etherscan';
import '@nomicfoundation/hardhat-network-helpers';

task('accounts', 'Prints the list of accounts', async (args, hre) => {
const accounts = await hre.ethers.getSigners();

for (const account of accounts) {
console.log(await account.getAddress());
}
});

const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: '0.6.12',
settings: {
optimizer: {
enabled: true,
runs: 10,
},
},
},
{
version: '0.8.19',
settings: {
optimizer: {
enabled: true,
runs: 10,
},
},
},
],
},
networks: {
ropsten: {
url: process.env.ROPSTEN_URL || '',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
goerli: {
url: 'https://eth-goerli.g.alchemy.com/v2/0wkBfjpc150LmkMBN7fcsXXlgqHx-GjP',
accounts:
process.env.ETHEREUM_PRIVATE_KEY !== undefined ? [process.env.ETHEREUM_PRIVATE_KEY] : [],
},
starknetGoerli: {
url: 'https://external.integration.starknet.io',
},
ethereumLocal: {
url: 'http://localhost:8545',
chainId: 31337,
},
starknetLocal: {
url: 'http://localhost:5050',
},
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
currency: 'USD',
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
starknet: {
scarbCommand: 'scarb',
network: 'starknetLocal',
recompile: false,
},
paths: {
starknetSources: './starknet',
sources: 'ethereum/src/',
tests: './starknet/test',
cairoPaths: ['starknet/src/'],
},
};

export default config;

0 comments on commit b63ed4d

Please sign in to comment.