Skip to content

Commit

Permalink
chore: internal
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Nov 12, 2024
1 parent b8b9e77 commit 4c7a3fa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions contracts/src/utils/MultiSend.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ contract MultiSendCallOnly {
* @notice This method is payable as delegatecalls keep the msg.value from the previous call
* If the calling method (e.g. execTransaction) received ETH this would revert otherwise
*/
function multiSend(bytes memory transactions) public payable {
function multiSend(bytes memory transactions) internal {
/* solhint-disable no-inline-assembly */
assembly {
let length := mload(transactions)
Expand All @@ -50,9 +50,13 @@ contract MultiSendCallOnly {
let data := add(transactions, add(i, 0x55))
let success := 0
switch operation
case 0 { success := call(gas(), to, value, data, dataLength, 0, 0) }
case 0 {
success := call(gas(), to, value, data, dataLength, 0, 0)
}
// This version does not allow delegatecalls
case 1 { revert(0, 0) }
case 1 {
revert(0, 0)
}
if eq(success, 0) {
returndatacopy(0, 0, returndatasize())
revert(0, returndatasize())
Expand Down

0 comments on commit 4c7a3fa

Please sign in to comment.