Skip to content

feat!: remove revokeNomination, covered by revokeDelegate - #23

Merged
F4ever merged 2 commits into
mainfrom
feat/remove-revoke-nomination
Aug 10, 2026
Merged

feat!: remove revokeNomination, covered by revokeDelegate#23
F4ever merged 2 commits into
mainfrom
feat/remove-revoke-nomination

Conversation

@chasingrainbows

Copy link
Copy Markdown
Contributor

Description

Removes the owner-only revokeNomination() function. revokeDelegate() already clears both the current and the pending delegate, so a separate nomination-only revoke is not needed. For the remaining edge cases the owner can terminate() the contract.

Changes:

  • src/DelegationContract.sol - remove revokeNomination(); revokeDelegate() now unconditionally clears the pending state and emits only DelegateRevoked
  • src/interfaces/IDelegationContract.sol - remove the function declaration, the NominationRevoked event, and the NoPendingDelegate error; update natspec
  • test/unit/DelegationContract.t.sol - remove the revokeNomination test contract; rework the revokeDelegate tests that relied on the removed event
  • commands.just, docs/usage.md, docs/development.md - remove the revoke-nomination / revoke-nomination-live recipes and their mentions

Note: this is a breaking interface change - type(IDelegationContract).interfaceId changes, and the NominationRevoked event is no longer emitted.

Related Issue/Task

  • Related task: N/A
  • Epic: N/A

How Has This Been Tested?

  • Local tests (forge build + forge test, 76 tests pass, including invariant tests)
  • Manual testing (describe steps)
  • Not tested (explain why)

Checklist

  • Documentation updated (if required)
  • New tests added (if applicable)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the owner-only revokeNomination() API from the Execution Delegation Framework, consolidating “revoke pending nomination” behavior into revokeDelegate() and updating the interface, tests, and CLI/docs accordingly.

Changes:

  • Remove revokeNomination() (and its event/error) from IDelegationContract and DelegationContract.
  • Make revokeDelegate() always clear any pending delegate state and emit only DelegateRevoked.
  • Update unit tests and CLI/docs to reflect the removed command/API surface.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/unit/DelegationContract.t.sol Removes revokeNomination tests and updates revokeDelegate event expectations/log assertions.
src/interfaces/IDelegationContract.sol Removes revokeNomination, NominationRevoked, and NoPendingDelegate; updates natspec accordingly.
src/DelegationContract.sol Deletes revokeNomination implementation and makes revokeDelegate unconditionally clear pending state.
docs/usage.md Removes revoke-nomination command references from the usage table and local testing note.
docs/development.md Removes revoke-nomination references from operational notes and the CLI command reference table.
commands.just Removes revoke-nomination / revoke-nomination-live recipes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chasingrainbows
chasingrainbows requested a review from F4ever August 10, 2026 14:59
@F4ever
F4ever merged commit 5b75d76 into main Aug 10, 2026
6 checks passed
@F4ever
F4ever deleted the feat/remove-revoke-nomination branch August 10, 2026 16:04
@chasingrainbows chasingrainbows mentioned this pull request Aug 10, 2026
5 tasks
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.

3 participants