StarkNet ERC721 Workshop: Exercise 5

Note: This article was updated on Sep 20th, 2022 to use Cairo 0.10

Adding Permissions and Payments

  • Use dummy token faucet to get dummy tokens
  • Use ex5a_i_have_dtk() to show you managed to use the faucet (2 pts)
  • Create a function to allow breeder registration.
  • This function should charge the registrant for a fee, paid in dummy tokens (check registration_price)
  • Add permissions. Only allow listed breeders should be able to create animals
  • Deploy your new contract
  • Call submit_exercise() in the Evaluator to configure the contract you want evaluated
  • Call ex5b_register_breeder() to prove your function works. If needed, send dummy tokens first to the evaluator (2pts)
Continue reading “StarkNet ERC721 Workshop: Exercise 5”

StarkNet ERC721 Workshop: Exercise 1

Note: This article was updated on Sep 20th, 2022 to use Cairo 0.10

Deploying an ERC721

  • Create an ERC721 token contract. You can use this implementation as a base
  • Deploy it to the testnet (check the constructor for the needed arguments. Also note that the arguments should be decimals.)
$ starknet-compile contracts/ERC721/ERC721.cairo --output artifacts/ERC721.json
$ starknet deploy --contract artifacts/ERC721.json --inputs arg1 arg2 arg3 --network alpha-goerli
  • Give token #1 to Evaluator contract
  • Call submit_exercise() in the Evaluator to configure the contract you want evaluated (4 pts)
  • Call ex1_test_erc721() in the evaluator to receive your points (2 pts)
Continue reading “StarkNet ERC721 Workshop: Exercise 1”

StarkNet ERC721 Workshop: Setup

Note: I wrote a better guide on how to setup a local development environment here. Use that guide instead of this one as I’ve updated all the articles on this series to use it.

In this tutorial we will be completing the ERC721 workshop created by the StarkWare team so developers can get familiarized with creating smart contracts with Cairo and deploying them to StarkNet’s test network, Goerli.

I’ll be breaking down the workshop into multiple articles to keep each post to a manageable size and to make it easy to find by search engines. Make sure to follow the link at the end of each article to go to the next section.

Continue reading “StarkNet ERC721 Workshop: Setup”