3

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

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.

| improve this answer | |

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.