Implement ERC-7821 calldata compression in ERC7579Utils (#5602)

This commit is contained in:
Hadrien Croubois
2025-03-27 09:27:34 +01:00
committed by GitHub
parent a31b4a438a
commit 952775e4f1
2 changed files with 49 additions and 4 deletions

View File

@ -218,7 +218,9 @@ library ERC7579Utils {
uint256 value,
bytes calldata data
) private returns (bytes memory) {
(bool success, bytes memory returndata) = target.call{value: value}(data);
(bool success, bytes memory returndata) = (target == address(0) ? address(this) : target).call{value: value}(
data
);
return _validateExecutionMode(index, execType, success, returndata);
}
@ -229,7 +231,7 @@ library ERC7579Utils {
address target,
bytes calldata data
) private returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
(bool success, bytes memory returndata) = (target == address(0) ? address(this) : target).delegatecall(data);
return _validateExecutionMode(index, execType, success, returndata);
}