Skip to content

Chain agnostic token agnostic admin removal changeset#2064

Open
matYang wants to merge 5 commits into
mainfrom
chain-agnostic-token-agnostic-admin-removal-changeset
Open

Chain agnostic token agnostic admin removal changeset#2064
matYang wants to merge 5 commits into
mainfrom
chain-agnostic-token-agnostic-admin-removal-changeset

Conversation

@matYang
Copy link
Copy Markdown
Collaborator

@matYang matYang commented May 12, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 12, 2026 20:18
@matYang matYang requested review from a team as code owners May 12, 2026 20:18
@github-actions
Copy link
Copy Markdown

👋 matYang, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new deployment changeset to revoke a token’s admin role in a chain-/token-agnostic way (via per-family adapters), with an initial EVM implementation and an integration test validating safety/idempotency.

Changes:

  • Introduces RevokeTokenAdminRole changeset (deployment/tokens) that dispatches to chain-family token adapters and emits MCMS batch ops.
  • Adds EVM v1.0.0 sequence + adapter plumbing to revoke admin role safely (only if a remaining admin can be confirmed).
  • Extends token implementations with HasAdminRole to support pre-checks and adds an integration test for BurnMintERC20.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
integration-tests/deployment/revoke_token_admin_role_test.go Integration coverage for revoking timelock admin role (safe + idempotent) and rejecting unsafe revocations.
deployment/tokens/revoke_admin_role.go New changeset + verification/ref-resolution logic for token admin role revocations.
deployment/tokens/product.go Adds optional TokenAdminRoleAdapter interface for token adapters that support admin revocation.
chains/evm/deployment/v1_0_0/sequences/revoke_token_admin_role.go New EVM on-chain sequence to revoke token admin role with safety checks.
chains/evm/deployment/v1_0_0/adapters/token_adapter.go Wires EVM base token adapter to expose the new revoke sequence.
chains/evm/deployment/tokens/tokenimpl/token_tip20.go Implements HasAdminRole for TIP-20 tokens.
chains/evm/deployment/tokens/tokenimpl/token_erc20.go Adds HasAdminRole stub returning unsupported error for plain ERC20.
chains/evm/deployment/tokens/tokenimpl/token_burn_mint_erc677.go Adds HasAdminRole stub returning unsupported error for BurnMintERC677.
chains/evm/deployment/tokens/tokenimpl/token_burn_mint_erc20.go Implements HasAdminRole for BurnMintERC20.
chains/evm/deployment/tokens/tokenimpl/token_burn_mint_erc20_with_drip_v1_5_0.go Implements HasAdminRole for drip token variant.
chains/evm/deployment/tokens/tokenimpl/token_burn_mint_erc20_with_drip_v1_0_0.go Implements HasAdminRole for drip token variant.
chains/evm/deployment/tokens/tokenimpl/impl.go Extends Token interface with HasAdminRole.
chains/evm/deployment/tokens/tokenimpl/helpers.go Adds helper to check default admin role for BurnMintERC20.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread deployment/tokens/revoke_admin_role.go Outdated
Comment thread chains/evm/deployment/v1_0_0/sequences/revoke_token_admin_role.go
@github-actions
Copy link
Copy Markdown

Metric chain-agnostic-token-agnostic-admin-removal-changeset main
Coverage 70.1% 69.8%

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.

2 participants