1

I have an action that looks like the following:

hello ( name person ) {

    if ( name == 0 ) {
        ; // do something
    } else {
        ; // do something else
    }
}

and I wanted to pass nothing in to the 'parameter'. I try

cleos push action myaccount hello '[""]'

but I get this error:

Failed with error: Parse Error (4) Couldn't parse uint64_t

and when I try

cleos push action myaccount hello '["0"]'

I get

Error 3010001: Invalid name
Name should be less than 13 characters and only contains the following 
symbol .12345abcdefghijklmnopqrstuvwxyz
Error Details:
Name not properly normalized (name: 0, normalized: ) 

How do I choose to pass in an empty name parameter?


EDIT: changed action name for 'hi' to 'hello'

1

The correct format is:

cleos push action myaccount hello '{"person":"0"}'

Note: The name of the action is hello, not hi

-2

push empty data with transaction:

cleos push action myaccount hello '{}'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.