Skip to content

Commit 6af24ff

Browse files
committed
Update DepositManagerTest.sol
1 parent 4610f5d commit 6af24ff

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

contracts/test/core/DepositManagerTest.sol

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)