EOS Airdrop Discussion

#1

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.

#2

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.

#3

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.

#4

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

#5

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.

#6

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

#7

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.

#8

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

#9

Thanks. I have replaced the link.