Commit bbb70f64 authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: cleanup diff

parent 4c8596ba
...@@ -530,9 +530,7 @@ abstract contract Deployer is Script { ...@@ -530,9 +530,7 @@ abstract contract Deployer is Script {
if (_isProxy) { if (_isProxy) {
_contractName = string.concat(_contractName, "Proxy"); _contractName = string.concat(_contractName, "Proxy");
} }
address addr = getAddress(_contractName); bytes32 slotVal = vm.load(mustGetAddress(_contractName), bytes32(vm.parseUint(slot.slot)));
bytes32 slotVal = vm.load(addr, bytes32(vm.parseUint(slot.slot)));
initialized_ = uint8((uint256(slotVal) >> (slot.offset * 8)) & 0xFF); initialized_ = uint8((uint256(slotVal) >> (slot.offset * 8)) & 0xFF);
} }
......
...@@ -120,7 +120,7 @@ contract Initializer_Test is Bridge_Initializer { ...@@ -120,7 +120,7 @@ contract Initializer_Test is Bridge_Initializer {
/// 3. The `initialize()` function of each contract cannot be called more than once. /// 3. The `initialize()` function of each contract cannot be called more than once.
function test_cannotReinitialize_succeeds() public { function test_cannotReinitialize_succeeds() public {
// Ensure that all L1 `Initializable` contracts are accounted for. // Ensure that all L1 `Initializable` contracts are accounted for.
assertEq(_getNumL1Initializable(), contracts.length); assertEq(_getNumInitializable(), contracts.length);
// Attempt to re-initialize all contracts within the `contracts` array. // Attempt to re-initialize all contracts within the `contracts` array.
for (uint256 i; i < contracts.length; i++) { for (uint256 i; i < contracts.length; i++) {
...@@ -136,8 +136,8 @@ contract Initializer_Test is Bridge_Initializer { ...@@ -136,8 +136,8 @@ contract Initializer_Test is Bridge_Initializer {
} }
} }
/// @dev Returns the number of contracts that are `Initializable` in `src/L1`. /// @dev Returns the number of contracts that are `Initializable` in `src/L1` and `src/L2`.
function _getNumL1Initializable() internal returns (uint256 numContracts_) { function _getNumInitializable() internal returns (uint256 numContracts_) {
string[] memory command = new string[](3); string[] memory command = new string[](3);
command[0] = Executables.bash; command[0] = Executables.bash;
command[1] = "-c"; command[1] = "-c";
......
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