From 20c922a505eaeec0f3df4e9221d6ab79788ecad8 Mon Sep 17 00:00:00 2001 From: abhiyana Date: Mon, 12 Feb 2024 00:39:06 +0530 Subject: [PATCH] feat: implement starting collator local node with cutom keys --- cli/cmd/chains/polkadot/run.go | 2 +- cli/cmd/chains/utils/types.go | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cli/cmd/chains/polkadot/run.go b/cli/cmd/chains/polkadot/run.go index 7846a691..5158cc56 100644 --- a/cli/cmd/chains/polkadot/run.go +++ b/cli/cmd/chains/polkadot/run.go @@ -386,7 +386,7 @@ func startExplorer(cli *common.Cli, enclaveCtx *enclaves.EnclaveContext, finalRe } isLocalContext, err := cli.Context().IsLocalKurtosisContext() - + if err != nil { return nil, err } diff --git a/cli/cmd/chains/utils/types.go b/cli/cmd/chains/utils/types.go index ffb650ca..93b55ff5 100644 --- a/cli/cmd/chains/utils/types.go +++ b/cli/cmd/chains/utils/types.go @@ -193,11 +193,17 @@ func (sc *HardhatServiceConfig) EncodeToString() (string, error) { // This code is for polkadot config file +type Key struct { + PrivatePhrase string `json:"private_phrase"` + PublicKey string `json:"public_key"` +} + type NodeConfig struct { Name string `json:"name"` NodeType string `json:"node_type"` Prometheus bool `json:"prometheus"` Ports Ports `json:"ports"` + Key Key `json:"key,omitempty"` } type Ports struct { @@ -215,6 +221,8 @@ type RelayChainConfig struct { type ParaNodeConfig struct { Name string `json:"name"` Nodes []NodeConfig `json:"nodes"` + SudoKey Key `json:"sudo_key,omitempty"` + } type PolkadotServiceConfig struct { @@ -222,6 +230,7 @@ type PolkadotServiceConfig struct { RelayChain RelayChainConfig `json:"relaychain"` Para []ParaNodeConfig `json:"parachains"` Explorer bool `json:"explorer"` + WithoutRegistration bool `json:"without_registration"` } func (pc *ParaNodeConfig) EncodeToString() (string, error) {