feat: add function to withdraw and check delegator rewards#3088
feat: add function to withdraw and check delegator rewards#3088
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe pull request introduces significant changes to the ZetaChain application, particularly enhancing the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3088 +/- ##
===========================================
- Coverage 62.06% 61.86% -0.20%
===========================================
Files 428 431 +3
Lines 30438 30717 +279
===========================================
+ Hits 18890 19003 +113
- Misses 10708 10856 +148
- Partials 840 858 +18
|
654e153 to
f2e421b
Compare
f2e421b to
6afbaec
Compare
910c75c to
af1360f
Compare
8eac446 to
3502cea
Compare
7d3383b to
d95dd4b
Compare
917c649 to
4794a72
Compare
kingpinXD
left a comment
There was a problem hiding this comment.
Looks good to me overall ,
Would be great if this unit test could be added
| func CreateZRC20CoinSet(zrc20address common.Address, amount *big.Int) (sdk.Coins, error) { | ||
| defer func() { | ||
| if r := recover(); r != nil { | ||
| return |
There was a problem hiding this comment.
Shouldn't it return an error here for the caller?
Description
Add distribute functions to the staking precompile:
getDelegatorValidators: returns all the validators where a delegator has delegated to.getRewards: returns all the outstanding rewards in a validator for an specific delegator.claimRewards: claims all the delegation rewards. The caller has to be the delegator, or a contract called by the delegator.How Has This Been Tested?
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation
Refactor