Skip to content

Commit

Permalink
resolve errcheck problems
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsaigle committed Dec 9, 2024
1 parent 6ae4219 commit 3df7b65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion node/cmd/transfer-verifier/transfer-verifier-evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ var (
)

// Function to initialize the configuration for the TransferVerifierCmdEvm flags.
// The MarkFlagRequired calls will cause the script to fail on their own. No need to handle the errors manually.
//
//nolint:errcheck
func init() {
evmRpc = TransferVerifierCmdEvm.Flags().String("rpcUrl", "ws://localhost:8546", "RPC url")
evmCoreContract = TransferVerifierCmdEvm.Flags().String("coreContract", "", "core bridge address")
Expand All @@ -43,7 +46,6 @@ func init() {
TransferVerifierCmd.MarkFlagRequired("rpcUrl")
TransferVerifierCmd.MarkFlagRequired("coreContract")
TransferVerifierCmd.MarkFlagRequired("tokenContract")

}

// Note: logger.Error should be reserved only for conditions that break the
Expand Down
8 changes: 8 additions & 0 deletions node/cmd/transfer-verifier/transfer-verifier-sui.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,20 @@ var TransferVerifierCmdSui = &cobra.Command{
}

// CLI parameters
// The MarkFlagRequired calls will cause the script to fail on their own. No need to handle the errors manually.
//
//nolint:errcheck
func init() {
suiRPC = TransferVerifierCmdSui.Flags().String("suiRPC", "", "Sui RPC url")
suiCoreContract = TransferVerifierCmdSui.Flags().String("suiCoreContract", "", "Sui core contract address")
suiTokenBridgeEmitter = TransferVerifierCmdSui.Flags().String("suiTokenBridgeEmitter", "", "Token bridge emitter on Sui")
suiTokenBridgeContract = TransferVerifierCmdSui.Flags().String("suiTokenBridgeContract", "", "Token bridge contract on Sui")
suiProcessInitialEvents = TransferVerifierCmdSui.Flags().Bool("suiProcessInitialEvents", false, "Indicate whether the Sui transfer verifier should process the initial events it fetches")

TransferVerifierCmd.MarkFlagRequired("suiRPC")
TransferVerifierCmd.MarkFlagRequired("suiCoreContract")
TransferVerifierCmd.MarkFlagRequired("suiTokenBridgeEmitter")
TransferVerifierCmd.MarkFlagRequired("suiTokenBridgeContract")
}

func runTransferVerifierSui(cmd *cobra.Command, args []string) {
Expand Down

0 comments on commit 3df7b65

Please sign in to comment.