Skip to content

Commit

Permalink
overloading
Browse files Browse the repository at this point in the history
  • Loading branch information
d10r committed Oct 2, 2024
1 parent 4743fd3 commit da62bcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/ethereum-contracts/contracts/utils/ForwarderBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ abstract contract ForwarderBase {
}

function _forwardBatchCall(ISuperfluid.Operation[] memory ops) internal returns (bool) {
return _forwardBatchCall(ops, 0);
return _forwardBatchCallWithValue(ops, 0);
}

function _forwardBatchCall(ISuperfluid.Operation[] memory ops, uint256 valueToForward) internal returns (bool) {
function _forwardBatchCallWithValue(ISuperfluid.Operation[] memory ops, uint256 valueToForward)
internal
returns (bool)
{
bytes memory fwBatchCallData = abi.encodeCall(_host.forwardBatchCall, (ops));

// https://eips.ethereum.org/EIPS/eip-2771
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ contract MacroForwarder is ForwarderBase {
function runMacro(IUserDefinedMacro m, bytes calldata params) external payable returns (bool)
{
ISuperfluid.Operation[] memory operations = buildBatchOperations(m, params);
bool retVal = _forwardBatchCall(operations, msg.value);
bool retVal = _forwardBatchCallWithValue(operations, msg.value);
m.postCheck(_host, params, msg.sender);
return retVal;
}
Expand Down

0 comments on commit da62bcd

Please sign in to comment.