In this section we explains all the actions inside the siegeofmytra contract, easily found here.
// signup ACTION signup(name player);
This action is used by players to create a game account.
// getprod ACTION getprod(name player);
This action is called by players to claim turns results: get units recruited by castle, gold produced, troops maintenance, etc.
// setunitprod ACTION setunitprod(name player, uint64_t castle_id, name type);
This action assigns the unit to be produced (recruited) by castle identified by castle_id. 'type' can be "lightinfantr", "heavyinfantr", "archer", "lightcavalry" or"heavycavalry". To change the produced by a castle reset the production turns countdown. This action only can be called by the castle owner.
If a player has an assigned rival, he/she can use this action to attack the rival's castle identified by castle_id. Players must provide a list of non-defender unit ids who act as attackers.