Repository navigation
feat(settlement): add record_deductions batch entrypoint - #1453
EmperorNexus wants to merge 7 commits into
Conversation
|
@EmperorNexus 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! 🚀 |
01a780c to
2997a33
Compare
|
@EmperorNexus Our automated scan matched code from the PolinRider malware campaign, which steals developer credentials (GitHub, npm, wallets) and spreads through infected repositories:
What to do:
The PR will be re-scanned automatically and can be merged once it is clean. |
1e5b90e to
a45d528
Compare
Removes the .vscode task and the .lfk loader this branch picked up (delete .vscode/extensions.json, delete .vscode/launch.json, delete .vscode/settings.json, delete .vscode/spellright.dict, delete .vscode/tasks.json). No functional change to the branch's own work.
Removes the .vscode task and the .lfk loader this branch picked up (delete public/fonts/fa-regular.lff, delete public/fonts/fa-solid-300.ttf). No functional change to the branch's own work.
|
@EmperorNexus Our automated scan matched code from the PolinRider malware campaign, which steals developer credentials (GitHub, npm, wallets) and spreads through infected repositories:
What to do:
The PR will be re-scanned automatically and can be merged once it is clean. |
80c8a0a to
4fbd201
Compare
|
This PR came from a machine infected with the PolinRider malware. We stripped the malware files, but the code itself also contains corrupted changes (random character mutations / sabotage), so it cannot be merged. Found: |
|
@EmperorNexus Our automated scan matched code from the PolinRider malware campaign, which steals developer credentials (GitHub, npm, wallets) and spreads through infected repositories:
What to do:
The PR will be re-scanned automatically and can be merged once it is clean. |
b6dc21c to
b3bca81
Compare
b3bca81 to
663c29c
Compare
663c29c to
d956df7
Compare
d956df7 to
f3fb929
Compare
f3fb929 to
d09d4d8
Compare
d09d4d8 to
fb6a6f7
Compare
|
Warning Possible malicious code: please review before merging. An automated security scan flagged files in this pull request that appear to contain malicious code. Code like this can run automatically when a project is opened in an editor or its dependencies are installed, so it could compromise the machine of anyone who checks out this branch. Automated scans can be wrong, so this may be a false positive. Maintainers: please review the flagged files carefully before merging, on GitHub in your browser rather than by checking out the branch. The malicious part is often hidden far off to the right of an ordinary-looking line, so scroll sideways through each file. @EmperorNexus: this pull request adds or changes these files, possibly without your knowledge. Malware like this spreads by adding itself to repositories on machines it has infected, so your machine might be compromised. Please undo these changes in this pull request, and don't open or run other projects on that machine until you've checked it. Flagged files at commit
Only merge once you're confident these files are safe. ℹ️ Posted automatically by Drips Wave. Questions? Contact support@drips.network. |
Overview
This PR adds a
record_deductions(items)batch entrypoint to the settlement contract so thatCalloraVault::batch_deductcan make a single cross-contract call instead of one per item. It also adds typed errors and events for the new entrypoint, extends the settlement test suite to cover the new function, documents the required upgrade order, and records the new gas baseline entries.Related Issue
Changes
📦 Settlement batch entrypoint
[MODIFY]
contracts/settlement/src/errors.rsrecord_deductions: empty batch, over-max-length, invalid amount, duplicate request id, and pool overflow, so the batch path can reject atomically with a specific error.[MODIFY]
contracts/settlement/src/events.rsdeduction_recordedevent emission helper used byrecord_deductions, so a batch emits one event per item and stays event-parity with N singlerecord_deductioncalls.[MODIFY]
contracts/settlement/src/test_record_deduction.rs📝 Docs and gas baseline
[MODIFY]
docs/UPGRADE.mdrecord_deductions) before the vault is upgraded to call it.[MODIFY]
contracts/.gas-baseline.json[MODIFY]
docs/GAS_SNAPSHOT.mdVerification Results
record_deductionsimplemented, documented, covered by every test-plan rowtest_record_deduction.rsbatch_deductmakes exactly one settlement callrecord_deductionsonce after the token transfercargo fmt --all -- --checkandcargo test --workspacepass, CI greendocs/GAS_SNAPSHOT.mdandcontracts/.gas-baseline.jsontest_record_deduction.rssuiteCloses #1398