I have an action that needs to operate on a string:

void token::MyAction(std::string key);

so I would expect I can make the call like this:

cleos push action MyAccount MyAction '["burn"]' -p MyAccount@active

but when I make the call, I get an error:

Error 3050003: eosio_assert_message assertion failure Error Details: assertion failure with message: read pending console output:

how can I pass a string to an action?

for what it's worth, I also tried:

cleos push action MyAccount MyAction '{"key":"burn"}' -p MyAccount@active

which also failed

2 Answers 2


yeah, this happens if you change the structure of your table without erasing the previous content see https://github.com/clockknock/eos-contract-example/tree/master/02-erase-table


it is perfectly possible to pass strings to an action and the way the code had been structured was perfectly fine

the real problem turned out to be that I had redefined the struct behind the eosio::table and that caused the error. not very intuitive at all

what I had to do was wipe out my whole network and recreate that table. now it works

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.