Does anyone know how to pass an assets symbol_name in as an argument to an action? I have been trying the following:


"types": [{
"new_type_name": "symbol_name",
"type": "uint64"

and .cpp

void contract::getsymbol(symbol_name sym) {
    print("Symbol is ", name{sym});

However when I try to pass in a symbol like TEST a get the following error:

Couldn't parse uint64_t

1 Answer 1


void contract::getsymbol(string sym) { symbol_type symb = string_to_symbol(4,sym.c_str()); print("Symbol is ", sym); print(symb.name()); }

  • As I am not able to see your code but I think you would probabily imported the symbol.hpp .Did your code work ? Aug 24, 2018 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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