@@ -43,12 +43,12 @@ var getCmd = &cobra.Command{
43
43
Short : "Returns the blob for the given namespace by commitment at a particular height.\n " +
44
44
"Note:\n * Both namespace and commitment input parameters are expected to be in their hex representation." ,
45
45
PreRunE : func (_ * cobra.Command , args []string ) error {
46
- if ! strings .HasPrefix (args [0 ], "0x" ) {
47
- args [0 ] = "0x" + args [0 ]
48
- }
49
46
if ! strings .HasPrefix (args [1 ], "0x" ) {
50
47
args [1 ] = "0x" + args [1 ]
51
48
}
49
+ if ! strings .HasPrefix (args [2 ], "0x" ) {
50
+ args [2 ] = "0x" + args [2 ]
51
+ }
52
52
return nil
53
53
},
54
54
RunE : func (cmd * cobra.Command , args []string ) error {
@@ -84,9 +84,6 @@ var getAllCmd = &cobra.Command{
84
84
Short : "Returns all blobs for the given namespace at a particular height.\n " +
85
85
"Note:\n * Namespace input parameter is expected to be in its hex representation." ,
86
86
PreRunE : func (_ * cobra.Command , args []string ) error {
87
- if ! strings .HasPrefix (args [0 ], "0x" ) {
88
- args [0 ] = "0x" + args [0 ]
89
- }
90
87
if ! strings .HasPrefix (args [1 ], "0x" ) {
91
88
args [1 ] = "0x" + args [1 ]
92
89
}
@@ -150,7 +147,7 @@ var submitCmd = &cobra.Command{
150
147
"returns the header height in which the blob(s) was/were include + the respective commitment(s).\n " +
151
148
"User can use namespace and blobData as argument for single blob submission \n " +
152
149
"or use --input-file flag with the path to a json file for multiple blobs submission, \n " +
153
- `where the json file contains:
150
+ `where the json file contains:
154
151
155
152
{
156
153
"Blobs": [
@@ -241,12 +238,12 @@ var getProofCmd = &cobra.Command{
241
238
Short : "Retrieves the blob in the given namespaces at the given height by commitment and returns its Proof.\n " +
242
239
"Note:\n * Both namespace and commitment input parameters are expected to be in their hex representation." ,
243
240
PreRunE : func (_ * cobra.Command , args []string ) error {
244
- if ! strings .HasPrefix (args [0 ], "0x" ) {
245
- args [0 ] = "0x" + args [0 ]
246
- }
247
241
if ! strings .HasPrefix (args [1 ], "0x" ) {
248
242
args [1 ] = "0x" + args [1 ]
249
243
}
244
+ if ! strings .HasPrefix (args [2 ], "0x" ) {
245
+ args [2 ] = "0x" + args [2 ]
246
+ }
250
247
return nil
251
248
},
252
249
RunE : func (cmd * cobra.Command , args []string ) error {
0 commit comments