Skip to content

Conversation

@jkongie
Copy link
Collaborator

@jkongie jkongie commented Jan 29, 2026

This adds the NetworkType and IsNetworkType helpers to the BlockChain interface, and updates all implementations to adhere to the updated interface.

@jkongie jkongie requested a review from a team as a code owner January 29, 2026 04:08
@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

🦋 Changeset detected

Latest commit: f029584

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
chainlink-deployments-framework Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link

👋 jkongie, 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!

@jkongie jkongie marked this pull request as draft January 29, 2026 04:08
@jkongie jkongie force-pushed the add-chain-network-type-helpers branch from a1a6715 to b5d39f9 Compare January 29, 2026 04:18
This adds the `NetworkType` and `IsNetworkType` helpers to the
BlockChain interface, and updates all implementations to adhere to the
updated interface.
@jkongie jkongie force-pushed the add-chain-network-type-helpers branch from b5d39f9 to f029584 Compare January 29, 2026 04:24
@cl-sonarqube-production
Copy link

@jkongie jkongie marked this pull request as ready for review January 29, 2026 04:35
Copy link
Collaborator

@graham-chainlink graham-chainlink left a comment

Choose a reason for hiding this comment

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

LGTM

// IsNetworkType checks if the chain is on the given network type
func (c ChainMetadata) IsNetworkType(networkType chainsel.NetworkType) bool {
// Get the network type of the chain
t, err := c.NetworkType()
Copy link
Collaborator

@graham-chainlink graham-chainlink Jan 29, 2026

Choose a reason for hiding this comment

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

Just thinking out loud if we need to return err instead of assuming it is false. Looking at the code , the error we get is unknown chain selector , in that case, i guess it is fair to return false for all network type.

Looks good then!

@jkongie jkongie added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit 36b8a3d Jan 29, 2026
16 checks passed
@jkongie jkongie deleted the add-chain-network-type-helpers branch January 29, 2026 10:29
github-merge-queue bot pushed a commit that referenced this pull request Jan 29, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## [email protected]

### Minor Changes

-
[#695](#695)
[`36b8a3d`](36b8a3d)
Thanks [@jkongie](https://github.com/jkongie)! - Adds methods to
determine the network type of a Chain

- `chain.NetworkType()` - Returns the network type determined by
delegating to the `chain-selectors` package
- `chain.IsNetworkType(chainsel.NetworkTypeMainnet)` - Returns a boolean
if the network type matches

### Patch Changes

-
[#694](#694)
[`b00e038`](b00e038)
Thanks [@graham-chainlink](https://github.com/graham-chainlink)! -
fix(engine/test): support multiple mcms deployments

    Fix MCMS test helpers to support multiple deployments on same chain

This resolves an issue where MCMS test helpers failed when multiple MCMS
instances were deployed on the same chain, causing "multiple CallProxy
    addresses found in datastore" errors.

---------

Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com>
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