Skip to content

Commit

Permalink
format and delete comments
Browse files Browse the repository at this point in the history
Signed-off-by: Stanislav Viyachev <[email protected]>
  • Loading branch information
Coiling-Dragon committed Apr 11, 2023
1 parent 30847d1 commit ebba321
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
1 change: 0 additions & 1 deletion scripts/bridge/setup/cmd/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
7 changes: 2 additions & 5 deletions scripts/bridge/setup/from-config/cmd/setup-from-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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("====================================")
Expand Down
1 change: 0 additions & 1 deletion scripts/bridge/setup/parser/extended-bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 0 additions & 7 deletions scripts/bridge/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package setup
import (
"errors"
"fmt"
// "math"

"github.com/limechain/hedera-eth-bridge-validator/scripts/client"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit ebba321

Please sign in to comment.