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/src/contracts/atlas/Escrow.sol b/src/contracts/atlas/Escrow.sol index 9d2546504..5b255a656 100644 --- a/src/contracts/atlas/Escrow.sol +++ b/src/contracts/atlas/Escrow.sol @@ -208,7 +208,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; @@ -225,7 +225,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 2e4266910..88ee6602e 100644 --- a/test/Escrow.t.sol +++ b/test/Escrow.t.sol @@ -661,11 +661,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 288fd27db..b864ec0ef 100644 --- a/test/FlashLoan.t.sol +++ b/test/FlashLoan.t.sol @@ -120,7 +120,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 }); @@ -165,7 +172,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 }); @@ -224,7 +238,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();