diff --git a/lib/forge-std b/lib/forge-std index 1de6eecf8..5a802d7c1 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 1de6eecf821de7fe2c908cc48d3ab3dced20717f +Subproject commit 5a802d7c10abb4bbfb3e7214c75052ef9e6a06f8 diff --git a/lib/solady b/lib/solady index 973b785be..42af395e6 160000 --- a/lib/solady +++ b/lib/solady @@ -1 +1 @@ -Subproject commit 973b785beefcb66934844155ccf2639ce10e980c +Subproject commit 42af395e631fcc9d640eddf11c57c6f1ca3f9103 diff --git a/src/contracts/atlas/Escrow.sol b/src/contracts/atlas/Escrow.sol index 4adfe4bb0..ec4b0666a 100644 --- a/src/contracts/atlas/Escrow.sol +++ b/src/contracts/atlas/Escrow.sol @@ -207,7 +207,7 @@ abstract contract Escrow is AtlETH { if (_result.executionSuccessful()) { // First successful solver call that paid what it bid emit SolverTxResult( - solverOp.solver, solverOp.from, true, true, _result, bidAmount, solverOp.bidToken + solverOp.solver, solverOp.from, dConfig.to, solverOp.bidToken, bidAmount, true, true, _result ); ctx.solverSuccessful = true; @@ -224,7 +224,14 @@ abstract contract Escrow is AtlETH { _handleSolverAccounting(solverOp, _gasWaterMark, _result, !prevalidated); emit SolverTxResult( - solverOp.solver, solverOp.from, _result.executedWithError(), false, _result, bidAmount, solverOp.bidToken + solverOp.solver, + solverOp.from, + dConfig.to, + solverOp.bidToken, + bidAmount, + _result.executedWithError(), + false, + _result ); return 0; diff --git a/src/contracts/types/AtlasEvents.sol b/src/contracts/types/AtlasEvents.sol index cc504d85f..54093db8e 100644 --- a/src/contracts/types/AtlasEvents.sol +++ b/src/contracts/types/AtlasEvents.sol @@ -23,11 +23,12 @@ contract AtlasEvents { event SolverTxResult( address indexed solverTo, address indexed solverFrom, + address indexed dAppControl, + address bidToken, + uint256 bidAmount, bool executed, bool success, - uint256 result, - uint256 bidAmount, - address bidToken + uint256 result ); // Factory events diff --git a/test/Escrow.t.sol b/test/Escrow.t.sol index 4ac30686d..2eb667754 100644 --- a/test/Escrow.t.sol +++ b/test/Escrow.t.sol @@ -660,11 +660,12 @@ contract EscrowTest is BaseTest { emit AtlasEvents.SolverTxResult( solverOps[0].solver, solverOps[0].from, + userOp.control, + solverOps[0].bidToken, + solverOps[0].bidAmount, solverOpExecuted, solverOpSuccess, - expectedResult, - solverOps[0].bidAmount, - solverOps[0].bidToken + expectedResult ); vm.prank(userEOA); diff --git a/test/FlashLoan.t.sol b/test/FlashLoan.t.sol index 064c28725..bc7716521 100644 --- a/test/FlashLoan.t.sol +++ b/test/FlashLoan.t.sol @@ -119,7 +119,14 @@ contract FlashLoanTest is BaseTest { vm.expectEmit(true, true, true, true); uint256 result = (1 << uint256(SolverOutcome.BidNotPaid)); emit AtlasEvents.SolverTxResult( - address(solver), solverOneEOA, true, false, result, solverOps[0].bidAmount, solverOps[0].bidToken + address(solver), + solverOneEOA, + userOp.control, + solverOps[0].bidToken, + solverOps[0].bidAmount, + true, + false, + result ); vm.expectRevert(); atlas.metacall({ userOp: userOp, solverOps: solverOps, dAppOp: dAppOp }); @@ -164,7 +171,14 @@ contract FlashLoanTest is BaseTest { result = (1 << uint256(SolverOutcome.CallValueTooHigh)); console.log("result", result); emit AtlasEvents.SolverTxResult( - address(solver), solverOneEOA, false, false, result, solverOps[0].bidAmount, solverOps[0].bidToken + address(solver), + solverOneEOA, + userOp.control, + solverOps[0].bidToken, + solverOps[0].bidAmount, + false, + false, + result ); vm.expectRevert(); atlas.metacall({ userOp: userOp, solverOps: solverOps, dAppOp: dAppOp }); @@ -223,7 +237,14 @@ contract FlashLoanTest is BaseTest { result = 0; vm.expectEmit(true, true, true, true); emit AtlasEvents.SolverTxResult( - address(solver), solverOneEOA, true, true, result, solverOps[0].bidAmount, solverOps[0].bidToken + address(solver), + solverOneEOA, + userOp.control, + solverOps[0].bidToken, + solverOps[0].bidAmount, + true, + true, + result ); atlas.metacall({ userOp: userOp, solverOps: solverOps, dAppOp: dAppOp }); vm.stopPrank();