diff --git a/test/DelegateContractV0.t.sol b/test/DelegateContractV0.t.sol index d4a657c..96a6af0 100644 --- a/test/DelegateContractV0.t.sol +++ b/test/DelegateContractV0.t.sol @@ -40,8 +40,6 @@ contract DelegateContractV0Test is Test { calls[0] = DelegateContractV0.Call({data: "", to: bob.addr, value: alice.addr.balance}); vm.signAndAttachDelegation(address(delegateContract), alice.privateKey); - (bool success,) = address(0).call(""); // execute a call to submit the delegation tx - require(success); assertGt(alice.addr.code.length, 0); diff --git a/test/DelegateContractV1.t.sol b/test/DelegateContractV1.t.sol index 663a633..6c4cf14 100644 --- a/test/DelegateContractV1.t.sol +++ b/test/DelegateContractV1.t.sol @@ -36,7 +36,6 @@ contract DelegateContractV1Test is Test { function test_noGuardiansInAccounts() public { vm.signAndAttachDelegation(address(delegateContract), alice.privateKey); vm.signAndAttachDelegation(address(delegateContract), bob.privateKey); - address(0).call(""); // by design, anyone with the signed authorizations can attach and submit the tx assertGt(alice.addr.code.length, 0); assertGt(bob.addr.code.length, 0); diff --git a/test/DelegateContractV2.t.sol b/test/DelegateContractV2.t.sol index 2d19047..c11f101 100644 --- a/test/DelegateContractV2.t.sol +++ b/test/DelegateContractV2.t.sol @@ -26,8 +26,6 @@ contract DelegateContractV2Test is Test { vm.deal(alice.addr, 1 ether); vm.signAndAttachDelegation(address(delegateContract), alice.privateKey); - vm.prank(alice.addr); // not needed to be alice herself - by design, anyone with the signed authorization can attach and submit - address(0).call(""); assertGt(alice.addr.code.length, 0); diff --git a/test/DelegateContractV4.t.sol b/test/DelegateContractV4.t.sol index 14f1532..19b4c09 100644 --- a/test/DelegateContractV4.t.sol +++ b/test/DelegateContractV4.t.sol @@ -38,38 +38,37 @@ contract DelegateContractV4Test is Test { /** * The storage layout of DelegateContractV3 is as follows: - * + * * forge inspect DelegateContractV3 storageLayout - ╭-----------+--------------------------+------+--------+-------+-----------------------------------------------╮ - | Name | Type | Slot | Offset | Bytes | Contract | - +==============================================================================================================+ - | _status | uint256 | 0 | 0 | 32 | src/DelegateContractV3.sol:DelegateContractV3 | - |-----------+--------------------------+------+--------+-------+-----------------------------------------------| - | init | bool | 1 | 0 | 1 | src/DelegateContractV3.sol:DelegateContractV3 | - |-----------+--------------------------+------+--------+-------+-----------------------------------------------| - | guardians | mapping(address => bool) | 2 | 0 | 32 | src/DelegateContractV3.sol:DelegateContractV3 | - ╰-----------+--------------------------+------+--------+-------+-----------------------------------------------╯ + * ╭-----------+--------------------------+------+--------+-------+-----------------------------------------------╮ + * | Name | Type | Slot | Offset | Bytes | Contract | + * +==============================================================================================================+ + * | _status | uint256 | 0 | 0 | 32 | src/DelegateContractV3.sol:DelegateContractV3 | + * |-----------+--------------------------+------+--------+-------+-----------------------------------------------| + * | init | bool | 1 | 0 | 1 | src/DelegateContractV3.sol:DelegateContractV3 | + * |-----------+--------------------------+------+--------+-------+-----------------------------------------------| + * | guardians | mapping(address => bool) | 2 | 0 | 32 | src/DelegateContractV3.sol:DelegateContractV3 | + * ╰-----------+--------------------------+------+--------+-------+-----------------------------------------------╯ */ // Alice moves to V4 vm.signAndAttachDelegation(address(delegateContractV4), alice.privateKey); - address(0).call(""); /** * The storage layout of DelegateContractV4 is as follows: - + * * forge inspect DelegateContractV4 storageLayout - ╭-----------+--------------------------+------+--------+-------+-----------------------------------------------╮ - | Name | Type | Slot | Offset | Bytes | Contract | - +==============================================================================================================+ - | _status | uint256 | 0 | 0 | 32 | src/DelegateContractV4.sol:DelegateContractV4 | - |-----------+--------------------------+------+--------+-------+-----------------------------------------------| - | paused | bool | 1 | 0 | 1 | src/DelegateContractV4.sol:DelegateContractV4 | - |-----------+--------------------------+------+--------+-------+-----------------------------------------------| - | guardians | mapping(address => bool) | 2 | 0 | 32 | src/DelegateContractV4.sol:DelegateContractV4 | - ╰-----------+--------------------------+------+--------+-------+-----------------------------------------------╯ + * ╭-----------+--------------------------+------+--------+-------+-----------------------------------------------╮ + * | Name | Type | Slot | Offset | Bytes | Contract | + * +==============================================================================================================+ + * | _status | uint256 | 0 | 0 | 32 | src/DelegateContractV4.sol:DelegateContractV4 | + * |-----------+--------------------------+------+--------+-------+-----------------------------------------------| + * | paused | bool | 1 | 0 | 1 | src/DelegateContractV4.sol:DelegateContractV4 | + * |-----------+--------------------------+------+--------+-------+-----------------------------------------------| + * | guardians | mapping(address => bool) | 2 | 0 | 32 | src/DelegateContractV4.sol:DelegateContractV4 | + * ╰-----------+--------------------------+------+--------+-------+-----------------------------------------------╯ */ - + // Slot 0 continues to be ReentrancyGuard::_status assertEq(vm.load(alice.addr, 0), bytes32(0));