I saw some contract implement a handler which will be triggered when receiving EOS token via eosio.token::transfer. I tried to have the same transfer handler and change some row of my table. But I have got "cannot modify objects in table of another contract"
I ve checked eosio code that it will try to check if the _code (eosio.token) is equal to the current contract (mycontract).
I wonder how other contracts be able to do that? For example in Knight EOS, it is modifying one of its table in his transfer handler (https://github.com/bada-studio/knights_contract/blob/master/knights/knights.cpp#L532) How does it work without getting the same error?