uniswap-interface-uncensored/hardhat.config.js
Jordan Frankfurt 115c65500b
feat: mining mode switch to disable auto-mine (#6450)
* feat: mining mode switch to update so we can make assertions about pending transaction state

* update test to use explicit mining

* Update hardhat.config.js

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2023-04-26 15:16:51 -05:00

32 lines
789 B
JavaScript

/* eslint-env node */
require('dotenv').config()
// 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
const mainnetFork = {
url: `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}`,
blockNumber: BLOCK_NUMBER,
httpHeaders: {
Origin: 'localhost:3000', // infura allowlists requests by origin
},
}
module.exports = {
networks: {
hardhat: {
chainId: 1,
forking: mainnetFork,
accounts: {
count: 1,
},
// Disable auto-mining so that e2e tests can explicitly test pending states.
mining: {
auto: false,
interval: 0,
},
},
},
}