Skip to content

Commit

Permalink
🚧 Get rid of nonce conflicts (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista authored Jan 10, 2024
1 parent 81a97d0 commit 9182c69
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/devtools-evm-hardhat-test/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const config: HardhatUserConfig = {
url: process.env.NETWORK_URL_VENGABOYS ?? 'http://localhost:10001',
accounts: {
mnemonic: MNEMONIC,
initialIndex: 0,
},
},
britney: {
Expand All @@ -38,6 +39,7 @@ const config: HardhatUserConfig = {
url: process.env.NETWORK_URL_BRITNEY ?? 'http://localhost:10002',
accounts: {
mnemonic: MNEMONIC,
initialIndex: 0,
},
},
},
Expand Down
8 changes: 8 additions & 0 deletions tests/test-evm-node/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ const config: HardhatUserConfig = {
hardhat: {
accounts: {
mnemonic: MNEMONIC,
// We'll reserve 10 accounts per every test project
//
// When adding new E2E test projects, bumpt this number
// and set the initialIndex in your project's network config
// so that the accounts the projects uses do not overlap with other projects
//
// This will ensure that there are no nonce race conditions when running the tests in parallel
count: 20,
},
},
},
Expand Down
8 changes: 8 additions & 0 deletions tests/ua-devtools-evm-hardhat-test/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ const config: HardhatUserConfig = {
url: process.env.NETWORK_URL_VENGABOYS ?? 'http://localhost:10001',
accounts: {
mnemonic: MNEMONIC,
// We'll offset the initial index for the accounts by 10
// for every test project so that the project can use 10 accounts
// without getting any nonce race conditions with other test runs
initialIndex: 10,
},
},
britney: {
Expand All @@ -42,6 +46,10 @@ const config: HardhatUserConfig = {
url: process.env.NETWORK_URL_BRITNEY ?? 'http://localhost:10002',
accounts: {
mnemonic: MNEMONIC,
// We'll offset the initial index for the accounts by 10
// for every test project so that the project can use 10 accounts
// without getting any nonce race conditions with other test runs
initialIndex: 10,
},
},
},
Expand Down

0 comments on commit 9182c69

Please sign in to comment.