When I use bloks.io or eosflare.io, I see that I have some contracts leaving information in my account without it being part of a memo from a transfer. How is it possible to send messages in this way?
1 Answer
A smart contract developer can create an action with custom parameters.
In that action, he needs to add the following code require_recipient(user)
.
void testcontract::broadcast(account_name recipient, string memo) {
require_recipient(recipient);
}
Then he executes
cleos push action testcontract broadcast '["eosio", "some message"]' -p testcontract
This will send a message to the receiver 'eosio' without transferring any tokens.