-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add function + tests to convert decimals with token #61
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #61 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 35 35
Lines 1280 1301 +21
Branches 156 157 +1
=========================================
+ Hits 1280 1301 +21
☔ View full report in Codecov by Sentry. |
Let's add functions |
This is indeed what will be useful |
7aa6cbe
to
49627d3
Compare
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2023 Distributed Lab Solidity Library Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |
Added token decimals converter. The function accepts:
Under the hood, the function casts the addresses of the tokens to the IERC20Metadata interface and retrieves the decimals for both tokens. Then, it converts the amount with the decimals of the base token to the decimals of the destination token.
All necessary tests are added. Coverage 100%.