Skip to content

Commit

Permalink
Merge pull request #1 from dodger213/fix-emit-event-in-SafeL2-execTra…
Browse files Browse the repository at this point in the history
…nsactionFromModuleReturnData

Fix emit event in safe l2 exec transaction from module return data
  • Loading branch information
dodger213 authored Aug 18, 2024
2 parents 209c106 + 513da93 commit ee42192
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions contracts/SafeL2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ contract SafeL2 is Safe {

/**
* @inheritdoc ModuleManager
*/
function onBeforeExecTransactionFromModule(address to, uint256 value, bytes memory data, Enum.Operation operation) internal override {
emit SafeModuleTransaction(msg.sender, to, value, data, operation);

}
}
1 change: 1 addition & 0 deletions contracts/base/ModuleManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ abstract contract ModuleManager is SelfAuthorized, Executor, IModuleManager {

/**
* @notice A hook that gets called before execution of {execTransactionFromModule*} methods.
* @param to Destination address of module transaction.
* @param value Ether value of module transaction.
* @param data Data payload of module transaction.
Expand Down
2 changes: 1 addition & 1 deletion test/core/Safe.Execution.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ describe("Safe", () => {
}
}

expect(parsedLogs[0].forwardedGas).to.be.gte(400000n);
expect(parsedLogs[0].forwardedGas).to.be.gte(399760n);
});
});
});

0 comments on commit ee42192

Please sign in to comment.