Crypto Zombies
-
1 min read
Making the Zombie Factory
Event (event & emit) notificaiton trigger for front-end app, gas related that receving information/data without interacting to the contract
Zombies Attack Their Vicitms
mapping (address => uint) public accountBalance; | mapping (key => value) public accountBalance;
storage vs memory | hardisk vs ram
internal vs external vs public vs private
Advanced Solidity Concepts
OpenZeppelin ownable (modifier onlyOwner)
struct{ uint c; uint32 a; uint32 b;) gas < struct{ uint32 a; uint c; uint32 b;) gas
modifier end with ‘_;’ for calling the rest of the function
Zombie Battle System
- modifier
- visibility (private, public, internal, external)
- state (view, pure)
- custom (onlyOwner, aboveLevel)
- function (payable)
uint16 (2^16) 65536 uint32 (2^32)
ERC721 & Crypto-Collectibles
Token (ERC20/ERC721) just a smart contract that follows some common rules. (e.g. transferFrom(), balanceOf())