Skip to content

Conversation

@cedric-cordenier
Copy link
Contributor

This is needed to use these types in the corekeys package which I'm creating atm.

@cedric-cordenier cedric-cordenier requested a review from a team as a code owner January 23, 2026 14:57
@github-actions
Copy link

👋 cedric-cordenier, 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
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 moves the chaintype package to a common location to enable its use in the corekeys package. The change involves creating a new chaintype package with types and utilities for managing different blockchain types.

Changes:

  • Introduces a new chaintype package with ChainType string type and constants for supported chains (EVM, Cosmos, Solana, StarkNet, Aptos, Tron, TON, Sui, Offchain)
  • Implements conversion functions between ChainType and numeric representations
  • Provides validation utilities for supported chain types

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

@github-actions
Copy link

github-actions bot commented Jan 23, 2026

✅ API Diff Results - No breaking changes


📄 View full apidiff report

)

// ChainType denotes the chain or network to work with
type ChainType string
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we have a chain family enum for this somewhere in common already?

Copy link
Contributor

Choose a reason for hiding this comment

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

I can't find one exactly, but we use string fields and reference chain selector consts in a few places. Could we do that here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm let me take a look at the chain selector consts to see if that'll work.

Wdym by string fields though? Can I point me to an example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah looks like I can just use FamilyEVM in chain-selectors? Is that what you had in mind?

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