mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
updated hardhat config with new chains
This commit is contained in:
parent
06d75ac7c7
commit
42499c527f
|
@ -3,7 +3,7 @@ import fs from 'fs';
|
|||
import { HardhatUserConfig } from 'hardhat/types';
|
||||
// @ts-ignore
|
||||
import { accounts } from './test-wallets.js';
|
||||
import { eEthereumNetwork, iParamsPerNetwork } from './helpers/types';
|
||||
import { eEthereumNetwork, ePolygonNetwork, eXDaiNetwork } from './helpers/types';
|
||||
import { BUIDLEREVM_CHAINID, COVERAGE_CHAINID } from './helpers/buidler-constants';
|
||||
import { NETWORKS_RPC_URL, NETWORKS_DEFAULT_GAS } from './helper-hardhat-config';
|
||||
|
||||
|
@ -41,7 +41,7 @@ if (!SKIP_LOAD) {
|
|||
|
||||
require(`${path.join(__dirname, 'tasks/misc')}/set-bre.ts`);
|
||||
|
||||
const getCommonNetworkConfig = (networkName: eEthereumNetwork, networkId: number) => ({
|
||||
const getCommonNetworkConfig = (networkName: eEthereumNetwork | ePolygonNetwork | eXDaiNetwork, networkId: number) => ({
|
||||
url: NETWORKS_RPC_URL[networkName],
|
||||
hardfork: HARDFORK,
|
||||
blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT,
|
||||
|
@ -95,8 +95,9 @@ const buidlerConfig: HardhatUserConfig = {
|
|||
ropsten: getCommonNetworkConfig(eEthereumNetwork.ropsten, 3),
|
||||
main: getCommonNetworkConfig(eEthereumNetwork.main, 1),
|
||||
tenderlyMain: getCommonNetworkConfig(eEthereumNetwork.main, 1),
|
||||
matic: getCommonNetworkConfig(eEthereumNetwork.matic, 137),
|
||||
mumbai: getCommonNetworkConfig(eEthereumNetwork.mumbai, 80001),
|
||||
matic: getCommonNetworkConfig(ePolygonNetwork.matic, 137),
|
||||
mumbai: getCommonNetworkConfig(ePolygonNetwork.mumbai, 80001),
|
||||
xdai: getCommonNetworkConfig(eXDaiNetwork.xdai, 100),
|
||||
hardhat: {
|
||||
hardfork: 'istanbul',
|
||||
blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// @ts-ignore
|
||||
import { eEthereumNetwork, iParamsPerNetwork } from './helpers/types';
|
||||
import { eEthereumNetwork, ePolygonNetwork, eXDaiNetwork, iParamsPerNetwork } from './helpers/types';
|
||||
|
||||
require('dotenv').config();
|
||||
|
||||
|
@ -24,9 +24,9 @@ export const NETWORKS_RPC_URL: iParamsPerNetwork<string> = {
|
|||
[eEthereumNetwork.tenderlyMain]: ALCHEMY_KEY
|
||||
? `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_KEY}`
|
||||
: `https://mainnet.infura.io/v3/${INFURA_KEY}`,
|
||||
[eEthereumNetwork.mumbai]: 'https://rpc-mumbai.maticvigil.com',
|
||||
[eEthereumNetwork.matic]: 'https://rpc-mainnet.matic.network',
|
||||
[eEthereumNetwork.xdai]: 'https://rpc.xdaichain.com/',
|
||||
[ePolygonNetwork.mumbai]: 'https://rpc-mumbai.maticvigil.com',
|
||||
[ePolygonNetwork.matic]: 'https://rpc-mainnet.matic.network',
|
||||
[eXDaiNetwork.xdai]: 'https://rpc.xdaichain.com/',
|
||||
}
|
||||
|
||||
export const NETWORKS_DEFAULT_GAS: iParamsPerNetwork<number> = {
|
||||
|
@ -37,7 +37,7 @@ export const NETWORKS_DEFAULT_GAS: iParamsPerNetwork<number> = {
|
|||
[eEthereumNetwork.hardhat]: 65 * GWEI ,
|
||||
[eEthereumNetwork.buidlerevm]: 65 * GWEI ,
|
||||
[eEthereumNetwork.tenderlyMain]: 65 * GWEI ,
|
||||
[eEthereumNetwork.mumbai]: 1 * GWEI ,
|
||||
[eEthereumNetwork.matic]: 2 * GWEI ,
|
||||
[eEthereumNetwork.xdai]: 1 * GWEI,
|
||||
[ePolygonNetwork.mumbai]: 1 * GWEI ,
|
||||
[ePolygonNetwork.matic]: 2 * GWEI ,
|
||||
[eXDaiNetwork.xdai]: 1 * GWEI,
|
||||
}
|
Loading…
Reference in New Issue
Block a user