Commit 7037e66f authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: bump `forge-std`

Bumps `forge-std` to `37a37ab73364d6644bfe11edf88a07880f99bd56`.
This is not a release commit but it does include the latest change
to the `Vm` such that `loadAllocs(string)` is included. Pulling this
in now unblocks progress on loading in the L2 genesis state into the
solidity tests. We can update the `forge-std` version to an official
release in the future.

All diffs are updating changes to `forge-std` so that things compile
again.
parent cd156ff9
This diff is collapsed.
Subproject commit e8a047e3f40f13fa37af6fe14e6e06283d9a060e
Subproject commit 37a37ab73364d6644bfe11edf88a07880f99bd56
......@@ -284,7 +284,7 @@ abstract contract Deployer is Script {
}
/// @notice Returns the contract name from a deploy transaction.
function _getContractNameFromDeployTransaction(string memory _deployTx) internal returns (string memory) {
function _getContractNameFromDeployTransaction(string memory _deployTx) internal pure returns (string memory) {
return stdJson.readString(_deployTx, ".contractName");
}
......
......@@ -13,7 +13,7 @@ contract SafeCall_Test is Test {
vm.assume(from.balance == 0);
vm.assume(to.balance == 0);
// no precompiles (mainnet)
assumeNoPrecompiles(to, 1);
assumeNotPrecompile(to);
// don't call the vm
vm.assume(to != address(vm));
vm.assume(from != address(vm));
......@@ -47,7 +47,7 @@ contract SafeCall_Test is Test {
vm.assume(from.balance == 0);
vm.assume(to.balance == 0);
// no precompiles (mainnet)
assumeNoPrecompiles(to, 1);
assumeNotPrecompile(to);
// don't call the vm
vm.assume(to != address(vm));
vm.assume(from != address(vm));
......@@ -89,7 +89,7 @@ contract SafeCall_Test is Test {
vm.assume(from.balance == 0);
vm.assume(to.balance == 0);
// no precompiles (mainnet)
assumeNoPrecompiles(to, 1);
assumeNotPrecompile(to);
// don't call the vm
vm.assume(to != address(vm));
vm.assume(from != address(vm));
......
......@@ -8,11 +8,6 @@ import { ResourceMetering } from "src/L1/ResourceMetering.sol";
import { Constants } from "src/libraries/Constants.sol";
contract SystemConfig_GasLimitLowerBound_Invariant is Test {
struct FuzzInterface {
address target;
string[] artifacts;
}
SystemConfig public config;
function setUp() external {
......@@ -59,19 +54,14 @@ contract SystemConfig_GasLimitLowerBound_Invariant is Test {
selectors[0] = config.setGasLimit.selector;
FuzzSelector memory selector = FuzzSelector({ addr: address(config), selectors: selectors });
targetSelector(selector);
}
/// @dev Allows the SystemConfig contract to be the target of the invariant test
/// when it is behind a proxy. Foundry calls this function under the hood to
/// know the ABI to use when calling the target contract.
function targetInterfaces() public view returns (FuzzInterface[] memory) {
require(address(config) != address(0), "SystemConfig not initialized");
FuzzInterface[] memory targets = new FuzzInterface[](1);
/// Allows the SystemConfig contract to be the target of the invariant test
/// when it is behind a proxy. Foundry calls this function under the hood to
/// know the ABI to use when calling the target contract.
string[] memory artifacts = new string[](1);
artifacts[0] = "SystemConfig";
targets[0] = FuzzInterface(address(config), artifacts);
return targets;
FuzzInterface memory target = FuzzInterface(address(config), artifacts);
targetInterface(target);
}
/// @custom:invariant The gas limit of the `SystemConfig` contract can never be lower
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment