Commit Graph

5 Commits

Author SHA1 Message Date
Jeff Schroeder ca2f8ce283 ethereum: change inheritance for BridgeTest
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!
2023-05-17 12:51:26 -05:00
Kevin Peters b1081d7d93 ethereum: Simplified forked chain check
No longer need to return uint16 max in chainId() for forked chains
2022-09-09 13:16:27 -05:00
Kevin Peters ae04a305f3 ethereum: fixed tests 2022-09-09 13:16:27 -05:00
Kevin Peters 9d477e0585 ethereum: EVM fork protection
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.
2022-09-09 13:16:27 -05:00
Csongor Kiss fd540c91b4
ethereum: Check that bytes32 fits into 20 bytes before truncating (#1457) 2022-08-23 14:41:03 -04:00