feat(tip20): implement burnAt to burn tokens from any address with BURN_AT_ROLE (TIP-1006)#2857
feat(tip20): implement burnAt to burn tokens from any address with BURN_AT_ROLE (TIP-1006)#2857
Conversation
When multiple labels are added simultaneously, GitHub fires a separate labeled event per label. The old condition checked if the PR *has* the agentic-audit label, which is true for all events. This caused N audit runs for N labels added at once (e.g., 3 comments on PR #2857). Fix: check github.event.label.name instead of scanning all labels.
…2859) ## Problem When multiple labels are added to a PR simultaneously (e.g., `C-enhancement`, `A-precompile`, `agentic-audit`), GitHub fires a separate `labeled` event for **each** label. The old `if` condition checked whether the PR _has_ the `agentic-audit` label: ```yaml if: contains(github.event.pull_request.labels.*.name, 'agentic-audit') ``` Since all three events see the PR already has the label, **all three** pass the condition and trigger an audit. This is what happened on PR #2857 — 3 Ralph comments were posted. ## Fix Check `github.event.label.name` (the label from the current event) instead: ```yaml if: github.event.label.name == 'agentic-audit' && github.event.pull_request.draft == false ``` Only the event where `agentic-audit` is the label being added will trigger the audit.
🐺 Ralph Security Review
Findings
📋 Consolidation complete · Thread 📜 25 events🔍 |
tempoxyz-bot
left a comment
There was a problem hiding this comment.
🐺 Ralph Review — PR #2857
This PR adds burnAt to TIP20, allowing BURN_AT_ROLE holders to burn tokens from any address (except protected precompiles). Balance/supply accounting, protected-address guards, reward tracking, and event emission are correctly implemented with thorough tests.
2 high-severity findings were identified and verified. See inline comments.
028b620 to
ec97db9
Compare
📊 Tempo Precompiles Coverage |
…RN_AT_ROLE (TIP-1006)
3ab9d8a to
774840e
Compare
Closes CHAIN-758
Implements
burnAt(address from, uint256 amount), allows holders ofBURN_AT_ROLEto burn tokens from any address without transfer policy restrictions. This complements the existingburnBlocked(which only works on policy-blocked addresses) andburn(which only burns from the caller's own balance).TIP20.sol,ITIP20.sol): AddedBURN_AT_ROLEconstant,BurnAtevent, andburnAtfunction with protected address checks (FeeManager, StablecoinDEX) and reward accountinginvariants/TIP20.t.sol): tests for supply conservation, role enforcement, and protected address invariantstip20/mod.rs,dispatch.rs,tip20.rs): Precompile dispatch, implementation, and integration tests mirroring the Solidity behavior