-
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
feat (Lending): deposit basics #47
Conversation
@LondonCalamari @joshpwrk 2 things I want your opinion on:
|
|
|
@LondonCalamari @joshpwrk I added the Let me know if this is a good idea to have it here for now, and merge to other workstream later after sprint 1. |
I think its okay to have it here for now and merge after sprint 1 |
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.
Looks good
## Summary * withdraw by USDC amount. Basically a mirrored function of `deposit` * we might need a `withdrawByCashAmount` function to clear out balance in Account. Otherwise there will always be dust amount left in an account ## Todo - [x] rebase after #47 is merged - [x] Draft implementation for `withdraw` - [x] Unit tests for `withdraw` ## Checklist Ensure you completed **all of the steps** below before submitting your pull request: - [x] Add [natspec](https://docs.soliditylang.org/en/latest/natspec-format.html) for all functions / parameters - [x] Ran `forge snapshot` - [x] Ran `forge fmt` - [x] Ran `forge test` - [x] [Triage Slither issues](../README.md#triage-issues), and post uncertain ones in the PR - [x] 100% test coverage on code changes ### Slither Issues (Optional) If you're unsure about a new issue reported by Slither, copy them here so others can verify as well.
Summary
Details
handleAdjustment
: add manager checkdeposit
function simply convert token amount => 18 decimals, and update that value inAccount
.DecimalMath
library that convert decimals foruint256
DecimalMathTest
test: it needs to setup a "helper contract" to let the forge coverage work properly with internal library. (reference)Todo
deposit
deposit
deposit
andconvertDecimals
Checklist
Ensure you completed all of the steps below before submitting your pull request:
forge snapshot
forge fmt
forge test
Slither Issues (Optional)
If you're unsure about a new issue reported by Slither, copy them here so others can verify as well.