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

Fix/incorrect error #61

Merged
merged 2 commits into from
Dec 12, 2022
Merged

Fix/incorrect error #61

merged 2 commits into from
Dec 12, 2022

Conversation

zlace0x
Copy link
Contributor

@zlace0x zlace0x commented Dec 12, 2022

Addresses #59
No longer checks baseToken on transferFrom, only within allowance()

Gas improvement

testNoCodeTokenReverts() (gas: 0 (0.000%)) 
testSupportInterfaceReceiver() (gas: 0 (0.000%)) 
testSupportInterfaceSpender() (gas: 0 (0.000%)) 
testFailExecuteMetaTransactionReplayProtection() (gas: 3 (0.002%)) 
testExecuteMetaTransactionApproveRenewable() (gas: 3 (0.002%)) 
testPermit() (gas: 3 (0.002%)) 
testApproveRenewable() (gas: 3 (0.003%)) 
testRenewableMaxAllowance() (gas: 6 (0.006%)) 
testApproveFuzzing(uint256) (gas: 9 (0.008%)) 
testInitialAllowance() (gas: 3 (0.012%)) 
testRecoveryRateCasting() (gas: -22 (-0.026%)) 
testBaseTokenAllowance() (gas: 69 (0.066%)) 
testPermitRenewable() (gas: 113 (0.086%)) 
testFailPermitRenewablePastDeadline() (gas: -22 (-0.110%)) 
testTransfer() (gas: 120 (0.194%)) 
testSupportsInterfacePayable() (gas: -22 (-0.377%)) 
testApproveWithTransferFuzzing(uint256,uint256) (gas: -1376 (-0.913%)) 
testApprove() (gas: -1335 (-0.922%)) 
testTransferFromFunnel() (gas: -2770 (-0.941%)) 
testApproveMaxWithTransfer() (gas: -1379 (-0.994%)) 
testTransferFromAndCall() (gas: -1385 (-0.998%)) 
testInfiniteApproveTransferFrom() (gas: -1341 (-1.000%)) 
testOverflow3() (gas: -1385 (-1.066%)) 
testOverflow2() (gas: -1385 (-1.188%)) 
testOverflow() (gas: -1385 (-1.188%)) 
testTransferFromAndCallRevertNonContract() (gas: -1385 (-1.221%)) 
testTransferFromAndCallRevertNonReceiver() (gas: -1385 (-1.238%)) 
testFailApprovewithTransferInsufficientBalance() (gas: -1382 (-1.275%)) 
testFailApproveWithTransferInsufficientApproval() (gas: -1382 (-1.375%)) 
testClearRenewableAllowanceOnNormalApprove() (gas: -2617 (-1.793%)) 
testRenewableAllowanceTransferFrom() (gas: -5550 (-3.573%)) 
testInsufficientAllowance() (gas: -7907 (-26.902%)) 
Overall gas change: -35083 (-46.720%)

@zlace0x zlace0x linked an issue Dec 12, 2022 that may be closed by this pull request
@edison0xyz edison0xyz merged commit d5d30f4 into main Dec 12, 2022
@zlace0x zlace0x linked an issue Dec 13, 2022 that may be closed by this pull request
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.

Incorrect error thrown on transferFrom [Hacken 2022-11-25 High #3] Data Consistency
2 participants