Skip to content

Commit dd494d7

Browse files
committed
Add missing initialization code for Aptos
1 parent d6986f7 commit dd494d7

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

core/cmd/shell_local.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ func (s *Shell) runNode(c *cli.Context) error {
435435
if s.Config.StarkNetEnabled() {
436436
enabledChains = append(enabledChains, chaintype.StarkNet)
437437
}
438+
if s.Config.AptosEnabled() {
439+
enabledChains = append(enabledChains, chaintype.Aptos)
440+
}
438441
err2 := app.GetKeyStore().OCR2().EnsureKeys(rootCtx, enabledChains...)
439442
if err2 != nil {
440443
return errors.Wrap(err2, "failed to ensure ocr key")
@@ -464,6 +467,12 @@ func (s *Shell) runNode(c *cli.Context) error {
464467
return errors.Wrap(err2, "failed to ensure starknet key")
465468
}
466469
}
470+
if s.Config.AptosEnabled() {
471+
err2 := app.GetKeyStore().Aptos().EnsureKey(rootCtx)
472+
if err2 != nil {
473+
return errors.Wrap(err2, "failed to ensure aptos key")
474+
}
475+
}
467476

468477
err2 := app.GetKeyStore().CSA().EnsureKey(rootCtx)
469478
if err2 != nil {

core/internal/cltest/cltest.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,13 @@ func NewApplicationWithConfig(t testing.TB, cfg chainlink.GeneralConfig, flagsAn
409409
}
410410
initOps = append(initOps, chainlink.InitStarknet(testCtx, relayerFactory, starkCfg))
411411
}
412+
if cfg.AptosEnabled() {
413+
aptosCfg := chainlink.AptosFactoryConfig{
414+
Keystore: keyStore.Aptos(),
415+
TOMLConfigs: cfg.AptosConfigs(),
416+
}
417+
initOps = append(initOps, chainlink.InitAptos(testCtx, relayerFactory, aptosCfg))
418+
}
412419
relayChainInterops, err := chainlink.NewCoreRelayerChainInteroperators(initOps...)
413420
if err != nil {
414421
t.Fatal(err)

0 commit comments

Comments
 (0)