@1inch/solidity-utils 2.2.25 → 2.2.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -287,8 +287,9 @@ library SafeERC20 {
|
|
|
287
287
|
mstore(0, selector)
|
|
288
288
|
mstore(4, amount)
|
|
289
289
|
if iszero(call(gas(), weth, 0, 0, 0x24, 0, 0)) {
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
let ptr := mload(0x40)
|
|
291
|
+
returndatacopy(ptr, 0, returndatasize())
|
|
292
|
+
revert(ptr, returndatasize())
|
|
292
293
|
}
|
|
293
294
|
}
|
|
294
295
|
}
|
|
@@ -298,8 +299,9 @@ library SafeERC20 {
|
|
|
298
299
|
if (to != address(this)) {
|
|
299
300
|
assembly ("memory-safe") { // solhint-disable-line no-inline-assembly
|
|
300
301
|
if iszero(call(_RAW_CALL_GAS_LIMIT, to, amount, 0, 0, 0, 0)) {
|
|
301
|
-
|
|
302
|
-
|
|
302
|
+
let ptr := mload(0x40)
|
|
303
|
+
returndatacopy(ptr, 0, returndatasize())
|
|
304
|
+
revert(ptr, returndatasize())
|
|
303
305
|
}
|
|
304
306
|
}
|
|
305
307
|
}
|