diff --git a/nodebuilder/blob/cmd/blob.go b/nodebuilder/blob/cmd/blob.go index 17eec5bbf1..5541b7c8df 100644 --- a/nodebuilder/blob/cmd/blob.go +++ b/nodebuilder/blob/cmd/blob.go @@ -43,12 +43,12 @@ var getCmd = &cobra.Command{ Short: "Returns the blob for the given namespace by commitment at a particular height.\n" + "Note:\n* Both namespace and commitment input parameters are expected to be in their hex representation.", PreRunE: func(_ *cobra.Command, args []string) error { - if !strings.HasPrefix(args[0], "0x") { - args[0] = "0x" + args[0] - } if !strings.HasPrefix(args[1], "0x") { args[1] = "0x" + args[1] } + if !strings.HasPrefix(args[2], "0x") { + args[2] = "0x" + args[2] + } return nil }, RunE: func(cmd *cobra.Command, args []string) error { @@ -84,9 +84,6 @@ var getAllCmd = &cobra.Command{ Short: "Returns all blobs for the given namespace at a particular height.\n" + "Note:\n* Namespace input parameter is expected to be in its hex representation.", PreRunE: func(_ *cobra.Command, args []string) error { - if !strings.HasPrefix(args[0], "0x") { - args[0] = "0x" + args[0] - } if !strings.HasPrefix(args[1], "0x") { args[1] = "0x" + args[1] } @@ -150,7 +147,7 @@ var submitCmd = &cobra.Command{ "returns the header height in which the blob(s) was/were include + the respective commitment(s).\n" + "User can use namespace and blobData as argument for single blob submission \n" + "or use --input-file flag with the path to a json file for multiple blobs submission, \n" + - `where the json file contains: + `where the json file contains: { "Blobs": [ @@ -241,12 +238,12 @@ var getProofCmd = &cobra.Command{ Short: "Retrieves the blob in the given namespaces at the given height by commitment and returns its Proof.\n" + "Note:\n* Both namespace and commitment input parameters are expected to be in their hex representation.", PreRunE: func(_ *cobra.Command, args []string) error { - if !strings.HasPrefix(args[0], "0x") { - args[0] = "0x" + args[0] - } if !strings.HasPrefix(args[1], "0x") { args[1] = "0x" + args[1] } + if !strings.HasPrefix(args[2], "0x") { + args[2] = "0x" + args[2] + } return nil }, RunE: func(cmd *cobra.Command, args []string) error {