Repository navigation
Conversation
Contributor
|
might want to compare the gas of TransferHelper with the other existing SafeTransfer libs |
Contributor
|
See #105, pretty significant gas improvements by using the solmate implementation |
* feat: improve gas of TransferHelper This commit uses the solmate SafeTransfer library implementation which has much improved gas performance over the existing implementation. See https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol#L63 We copy the implementation in rather than import for typechecking as the somlate library uses their custom ERC20 implementation and I didn't want to have add ugly casts everywhere * Fix code style issues with Prettier Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
marktoda
approved these changes
Jun 5, 2022
Contributor
Author
|
@marktoda thanks for merging in the transfer helper! |
Jun1on
pushed a commit
to Jun1on/v4-core
that referenced
this pull request
Jul 29, 2026
* Update package.json files * Start * Fix code style issues with Prettier * feat: improve gas of TransferHelper (Uniswap#105) * feat: improve gas of TransferHelper This commit uses the solmate SafeTransfer library implementation which has much improved gas performance over the existing implementation. See https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol#L63 We copy the implementation in rather than import for typechecking as the somlate library uses their custom ERC20 implementation and I didn't want to have add ugly casts everywhere * Fix code style issues with Prettier Co-authored-by: Lint Action <lint-action@samuelmeuli.com> Co-authored-by: Lint Action <lint-action@samuelmeuli.com> Co-authored-by: marktoda <40770586+marktoda@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds around 600 gas
Fixes #85