I'm working on a router contract that calls MulticallerWithSender in order to "forward" the router's address as msg.sender
.
function permitMulticallWithSender(
address user,
ISignatureTransfer.PermitBatchTransferFrom memory permit,
address[] calldata targets,
bytes[] calldata data,
uint256[] calldata values,
bytes memory permitSignature
) external {
if (permitSignature.length != 0) {
// Use permit to transfer tokens from user to router
_handlePermitBatch(user, permit, permitSignature);
}
// Perform the multicall and refund to the user
MULTICALLER_WITH_SENDER.aggregateWithSender(targets, data, values);
}
multicaller = MulticallerEtcher.multicaller();
multicallerWithSender = MulticallerEtcher.multicallerWithSender();