dev-rel icon indicating copy to clipboard operation
dev-rel copied to clipboard

Design and write NFT contract

Open catmcgee opened this issue 1 year ago • 2 comments

  • NFT demo contract (v similar to token) + prove ownership for token sale (KYC -> NFT?) (IAM + gaming)
  • Battleships or Blackjack (gaming)

catmcgee avatar Apr 19 '24 14:04 catmcgee

blocked by https://github.com/AztecProtocol/dev-rel/issues/227

catmcgee avatar Apr 19 '24 14:04 catmcgee

related #233

critesjosh avatar May 14 '24 14:05 critesjosh

this will change with key stuff (token contract changing) but want to do it anyway

catmcgee avatar May 28 '24 13:05 catmcgee

You need to get the note contents and derive a note hash (remember notes have npk_m_hash in them!) You need prove note hash in the note hash tree and not in nullifier tree. But you also need to show the note is in the balances map of the nft contract. Luckily note contents have the storage slot which do this! Prove that the note is assosciated to your address - luckily, like 3, nothing extra to do. Note is stored in a map, whose storage slot is derived based the address) which brings me to: zk proof that you actually own the address (your private key owns the address). Get them to sign a message and verify the sig (what is_valid_impl does on account contracts)

catmcgee avatar Jun 25 '24 15:06 catmcgee

blocking for now. makes more sense to do this when eng has done more exploration into primitivs we need

catmcgee avatar Jul 23 '24 14:07 catmcgee

I brought this up to Rahul as something we'd like eng to look into before the identity focused alpha build, so closing for now. we can create a new issue as new work comes in

critesjosh avatar Aug 20 '24 13:08 critesjosh