I'm attempting to follow this guide, which seems official: https://developers.eos.io/eosio-home/docs/token-contract and which begins by grabbing the v1.4.0 branch of the EOSIO contracts:
git clone https://github.com/EOSIO/eosio.contracts --branch v1.4.0 --single-branch
in looking at the code I discovered that line 133 contains a reference to same_payer
, what seems like an undeclared variable (if it's declared, I don't see where):
$ head -n 133 eosio.token.cpp |tail -n 1
to_acnts.modify( to, same_payer, [&]( auto& a ) {
now, I decided to pull the code from github directly, for this version:
https://github.com/EOSIO/eos/blob/v1.4.0/contracts/eosio.token/eosio.token.cpp
but curiously, that file is totally different (to begin with, it only has 120 lines) and contains a 0
instead:
to_acnts.modify( to, 0, [&]( auto& a ) {
so I have 2 questions:
1) am I pulling the wrong version from github (via the link) and if so, what is the proper way to do it? and
2) how can the code compile when it's making a reference to a variable that hasn't been declared?