File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -82,4 +82,28 @@ contract TokenReceiveTest is CoinbaseImplementationTest {
8282 token.transfer (uninitProxy, TOKEN_AMOUNT);
8383 assertEq (token.balanceOf (uninitProxy), TOKEN_AMOUNT);
8484 }
85+
86+ function test_succeeds_ETHTransfer_afterInitialization () public {
87+ // Fund test contract
88+ vm.deal (address (this ), 1 ether);
89+
90+ // Send ETH to initialized wallet
91+ (bool success , ) = _eoa.call {value: 1 ether }("" );
92+ assertTrue (success);
93+ assertEq (_eoa.balance, 1 ether);
94+ }
95+
96+ function test_succeeds_ETHTransfer_beforeInitialization () public {
97+ // Deploy proxy without initializing
98+ address payable uninitProxy = payable (makeAddr ("uninitProxy " ));
99+ _deployProxy (uninitProxy);
100+
101+ // Fund test contract
102+ vm.deal (address (this ), 1 ether);
103+
104+ // Send ETH to uninitialized wallet
105+ (bool success , ) = uninitProxy.call {value: 1 ether }("" );
106+ assertTrue (success);
107+ assertEq (uninitProxy.balance, 1 ether);
108+ }
85109}
You can’t perform that action at this time.
0 commit comments