Newer versions of forge show this warning:
[⠊] Compiling...
[⠢] Compiling 93 files with 0.8.4
[⠘] Solc 0.8.4 finished in 20.09s
Compiler run successful (with warnings)
warning[2018]: Warning: Function state mutability can be restricted to view
--> forge-test/TokenImplementation.t.sol:76:5:
|
| function simulatePermitSignature(
| ^ (Relevant source part starts here and spans across multiple lines).
This change cleans it up.
The BridgeTest contract inherited from both Bridge and forge-std's
Test contracts. This was fine with the ancient version of
forge-std it was using, but newer forge-std has an isFork() from
foundry-rs/forge-std#236. This makes upgrading forge-std to take
advantage of new features like improved invariant testing or smart
fuzzing impossibru.
This makes it a bit cleaner and also fixes some of the logic in the
testTruncate to not be undefined.
Thanks @scnale for the assist on this one!
Added a `uint256 evmChainId` state variable to the Core, Token and NFT Bridge
contracts. `evmChainId` is compared to `block.chainid` in the `chainId`
function. When they don't match, a "bad fork" Chain ID is returned,
otherwise the Wormhole Chain ID is returned.