File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,17 @@ contract DepositManagerTest is Test {
2323 vm.signAndAttachDelegation (address (depositManagerImpl), BOB_PK);
2424 }
2525
26- function testCodeAtAddress () public view {
26+ function testCodeAtAddress () public {
2727 bytes32 expectedCodehash = keccak256 (abi.encodePacked (hex "ef0100 " , address (depositManagerImpl)));
2828 assertEq (alice.codehash, expectedCodehash);
2929 assertEq (alice.code.length , 23 );
30+ uint256 otherUserPk = uint256 (0x1237777777 );
31+ address otherUser = payable (vm.addr (otherUserPk));
32+ assertEq (otherUser.codehash, 0x0000000000000000000000000000000000000000000000000000000000000000 );
33+ assertEq (otherUser.code.length , 0 );
34+ vm.signAndAttachDelegation (address (depositManagerImpl), otherUserPk);
35+ assertEq (otherUser.codehash, expectedCodehash);
36+ assertEq (otherUser.code.length , 23 );
3037 }
3138
3239 function testFallbackRevert () public {
You can’t perform that action at this time.
0 commit comments