EOS Airdrop Discussion

Welcome to the thread about EOS Airdrop. Here you can discuss everything about the eos airdrop videos and potential problems that you might stumble upon.

Why do you(and the eos examples) use auto& instead of account&, it seems safer to be explicit and the IDE recognizes the type for code completion. It compiles fine for me, I have not deployed but we will see in the next section.

It should be safe to use auto, it infers the type from the initialization. So it’s not quite like var in JavaScript, but more like var in Java 10 or “let” in TypeScript. To see this, try leaving the initialization off and it should give a compile error.

I deployed and tested and as expected everything is fine with the explicit type

Just for mutability I’d assume? Using auto compiles just fine like @jhitt mentioned, but if you happen to be using a custom type like player_account, and change it to user_account, then you’d have to change all your references.

hi @filip the link provided for the advanced contract gives a 404

https://github.com/EOSIO/eos/blob/master/contracts/eosio.token/eosio.token.cpp

In which lecture was that posted? I want to replace the link asap. They have moved it to https://github.com/EOSIO/eosio.contracts/blob/master/contracts/eosio.token/src/eosio.token.cpp.

It’s in this lecture: https://ivanontech.teachable.com/courses/287053/lectures/6462319

Thanks. I have replaced the link.