-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate
MerkleProof
tests among other testing utilities (#4689)
- Loading branch information
Showing
17 changed files
with
261 additions
and
326 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
const hre = require('hardhat'); | ||
|
||
async function getChainId() { | ||
const chainIdHex = await hre.network.provider.send('eth_chainId', []); | ||
return new hre.web3.utils.BN(chainIdHex, 'hex'); | ||
} | ||
const { ethers } = require('hardhat'); | ||
|
||
module.exports = { | ||
getChainId, | ||
// TODO: when tests are ready to support bigint chainId | ||
// getChainId: ethers.provider.getNetwork().then(network => network.chainId), | ||
// TODO: remove conversion toNumber() when bigint are supported | ||
getChainId: () => ethers.provider.getNetwork().then(network => ethers.toNumber(network.chainId)), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
const MAX_UINT48 = web3.utils.toBN(1).shln(48).subn(1).toString(); | ||
const MAX_UINT64 = web3.utils.toBN(1).shln(64).subn(1).toString(); | ||
|
||
// TODO: remove toString() when bigint are supported | ||
module.exports = { | ||
MAX_UINT48, | ||
MAX_UINT64, | ||
MAX_UINT48: (2n ** 48n - 1n).toString(), | ||
MAX_UINT64: (2n ** 64n - 1n).toString(), | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.