Skip to content

Commit

Permalink
feat: remove native transfer gas limit (#189)
Browse files Browse the repository at this point in the history
Gas limit for native transfer can cause some reasonable smart contract
wallets that perform operations in their receive function to be unable
to receive native output from uniswapX. compatibilty preferred here

Resolves M-02
  • Loading branch information
marktoda authored Aug 21, 2023
1 parent 0b5ec8c commit d2e90d1
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
150417
181978
Original file line number Diff line number Diff line change
@@ -1 +1 @@
190447
190411
Original file line number Diff line number Diff line change
@@ -1 +1 @@
133774
133756
Original file line number Diff line number Diff line change
@@ -1 +1 @@
157505
137605
Original file line number Diff line number Diff line change
@@ -1 +1 @@
182186
150633
Original file line number Diff line number Diff line change
@@ -1 +1 @@
190845
190809
Original file line number Diff line number Diff line change
@@ -1 +1 @@
133986
95568
Original file line number Diff line number Diff line change
@@ -1 +1 @@
146554
178116
Original file line number Diff line number Diff line change
@@ -1 +1 @@
182618
182582
2 changes: 1 addition & 1 deletion .forge-snapshots/Base-LimitOrderReactor-ExecuteSingle.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
124433
144333
Original file line number Diff line number Diff line change
@@ -1 +1 @@
129913
129895
Original file line number Diff line number Diff line change
@@ -1 +1 @@
153643
133743
2 changes: 1 addition & 1 deletion .forge-snapshots/DirectFillerFillMacroTestEth1Output.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
147399
147390
2 changes: 1 addition & 1 deletion .forge-snapshots/DirectFillerFillMacroTestEth2Outputs.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
170622
170604
Original file line number Diff line number Diff line change
@@ -1 +1 @@
363514
363478
2 changes: 1 addition & 1 deletion .forge-snapshots/EthOutputTestEthOutput.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
156241
156223
Original file line number Diff line number Diff line change
@@ -1 +1 @@
162961
162907
Original file line number Diff line number Diff line change
@@ -1 +1 @@
146909
146873
Original file line number Diff line number Diff line change
@@ -1 +1 @@
124947
124929
3 changes: 1 addition & 2 deletions src/lib/CurrencyLibrary.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {SafeCast} from "openzeppelin-contracts/utils/math/SafeCast.sol";
import {SafeTransferLib} from "solmate/src/utils/SafeTransferLib.sol";

address constant NATIVE = 0x0000000000000000000000000000000000000000;
uint256 constant TRANSFER_NATIVE_GAS_LIMIT = 6900;

/// @title CurrencyLibrary
/// @dev This library allows for transferring native ETH and ERC20s via direct filler OR fill contract.
Expand Down Expand Up @@ -48,7 +47,7 @@ library CurrencyLibrary {
/// @param recipient The recipient of the currency
/// @param amount The amount of currency to transfer
function transferNative(address recipient, uint256 amount) internal {
(bool success,) = recipient.call{value: amount, gas: TRANSFER_NATIVE_GAS_LIMIT}("");
(bool success,) = recipient.call{value: amount}("");
if (!success) revert NativeTransferFailed();
}

Expand Down

0 comments on commit d2e90d1

Please sign in to comment.