-
Notifications
You must be signed in to change notification settings - Fork 2
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
immutable withdraw
+ split
#428
Conversation
Slither reportTHIS CHECKLIST IS NOT COMPLETE. Use
incorrect-equalityImpact: Medium
LockDealNFT/contracts/SimpleProviders/TimedDealProvider/TimedDealProvider.sol Lines 25 to 52 in 6b9f53f
uninitialized-localImpact: Medium
unused-returnImpact: Medium
LockDealNFT/contracts/LockDealNFT/LockDealNFT.sol Lines 25 to 42 in 6b9f53f
calls-loopImpact: Low
LockDealNFT/contracts/LockDealNFT/LockDealNFTState.sol Lines 43 to 54 in 6b9f53f
LockDealNFT/contracts/LockDealNFT/LockDealNFTState.sol Lines 80 to 82 in 6b9f53f
timestampImpact: Low
LockDealNFT/contracts/SimpleProviders/TimedDealProvider/TimedDealProvider.sol Lines 25 to 52 in 6b9f53f
LockDealNFT/contracts/SimpleProviders/TimedDealProvider/TimedDealProvider.sol Lines 54 to 68 in 6b9f53f
LockDealNFT/contracts/LockDealNFT/LockDealNFTInternal.sol Lines 11 to 28 in 6b9f53f
dead-codeImpact: Informational
LockDealNFT/contracts/SimpleProviders/Provider/ProviderModifiers.sol Lines 42 to 44 in 6b9f53f
LockDealNFT/contracts/SimpleProviders/Provider/ProviderModifiers.sol Lines 58 to 60 in 6b9f53f
LockDealNFT/contracts/SimpleProviders/Provider/BasicProvider.sol Lines 65 to 68 in 6b9f53f
naming-conventionImpact: Informational
immutable-statesImpact: Optimization
|
Methods
Deployments
Solidity and Network Config
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #428 +/- ##
==========================================
+ Coverage 85.75% 88.97% +3.21%
==========================================
Files 13 13
Lines 379 408 +29
Branches 91 67 -24
==========================================
+ Hits 325 363 +38
+ Misses 53 44 -9
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -20,12 +21,23 @@ contract TimedDealProvider is LockDealState, DealProviderState, BasicProvider { | |||
lockDealNFT = _lockDealNFT; | |||
name = "TimedDealProvider"; | |||
} | |||
|
|||
|
|||
function _withdraw( | |||
uint256 poolId, | |||
uint256 amount | |||
) internal override firewallProtectedSig(0x9e2bf22c) returns (uint256 withdrawnAmount, bool isFinal) { | |||
(withdrawnAmount, isFinal) = provider.withdraw(poolId, amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to skip this line.
on current version we make :
old.amount -= amount
new.amount = old.amount
old.amount = 0(missing)
lets set the new directly to old.amount - amount
and the old to 0
the if on line 31 can be simple
Gas trackingResults from Hardhat Gas Reporter Original TimedDealProvider
Immutable version (version that was deployed to the testnet)
Immutable version + "viaIR: true" setting
Immutable version 2
PR link Immutable version 3
PR link Immutable version 4
PR link Immutable version 5
PR link |
Issue 393 `version 5`
closes #393