|
|
@@ -372,6 +372,12 @@ func runNode(cmd *cobra.Command, args []string) {
|
|
|
if *oasisRPC == "" {
|
|
|
logger.Fatal("Please specify --oasisRPC")
|
|
|
}
|
|
|
+ if *fantomRPC == "" {
|
|
|
+ logger.Fatal("Please specify --fantomRPC")
|
|
|
+ }
|
|
|
+ if *fantomContract == "" && !*unsafeDevMode {
|
|
|
+ logger.Fatal("Please specify --fantomContract")
|
|
|
+ }
|
|
|
if *testnetMode {
|
|
|
if *ethRopstenRPC == "" {
|
|
|
logger.Fatal("Please specify --ethRopstenRPC")
|
|
|
@@ -379,12 +385,6 @@ func runNode(cmd *cobra.Command, args []string) {
|
|
|
if *ethRopstenContract == "" {
|
|
|
logger.Fatal("Please specify --ethRopstenContract")
|
|
|
}
|
|
|
- if *fantomRPC == "" {
|
|
|
- logger.Fatal("Please specify --fantomRPC")
|
|
|
- }
|
|
|
- if *fantomContract == "" {
|
|
|
- logger.Fatal("Please specify --fantomContract")
|
|
|
- }
|
|
|
} else {
|
|
|
if *ethRopstenRPC != "" {
|
|
|
logger.Fatal("Please do not specify --ethRopstenRPC in non-testnet mode")
|
|
|
@@ -392,12 +392,6 @@ func runNode(cmd *cobra.Command, args []string) {
|
|
|
if *ethRopstenContract != "" {
|
|
|
logger.Fatal("Please do not specify --ethRopstenContract in non-testnet mode")
|
|
|
}
|
|
|
- if *fantomRPC == "" {
|
|
|
- logger.Fatal("Please do not specify --fantomRPC in non-testnet mode")
|
|
|
- }
|
|
|
- if *fantomContract == "" {
|
|
|
- logger.Fatal("Please do not specify --fantomContract in non-testnet mode")
|
|
|
- }
|
|
|
}
|
|
|
if *nodeName == "" {
|
|
|
logger.Fatal("Please specify --nodeName")
|
|
|
@@ -706,15 +700,15 @@ func runNode(cmd *cobra.Command, args []string) {
|
|
|
ethereum.NewEthWatcher(*oasisRPC, oasisContractAddr, "oasis", common.ReadinessOasisSyncing, vaa.ChainIDOasis, lockC, nil, 1, chainObsvReqC[vaa.ChainIDOasis]).Run); err != nil {
|
|
|
return err
|
|
|
}
|
|
|
+ if err := supervisor.Run(ctx, "fantomwatch",
|
|
|
+ ethereum.NewEthWatcher(*fantomRPC, fantomContractAddr, "fantom", common.ReadinessFantomSyncing, vaa.ChainIDFantom, lockC, nil, 1, chainObsvReqC[vaa.ChainIDFantom]).Run); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
if *testnetMode {
|
|
|
if err := supervisor.Run(ctx, "ethropstenwatch",
|
|
|
ethereum.NewEthWatcher(*ethRopstenRPC, ethRopstenContractAddr, "ethropsten", common.ReadinessEthRopstenSyncing, vaa.ChainIDEthereumRopsten, lockC, setC, 1, chainObsvReqC[vaa.ChainIDEthereumRopsten]).Run); err != nil {
|
|
|
return err
|
|
|
}
|
|
|
- if err := supervisor.Run(ctx, "fantomwatch",
|
|
|
- ethereum.NewEthWatcher(*fantomRPC, fantomContractAddr, "fantom", common.ReadinessFantomSyncing, vaa.ChainIDFantom, lockC, nil, 1, chainObsvReqC[vaa.ChainIDFantom]).Run); err != nil {
|
|
|
- return err
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
// Start Terra watcher only if configured
|