Skip to content

Commit

Permalink
fix: remove iszero from try
Browse files Browse the repository at this point in the history
  • Loading branch information
kopy-kat committed May 27, 2024
1 parent d6d67db commit 338bf8a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/ExecutionHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ contract ExecutionHelper {
assembly {

Check warning on line 78 in src/core/ExecutionHelper.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

Avoid to use inline assembly. It is acceptable only in rare cases
result := mload(0x40)
calldatacopy(result, callData.offset, callData.length)
success := iszero(call(gas(), target, value, result, callData.length, codesize(), 0x00))
success := call(gas(), target, value, result, callData.length, codesize(), 0x00)
mstore(result, returndatasize()) // Store the length.
let o := add(result, 0x20)
returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.
Expand Down Expand Up @@ -124,8 +124,7 @@ contract ExecutionHelper {
result := mload(0x40)
calldatacopy(result, callData.offset, callData.length)
// Forwards the `data` to `delegate` via delegatecall.
success :=
iszero(delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00))
success := delegatecall(gas(), delegate, result, callData.length, codesize(), 0x00)
mstore(result, returndatasize()) // Store the length.
let o := add(result, 0x20)
returndatacopy(o, 0x00, returndatasize()) // Copy the returndata.
Expand Down

0 comments on commit 338bf8a

Please sign in to comment.