Here we can see an example from Monstereos sending an inline action for the battlecreate function:
void pet::battlecreate(name host, battle_mode mode, checksum256 secret) {
require_auth(host);
_tb_battle tb_battles(_self, _self);
auto itr_battle = tb_battles.find(host);
eosio_assert(itr_battle == tb_battles.end(), "you already host a battle!");
eosio_assert(mode == V1 || mode == V2 || mode == V3, "invalid battle mode");
// check and increase busy arenas counter
auto pc = _get_pet_config();
pc.battle_busy_arenas++;
eosio_assert(pc.battle_busy_arenas <= pc.battle_max_arenas, "all arenas are busy");
tb_battles.emplace(_self, [&](auto& r) {
r.host = host;
r.mode = mode;
});
_update_pet_config(pc);
SEND_INLINE_ACTION( *this, battlejoin, {host,N(active)}, {host, host, secret} );
}
SEND_INLINE_ACTION | Docs
Parameters
CONTRACT - The account this action is intended for
NAME - The name of the action
... - The member of the action specified as ("action_member1_name", action_member1_value)("action_member2_name", action_member2_value)
So:
*this
is the dereferenced pointer of value contract
battlejoin
being the name of the action
battlejoin calls for: name host, name player, checksum256 secret
So we give it host
with an active
permission level for verification, host
for host, host
for player, and checksum256
for match's secret ID.