Skip to content

Commit

Permalink
feat: implement starting collator local node with cutom keys
Browse files Browse the repository at this point in the history
  • Loading branch information
abhiyana committed Feb 11, 2024
1 parent 41a1401 commit 20c922a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cli/cmd/chains/polkadot/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func startExplorer(cli *common.Cli, enclaveCtx *enclaves.EnclaveContext, finalRe
}

isLocalContext, err := cli.Context().IsLocalKurtosisContext()

if err != nil {
return nil, err
}
Expand Down
9 changes: 9 additions & 0 deletions cli/cmd/chains/utils/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -215,13 +221,16 @@ type RelayChainConfig struct {
type ParaNodeConfig struct {
Name string `json:"name"`
Nodes []NodeConfig `json:"nodes"`
SudoKey Key `json:"sudo_key,omitempty"`

}

type PolkadotServiceConfig struct {
ChainType string `json:"chain_type"`
RelayChain RelayChainConfig `json:"relaychain"`
Para []ParaNodeConfig `json:"parachains"`
Explorer bool `json:"explorer"`
WithoutRegistration bool `json:"without_registration"`
}

func (pc *ParaNodeConfig) EncodeToString() (string, error) {
Expand Down

0 comments on commit 20c922a

Please sign in to comment.