Skip to content

Add StarGuard plot/drop helpers#105

Merged
0xLaz3r merged 5 commits into
masterfrom
starguard-actions
May 20, 2026
Merged

Add StarGuard plot/drop helpers#105
0xLaz3r merged 5 commits into
masterfrom
starguard-actions

Conversation

@0xLaz3r

@0xLaz3r 0xLaz3r commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Adds DssExecLib wrappers for StarGuard.plot and StarGuard.drop, enabling Core spells to whitelist a Star Spell for permissionless execution (and revoke it) without inlining the call.

Changes

  • src/DssExecLib.sol
    • New StarGuardLike interface.
    • plotStarSpell(address _starGuard, address _starSpell, bytes32 _starSpellTag) — whitelists a Star Spell by codehash.
    • dropStarSpell(address _starGuard) — clears the currently whitelisted Star Spell.
    • StarGuard address is passed as a parameter (one StarGuard per SubProxy), matching the existing executeStarSpell(starProxy, starSpell) shape.
  • src/mocks/MockStarGuard.sol — new mock with plot/drop recorders and a shouldFail toggle.
  • src/mocks/MockDssSpellAction.solplotStarSpell_test / dropStarSpell_test wrappers.
  • src/DssAction.t.sol — 5 tests: plot success, plot overwrite, plot failure, drop success, drop failure.
  • README.md — documents the two new helpers in the SubDAO/Star Spells section.

Verification

  • All 99 tests pass (94 existing + 5 new).
  • DssExecLib runtime size: 18,549 / 24,576 bytes — well under the EIP-170 limit, so both helpers fit comfortably.

@0xLaz3r
0xLaz3r requested a review from amusingaxl April 29, 2026 12:59
@0xLaz3r 0xLaz3r self-assigned this Apr 29, 2026
@DaiFoundation-DevOps

DaiFoundation-DevOps commented Apr 29, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@riccardopersiani
riccardopersiani self-requested a review April 30, 2026 09:26

@riccardopersiani riccardopersiani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests covers every line.
The size is slightly higher than reported but still safe.

Comment thread src/mocks/MockStarGuard.sol Outdated
Comment thread src/DssAction.t.sol

@amusingaxl amusingaxl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial nits.

Comment thread src/DssExecLib.sol Outdated
Comment thread src/DssExecLib.sol
Comment thread README.md Outdated

@amusingaxl amusingaxl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@0xLaz3r
0xLaz3r merged commit 555d1c1 into master May 20, 2026
3 checks passed
@0xLaz3r
0xLaz3r deleted the starguard-actions branch May 20, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants