dzuqe / npc

simple npc game interactions using a stateful contract and atomic transfers
MIT License
3 stars 2 forks source link

Algorand Dev Portal article has issues fixed in this codebase #2

Open excalq opened 2 years ago

excalq commented 2 years ago

First, thank you immensely for the excellent tutorial on Algorand.org, as a web3 (EVM) game developer learning Algorand, it's educational and fun.

I wanted to give a heads up that the tutorial, Simple NPC game interactions using a stateful contract and atomic transfers, has a number of minor mistakes, which are fixed in this repo's code, but haven't been applied to the article yet.

  1. Missing definition of is_creator (line 10) of contract.py
  2. Bytes("damage") should be Bytes("injure") on Line 40 of contract.py
  3. Makefile references to $(ALGO_(DATA) and $(ALGO__DATA) (should be $(ALGO_DATA))
  4. Makefiles also require tabs, not spaces (This may not be fixable in the article, depending on their CMS)
  5. goal node start -d $(ALGO_PVTNET_DATA) is a useful command to add after the private node install. (I'm a complete AlgoN00b!)
  6. creatorAddress and differentAddress needing some figuring out. goal account new was useful for creating the differentAddress. It may be helpful to give commands to create and fund a second account:

    goal account new
    goal account list
    goal clerk send -a 200000 -f $CREATOR_ACCOUNT -t $NEW_ACCOUNT 

    I hope this helps! Thanks again!