Skip to content

Conversation

@chris-de-leon-cll
Copy link
Collaborator

@chris-de-leon-cll chris-de-leon-cll commented Dec 19, 2025

This PR adds a v1.5.0 adapter that partially implements the TokenAdapter interface from the tokens API

Here's a list of methods that have been implemented and which have not:

  1. ConfigureTokenForTransfersSequence
  2. AddressRefToBytes
  3. DeriveTokenAddress
  4. ManualRegistration
  5. DeployToken
  6. DeployTokenVerify
  7. DeployTokenPoolForToken
  8. RegisterToken
  9. SetPool
  10. UpdateAuthorities

Important notes:

  • Given that we plan to refactor/simplify the token adapter interface for v1.7, this PR does not come with test cases to keep the diff small and the future code rework simpler.
  • The deploy_token_contracts file has been moved from the v1_6_0 folder to the v1_0_0 folder since it doesn't belong to any specific version (all the bindings it uses are for tokens are defined in v1_0_0).
  • The ManualRegistration sequence is fully idempotent. It reads the current token config from the chain and chooses whether it needs to propose an admin or transfer the admin role based on whether a token admin already exists or not.
  • The SetPool sequence is also fully idempotent by virtue of the on-chain implementation. Calling it multiple times with the same input will produce no unintended consequences on-chain.

@chris-de-leon-cll chris-de-leon-cll self-assigned this Dec 19, 2025
@chris-de-leon-cll chris-de-leon-cll changed the base branch from main to bg/evm-pool-deployment December 19, 2025 22:14
Copy link
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

This PR adds a token adapter implementation for version 1.5.0, enabling token management operations across EVM chains. The implementation includes support for token admin registry operations, token pool management, and cross-chain token configuration.

Key changes:

  • New token adapter implementation for v1.5.0 with methods for token deployment, registration, and pool management
  • Added token admin registry operations including role transfer and manual registration sequences
  • Token pool operations support for v1.5.1 with chain update capabilities

Reviewed changes

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

Show a summary per file
File Description
chains/evm/deployment/v1_6_0/sequences/token_and_pools.go Updated to reference v1.0.0 token sequences and fixed function signature for DeployTokenVerify
chains/evm/deployment/v1_5_1/operations/token_pool/token_pool.go New file implementing token pool chain update operations for v1.5.1
chains/evm/deployment/v1_5_0/sequences/token_admin_registry.go New manual registration sequence for token admin registry operations
chains/evm/deployment/v1_5_0/operations/token_admin_registry/token_admin_registry.go Added TransferAdminRole operation and reformatted variable declarations
chains/evm/deployment/v1_5_0/adapters/tokens.go New comprehensive token adapter implementation with helper methods and interface implementations

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

}

func (a *EVMAdapter) DeployTokenVerify(in any) error {
func (a *EVMAdapter) DeployTokenVerify(in tokensapi.IN) error {
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

The type name 'IN' is ambiguous and unclear. Consider using a more descriptive type name such as 'DeployTokenInput' or 'DeployTokenVerifyInput' that clearly indicates what this input represents.

Copilot uses AI. Check for mistakes.
return tokseq.DeployToken
}

func (a *TokenAdapter) DeployTokenVerify(in tokensapi.IN) error {
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

The type name 'IN' is ambiguous and unclear. Consider using a more descriptive type name such as 'DeployTokenInput' or 'DeployTokenVerifyInput' that clearly indicates what this input represents.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Metric feat/add-token-adapter-for-v1.5.0 bg/evm-pool-deployment
Coverage 70.3% 70.0%

Comment on lines +24 to +36
var ApplyChainUpdates = contract.NewWrite(contract.WriteParams[ApplyChainUpdatesArgs, *token_pool.TokenPool]{
Name: "token_pool:apply-chain-updates",
Version: Version,
Description: "Applies chain updates to the TokenPool 1.5.1 contract",
ContractType: ContractType,
ContractABI: token_pool.TokenPoolABI,
NewContract: token_pool.NewTokenPool,
IsAllowedCaller: contract.OnlyOwner[*token_pool.TokenPool, ApplyChainUpdatesArgs],
Validate: func(args ApplyChainUpdatesArgs) error { return nil },
CallContract: func(tp *token_pool.TokenPool, opts *bind.TransactOpts, args ApplyChainUpdatesArgs) (*types.Transaction, error) {
return tp.ApplyChainUpdates(opts, args.RemoteChainSelectorsToRemove, args.ChainsToAdd)
},
})
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

NOTE: this is not used by the v1.5.0 adapter yet, but I've added it in since we will eventually use it later

Base automatically changed from bg/evm-pool-deployment to feat/manual-registration-tooling-api December 24, 2025 17:51
Base automatically changed from feat/manual-registration-tooling-api to main January 13, 2026 19:40
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