Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging to system contracts #17

Merged
merged 4 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: update to use new cheatcode
  • Loading branch information
lightclient committed Jul 18, 2024
commit d8eea580eea537daac00ed43e0dbdc8b3f25b246
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
Loading