diff --git a/scripts/bridge/setup/cmd/setup.go b/scripts/bridge/setup/cmd/setup.go index 8081974bf..44d552efb 100644 --- a/scripts/bridge/setup/cmd/setup.go +++ b/scripts/bridge/setup/cmd/setup.go @@ -22,7 +22,6 @@ import ( "github.com/limechain/hedera-eth-bridge-validator/scripts/bridge/setup" ) - func main() { privateKey := flag.String("privateKey", "0x0", "Hedera Private Key") accountID := flag.String("accountID", "0.0", "Hedera Account ID") diff --git a/scripts/bridge/setup/from-config/cmd/setup-from-config.go b/scripts/bridge/setup/from-config/cmd/setup-from-config.go index 0fbf6f5f6..f61c6701d 100644 --- a/scripts/bridge/setup/from-config/cmd/setup-from-config.go +++ b/scripts/bridge/setup/from-config/cmd/setup-from-config.go @@ -24,7 +24,6 @@ import ( "github.com/hashgraph/hedera-sdk-go/v2" "github.com/limechain/hedera-eth-bridge-validator/config" - // cfgParser "github.com/limechain/hedera-eth-bridge-validator/config/parser" "io/ioutil" "strings" @@ -56,8 +55,6 @@ func main() { members := flag.Int("members", 1, "The count of the members") memberPrivateKeys := flag.String("memberPrivateKeys", "", "Member private keys array, seperated by ','") adminKey := flag.String("adminKey", "", "The admin key") - // topicThreshold := flag.Uint("topicThreshold", 1, "Topic member keys sign threshold") - // wrappedFungibleThreshold := flag.Uint("wrappedTokenThreshold", 1, "The desired threshold of n/m keys required for supply key of wrapped tokens") configPath := flag.String("configPath", "scripts/bridge/setup/extend-config/extended-bridge.yml", "Path to the 'bridge.yaml' config file") flag.Parse() @@ -142,10 +139,10 @@ func deployBridge(privateKey *string, accountID *string, adminKey *string, netwo monitored_accounts[key] = bridgeDeployResult.MembersAccountIDs[index_of_monitored_account].String() index_of_monitored_account++ } - parsedBridgeCfgForDeploy.MonitoredAccounts = monitored_accounts + parsedBridgeCfgForDeploy.MonitoredAccounts = monitored_accounts parsedBridgeCfgForDeploy.TopicId = bridgeDeployResult.TopicId.String() - // TODO: redeplo the config topic and assign the new topic id to the config + // TODO: redeploy the config topic and assign the new topic id to the config parsedBridgeCfgForDeploy.ConfigTopicId = "0.0.0" fmt.Println("====================================") diff --git a/scripts/bridge/setup/parser/extended-bridge.go b/scripts/bridge/setup/parser/extended-bridge.go index f0ea46bb9..9d7ee7367 100644 --- a/scripts/bridge/setup/parser/extended-bridge.go +++ b/scripts/bridge/setup/parser/extended-bridge.go @@ -66,7 +66,6 @@ func (b *ExtendedBridge) ToBridgeParser() *parser.Bridge { parsedBridge.ConfigTopicId = b.ConfigTopicId parsedBridge.PollingInterval = b.PollingInterval parsedBridge.TopicId = b.TopicId - // parsedBridge. parsedBridge.MonitoredAccounts = b.MonitoredAccounts parsedBridge.Networks = make(map[uint64]*parser.Network) diff --git a/scripts/bridge/setup/setup.go b/scripts/bridge/setup/setup.go index a1c1d135b..ebd506d92 100644 --- a/scripts/bridge/setup/setup.go +++ b/scripts/bridge/setup/setup.go @@ -19,7 +19,6 @@ package setup import ( "errors" "fmt" - // "math" "github.com/limechain/hedera-eth-bridge-validator/scripts/client" @@ -69,7 +68,6 @@ func Deploy(privateKey *string, accountID *string, adminKey *string, network *st } fmt.Println("Members Private keys array:", result.MembersPrivateKeys) - // result.MembersPublicKeys = make([]hedera.PublicKey, 0, *members) // treshold is 1 because each validator should be able to post to the gossip topic @@ -105,13 +103,11 @@ func Deploy(privateKey *string, accountID *string, adminKey *string, network *st fmt.Printf("TopicID: %v\n", topicReceipt.TopicID) fmt.Println("--------------------------") - // treshold := uint(math.Ceil(float64(*members) * float64(0.51))) custodialKey := hedera.KeyListWithThreshold(treshold) for i := 0; i < *members; i++ { custodialKey.Add(result.MembersPublicKeys[i]) } - // Creating Bridge threshold account bridgeAccount, err := hedera.NewAccountCreateTransaction(). SetKey(custodialKey). @@ -162,9 +158,6 @@ func ValidateArguments(privateKey *string, accountID *string, adminKey *string, if *adminKey == "" { return errors.New("admin key not provided") } - // if *topicThreshold > uint(*members) { - // return errors.New("threshold can't be more than the members count") - // } return nil }