balancednetwork / balanced-java-contracts

Java contracts for Balanced
Apache License 2.0
10 stars 15 forks source link

feat: Use persistent messages for withdraws from ICON #432

Closed AntonAndell closed 2 months ago

AntonAndell commented 4 months ago

Description:

Commit Message

type: commit message

see the guidelines for commit messages.

Changelog Entry

version: <log entry>

Checklist:

Please review the CONTRIBUTING.md file for detailed contributing guidelines.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 72.71%. Comparing base (8d11c8a) to head (8d02466). Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...ced/score/util/xcall/manager/XCallManagerImpl.java 25.00% 3 Missing :warning:
...core/tokens/balanceddollar/BalancedDollarImpl.java 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #432 +/- ## ============================================ - Coverage 73.39% 72.71% -0.68% + Complexity 1874 1593 -281 ============================================ Files 129 114 -15 Lines 9031 7703 -1328 Branches 1091 943 -148 ============================================ - Hits 6628 5601 -1027 + Misses 1936 1700 -236 + Partials 467 402 -65 ``` | [Flag](https://app.codecov.io/gh/balancednetwork/balanced-java-contracts/pull/432/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=balancednetwork) | Coverage Δ | | |---|---|---| | [java](https://app.codecov.io/gh/balancednetwork/balanced-java-contracts/pull/432/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=balancednetwork) | `72.71% <73.33%> (-0.68%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=balancednetwork#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

TRSSMG commented 3 months ago

Main Changes Noticed

  1. sendCall method name in xcall mock is renamed to recvCall . New sendCall method created for persistent message
  2. sendPersistentCall is introduced in XcallUtils to replace the sendCall to support the persistent call, which does not support the rollback
  3. On calling daofund contract to claim the xcall feee rollback parameter is sent ’false’ replacing previous ‘true’ as the call is now persistent
  4. In the xcall manager contract new method getProtocolsRaw is introduced to get the rlpEncoded protocols for creating envelope for persistent message
  5. Rollback massages removed

Tested : Ran integration tests for asset manager , loans and rewards contracts

Findings

Suggestions:

  1. Unused method sendCall in xcallUtils could be removed
    no significant findings