@@ -11,6 +11,7 @@ import (
1111
1212 "github.com/smartcontractkit/chainlink-deployments-framework/chain"
1313 "github.com/smartcontractkit/chainlink-deployments-framework/chain/aptos"
14+ "github.com/smartcontractkit/chainlink-deployments-framework/chain/canton"
1415 "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm"
1516 "github.com/smartcontractkit/chainlink-deployments-framework/chain/solana"
1617 "github.com/smartcontractkit/chainlink-deployments-framework/chain/sui"
@@ -25,6 +26,7 @@ var aptosChain1 = aptos.Chain{Selector: chainsel.APTOS_LOCALNET.Selector}
2526var suiChain1 = sui.Chain {ChainMetadata : sui.ChainMetadata {Selector : chainsel .SUI_LOCALNET .Selector }}
2627var tonChain1 = ton.Chain {ChainMetadata : ton.ChainMetadata {Selector : chainsel .TON_LOCALNET .Selector }}
2728var tronChain1 = tron.Chain {ChainMetadata : tron.ChainMetadata {Selector : chainsel .TRON_MAINNET .Selector }}
29+ var cantonChain1 = canton.Chain {Selector : chainsel .CANTON_LOCALNET .Selector }
2830
2931func TestNewBlockChains (t * testing.T ) {
3032 t .Parallel ()
@@ -162,7 +164,7 @@ func TestBlockChainsAllChains(t *testing.T) {
162164 evmChain1 .Selector , evmChain2 .Selector ,
163165 solanaChain1 .Selector , aptosChain1 .Selector ,
164166 suiChain1 .Selector , tonChain1 .Selector ,
165- tronChain1 .Selector ,
167+ tronChain1 .Selector , cantonChain1 . Selector ,
166168 }
167169
168170 assert .Len (t , allChains , len (expectedSelectors ))
@@ -280,6 +282,21 @@ func TestBlockChainsGetters(t *testing.T) {
280282 },
281283 description : "should return all Tron chains" ,
282284 },
285+ {
286+ name : "CantonChains" ,
287+ runTest : func (t * testing.T , chains chain.BlockChains ) {
288+ t .Helper ()
289+ cantonChains := chains .CantonChains ()
290+ expectedSelectors := []uint64 {cantonChain1 .Selector }
291+
292+ assert .Len (t , cantonChains , len (expectedSelectors ), "unexpected number of Canton chains" )
293+
294+ for _ , selector := range expectedSelectors {
295+ _ , exists := cantonChains [selector ]
296+ assert .True (t , exists , "expected Canton chain with selector %d" , selector )
297+ }
298+ },
299+ },
283300 }
284301
285302 // Run tests for both value and pointer chains
@@ -319,7 +336,7 @@ func TestBlockChainsListChainSelectors(t *testing.T) {
319336 evmChain1 .ChainSelector (), evmChain2 .ChainSelector (),
320337 solanaChain1 .ChainSelector (), aptosChain1 .ChainSelector (),
321338 suiChain1 .ChainSelector (), tonChain1 .ChainSelector (),
322- tronChain1 .ChainSelector (),
339+ tronChain1 .ChainSelector (), cantonChain1 . ChainSelector (),
323340 },
324341 description : "expected all chain selectors" ,
325342 },
@@ -359,6 +376,12 @@ func TestBlockChainsListChainSelectors(t *testing.T) {
359376 expectedIDs : []uint64 {tronChain1 .Selector },
360377 description : "expected Tron chain selectors" ,
361378 },
379+ {
380+ name : "with family filter - Canton" ,
381+ options : []chain.ChainSelectorsOption {chain .WithFamily (chainsel .FamilyCanton )},
382+ expectedIDs : []uint64 {cantonChain1 .Selector },
383+ description : "expected Canton chain selectors" ,
384+ },
362385 {
363386 name : "with multiple families" ,
364387 options : []chain.ChainSelectorsOption {chain .WithFamily (chainsel .FamilyEVM ), chain .WithFamily (chainsel .FamilySolana )},
@@ -370,7 +393,7 @@ func TestBlockChainsListChainSelectors(t *testing.T) {
370393 options : []chain.ChainSelectorsOption {chain .WithChainSelectorsExclusion (
371394 []uint64 {evmChain1 .Selector , aptosChain1 .Selector }),
372395 },
373- expectedIDs : []uint64 {evmChain2 .Selector , solanaChain1 .Selector , suiChain1 .Selector , tonChain1 .Selector , tronChain1 .Selector },
396+ expectedIDs : []uint64 {evmChain2 .Selector , solanaChain1 .Selector , suiChain1 .Selector , tonChain1 .Selector , tronChain1 .Selector , cantonChain1 . Selector },
374397 description : "expected chain selectors excluding 1 and 4" ,
375398 },
376399 {
@@ -405,6 +428,7 @@ func buildBlockChains() chain.BlockChains {
405428 suiChain1 .ChainSelector (): suiChain1 ,
406429 tonChain1 .ChainSelector (): tonChain1 ,
407430 tronChain1 .ChainSelector (): tronChain1 ,
431+ cantonChain1 .ChainSelector (): cantonChain1 ,
408432 })
409433
410434 return chains
@@ -428,6 +452,8 @@ func buildBlockChainsPointers() chain.BlockChains {
428452 pointerChains [selector ] = & c
429453 case tron.Chain :
430454 pointerChains [selector ] = & c
455+ case canton.Chain :
456+ pointerChains [selector ] = & c
431457 default :
432458 continue // skip unsupported chains
433459 }
0 commit comments