Skip to content

Fix issues 182-185 - #208

Open
rahmanabimbs wants to merge 1 commit into
SmartDropLabs:mainfrom
rahmanabimbs:fix/issues-182-185
Open

Fix issues 182-185#208
rahmanabimbs wants to merge 1 commit into
SmartDropLabs:mainfrom
rahmanabimbs:fix/issues-182-185

Conversation

@rahmanabimbs

Copy link
Copy Markdown

Closes #182,
Closes #183
Closes #184
Closes #185

Summary

This PR addresses the following contract issues:

Changes

  • Added TotalCredits storage to the farming pool and exposed total_credits()
  • Updated credit checkpoint logic to maintain a running total of all accrued credits
  • Added an AssetPools(Address) secondary index in the factory
  • Populated the asset index when creating pools
  • Updated asset lookup logic to use the index before falling back to a bounded scan
  • Changed get_boost_config to return:
    • multiplier = current global multiplier
    • allocation_pct = 0
      when no explicit boost is set
  • Updated the vesting revoke event payload to include:
    • admin
    • beneficiary
    • vested
    • unvested

Notes

  • This keeps API behavior aligned with the expected semantics for default boost config handling
  • It also reduces repeated scanning cost for repeated get_pools_by_asset queries

Validation

  • Reviewed the affected contract code paths and updated relevant tests for the new behavior
  • Full Rust test execution was not possible in this environment because the Cargo toolchain is not installed here

@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@rahmanabimbs Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@netlify

netlify Bot commented Aug 27, 2026

Copy link
Copy Markdown

Deploy Preview for sdcontracts ready!

Name Link
🔨 Latest commit 0dad5f9
🔍 Latest deploy log https://app.netlify.com/projects/sdcontracts/deploys/6a90883f5ad41b00082d1d0c
😎 Deploy Preview https://deploy-preview-208--sdcontracts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant