Chain agnostic token agnostic admin removal changeset#2064
Open
matYang wants to merge 5 commits into
Open
Conversation
|
👋 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! |
Contributor
There was a problem hiding this comment.
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
RevokeTokenAdminRolechangeset (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
HasAdminRoleto 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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.