Skip to content

Commit

Permalink
✅ test depositToEntryPoint() payable nature
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredBorders committed Aug 5, 2024
1 parent 4cc7998 commit 6010652
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/MarginPaymaster.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,18 @@ contract MarginPaymasterTest is Bootstrap {
assertEq(entryPointBalance, depositAmount + initialPaymasterBalance);
}

function testDepositToEntryPointPayable() public {
uint256 depositAmount = 1e18; // 1 ETH

// Deposit ETH to EntryPoint
marginPaymaster.depositToEntryPoint{value: depositAmount}(depositAmount);

// Check if the deposit was successful
uint256 entryPointBalance =
entryPoint.balanceOf(address(marginPaymaster));
assertEq(entryPointBalance, depositAmount + initialPaymasterBalance);
}

function testDepositToEntryPoint_onlyOwner() public {
uint256 depositAmount = 1e18; // 1 ETH

Expand Down

0 comments on commit 6010652

Please sign in to comment.