Skip to content

Commit

Permalink
test: update to use new cheatcode
Browse files Browse the repository at this point in the history
  • Loading branch information
lightclient committed Jul 18, 2024
1 parent d779d52 commit d8eea58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions test/Consolidation.t.sol.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,18 @@ contract ConsolidationTest is Test {
function testConsolidation() public {
bytes memory data = hex"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222";

vm.expectEmit(false, false, false, true);
vm.expectEmitAnonymous(false, false, false, false, true);
assembly {
let ptr := mload(0x40)
mstore(ptr, shl(96, address()))
mstore(add(ptr, 20), mload(add(data, 32)))
mstore(add(ptr, 52), mload(add(data, 64)))
log0(ptr, 76)
mstore(add(ptr, 84), mload(add(data, 96)))
log0(ptr, 116)
}

(bool ret,) = addr.call{value: 2}(data);
assertEq(ret, true);
assertEq(ret, true, "call failed");
assertStorage(count_slot, 1, "unexpected request count");
assertExcess(0);

Expand Down
2 changes: 1 addition & 1 deletion test/Withdrawal.t.sol.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ contract WithdrawalsTest is Test {
function testWithdrawal() public {
bytes memory data = hex"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222";

vm.expectEmit(false, false, false, true);
vm.expectEmitAnonymous(false, false, false, false, true);
assembly {
let ptr := mload(0x40)
mstore(ptr, shl(96, address()))
Expand Down

0 comments on commit d8eea58

Please sign in to comment.