We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9cfaf6 commit 0399312Copy full SHA for 0399312
1 file changed
src/contracts/utils/ChainHelpers.sol
@@ -29,6 +29,7 @@ library ChainIds {
29
uint256 internal constant BOB = 60808;
30
uint256 internal constant PLASMA = 9745;
31
uint256 internal constant XLAYER = 196;
32
+ uint256 internal constant ANVIL = 31337;
33
}
34
35
library TestNetChainIds {
@@ -59,7 +60,7 @@ library ChainHelpers {
59
60
error UnknownChainId();
61
62
function selectChain(Vm vm, uint256 chainId) internal returns (uint256, uint256) {
- uint256 previousFork = vm.activeFork();
63
+ uint256 previousFork = block.chainid != ChainIds.ANVIL ? vm.activeFork() : type(uint256).max;
64
if (chainId == block.chainid) return (previousFork, previousFork);
65
uint256 newFork;
66
if (chainId == ChainIds.MAINNET) {
0 commit comments