Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue#242 perf: add allowance pre-check to transferFrom() #244

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

CT77777
Copy link

@CT77777 CT77777 commented Mar 3, 2025

Add pre-check allowance before complicated identity and compliance verification.
It saves gas if transaction is reverted due to insufficient allowance.

@CT77777 CT77777 force-pushed the Issue#242_perf_transferFrom branch from 1806ea5 to b8a78dc Compare March 5, 2025 09:19
@CT77777 CT77777 force-pushed the Issue#242_perf_transferFrom branch from b8a78dc to 0285974 Compare March 5, 2025 09:23
@Joachim-Lebrun
Copy link
Collaborator

@CT77777 did you compare the gas costs of the 2 implementations? because the purpose here is to save gas with the unchecked arithmetic operation, but given the implementation you propose i doubt it saves gas

@Joachim-Lebrun Joachim-Lebrun requested a review from pgonday March 5, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants