2023-04-19 10:50:25 -07:00
|
|
|
/* eslint-env node */
|
|
|
|
require('dotenv').config()
|
|
|
|
|
2023-04-25 14:24:57 -07:00
|
|
|
// Block selection is arbitrary, as e2e tests will build up their own state.
|
|
|
|
// The only requirement is that all infrastructure under test (eg Permit2 contracts) are already deployed.
|
|
|
|
const BLOCK_NUMBER = 17023328
|
|
|
|
|
2023-04-19 10:50:25 -07:00
|
|
|
const mainnetFork = {
|
|
|
|
url: `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}`,
|
2023-04-25 14:24:57 -07:00
|
|
|
blockNumber: BLOCK_NUMBER,
|
2023-04-19 10:50:25 -07:00
|
|
|
httpHeaders: {
|
|
|
|
Origin: 'localhost:3000', // infura allowlists requests by origin
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
networks: {
|
|
|
|
hardhat: {
|
|
|
|
chainId: 1,
|
|
|
|
forking: mainnetFork,
|
|
|
|
accounts: {
|
2023-05-18 16:32:35 -04:00
|
|
|
count: 2,
|
2023-04-19 10:50:25 -07:00
|
|
|
},
|
2023-04-26 15:16:51 -05:00
|
|
|
mining: {
|
2023-05-04 08:31:53 -07:00
|
|
|
auto: true, // automine to make tests easier to write.
|
|
|
|
interval: 0, // do not interval mine so that tests remain deterministic
|
2023-04-26 15:16:51 -05:00
|
|
|
},
|
2023-04-19 10:50:25 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|