-
Notifications
You must be signed in to change notification settings - Fork 8
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
Silo strategy #220
base: main
Are you sure you want to change the base?
Silo strategy #220
Conversation
function extra() external pure returns (bytes32) { | ||
return CommonLib.bytesToBytes32(abi.encodePacked(bytes3(0x00d395), bytes3(0x000000))); | ||
} |
Check warning
Code scanning / Slither
Too many digits Warning
- CommonLib.bytesToBytes32(abi.encodePacked(bytes3(0x00d395),bytes3(0x000000)))
src/strategies/SiloStrategy.sol
Outdated
) internal virtual override returns (uint[] memory amountsOut) { | ||
amountsOut = new uint[](1); | ||
StrategyBaseStorage storage $base = _getStrategyBaseStorage(); | ||
amountsOut[0] = ISilo($base._underlying).withdraw(value, receiver, address(this), ISilo.CollateralType.Collateral); |
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.
error. value is ISilo shares, not asset amount. need use redeem or calculate asset amount to withdraw
function _getMarketId() internal view returns (uint marketId) { | ||
IFactory.Farm memory farm = _getFarm(); | ||
marketId = ISiloConfig(ISilo(farm.addresses[1]).siloConfig()).SILO_ID(); | ||
} |
Check notice
Code scanning / Slither
Calls inside a loop Low
function _genDesc(address silo) internal view returns (string memory) { | ||
return string.concat( | ||
"Earn ", | ||
" and supply APR by lending ", | ||
IERC20Metadata(ISilo(silo).asset()).symbol(), | ||
" to Silo V2 ", | ||
CommonLib.u2s(_getMarketId(silo)) | ||
); | ||
} |
Check notice
Code scanning / Slither
Calls inside a loop Low
function _getMarketId(address _silo) internal view returns (uint marketId) { | ||
marketId = ISiloConfig(ISilo(_silo).siloConfig()).SILO_ID(); | ||
} |
Check notice
Code scanning / Slither
Calls inside a loop Low
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #220 +/- ##
==========================================
+ Coverage 93.12% 93.17% +0.04%
==========================================
Files 91 92 +1
Lines 8296 8348 +52
Branches 708 711 +3
==========================================
+ Hits 7726 7778 +52
Misses 534 534
Partials 36 36 ☔ View full report in Codecov by Sentry. |
No description provided.