EOSIO / eosio.cdt

EOSIO.CDT (Contract Development Toolkit) is a suite of tools used to build EOSIO contracts
http://eosio.github.io/eosio.cdt
MIT License
512 stars 288 forks source link

Any different between _code and _self param in contract.hpp? #216

Closed lanskytian closed 5 years ago

lanskytian commented 5 years ago

The value of _code is same as _self when I print out in my contract class, and I saw there is no _code arg in https://github.com/EOSIO/eos/blob/v1.4.0/contracts/eosiolib/contract.hpp? because of different version or other reason?

larryk85 commented 5 years ago

The difference is during notifications, when a notify is dispatched to your account, _code will be name of the contract sending you the notify. The contracts folder in eos is very out of date and should be ignored.