Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 1870

Actions specify and implement the behaviour for smart contracts and operate primarily in a message-based communication model. Questions may relate to sending, receiving, analysing, interpreting, and implementing actions; action specification and rules, and others.

2 votes
1 answer
77 views

Symbol prints wrong value

I have a method like this: void token::test(asset qty) { print("\n", qty); print("\n", qty.symbol); } and the output I get is something like this: 10.00000000 XXX 8,XXX3 why the …
0 votes
1 answer
83 views

Is it possible to overload contract actions?

I had a method: -- t.hpp -- [[eosio::action]] void exchange(); -- t.cpp -- void token::exchange() { ... } EOSIO_DISPATCH(eosio::token, (exchange)) and then decided that if a parameter were passed … , I'd want to do something different, so I added: -- t.hpp -- [[eosio::action]] void exchange(); [[eosio::action]] void exchange(asset auction); -- t.cpp -- void token::exchange() { ... } void token …
1 vote
2 answers
174 views

Passing a string to an action?

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 … for what it's worth, I also tried: cleos push action MyAccount MyAction '{"key":"burn"}' -p MyAccount@active which also failed …
1 vote
Accepted

Passing a string to an action?

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 …
ekkis's user avatar
  • 515