Puppet Certificates — Web3

Test Sanggar Joko's numbered puppet certificates on a local chain: ERC-721, Hardhat, AMM, wagmi. 16 levels, played right in the browser with nothing to install.

What the levels ask

  1. Mr. Joko wants a numbered certificate for every puppet he carves: Semar, its rod carved 1, for Mrs. Ratna, Bagong with rod 2 for the neighbourhood head. Fill the two holes in terbitkan so the certificate number matches the rod and the buyer holds it straight away. Only what the chain records counts: who holds each number, and its character.
  2. Gareng for the teacher is kept on the school display shelf, a contract. The address Bagas pasted from the group chat turns out to be the exhibition cash box, another contract that knows nothing about NFTs. Fill terbitkan so every holder gets their certificate and none gets stuck in a contract that can never hand it on.
  3. The teacher moves Semar to the school shelf. Bagas sells Petruk to Mr. Piksel, but the first address he pastes is the cash box’s. Fill in the way to send and the account that sends, so Petruk reaches Mr. Piksel and no certificate is locked in the cash box.
  4. A buyer’s wallet shows each certificate’s card: name, picture, paint colours. They live in a folder pinned on IPFS, one file per number (1.json, 2.json and so on). Fill _baseURI and tokenURI so every certificate’s address opens its own number’s file in that folder.
  5. Mr. Joko leaves Arjuna #7 with the Village Stall, the village shop Mr. Piksel minds, to sell to the neighbourhood head at the exhibition. That day the shop’s helper slips and also hands Semar #5, Grandpa Kerto’s heirloom that is not for sale, to Mr. Gondo. Fill in the approval so Arjuna reaches the neighbourhood head and Semar #5 stays at the studio.
  6. The Semar edition is only 12 certificates. Mr. Piksel writes a test for the 13th, and last night he changed the contract twice: once the limit lets one too many through, once the contract refuses with no reason. Fill this test so it passes on today’s contract and fails on both changes. Hardhat really runs it against all three contracts.
  7. Every certificate issued is announced with the event Diterbitkan(nomor, pembeli, tokoh), and the studio’s board will read those announcements. Mr. Piksel changed the contract again: once the number is one too high, once the buyer becomes Mr. Joko. Fill this test so it passes on today’s contract and catches both changes.
  8. This test chain mines one block a second, like a real chain. There are two tests: the neighbourhood head buys the 12th Semar, then the 13th Semar, for Bagas, must be refused. Fill in how each test starts and how the second test sends, so the tests pass on today’s contract and catch the change that lets one too many through.
  9. The craftsmen’s association has two vouchers: KULIT (one buffalo hide in the store) and PRADA (one gram of gold leaf). They are only for collecting materials from the store, not for sale. The swap pool trades KULIT for PRADA by what it holds. Fill hitungKeluar so every swap gets some PRADA and the product of the pool’s reserves never falls.
  10. Mrs. Endang’s phone swaps 10 KULIT. Today runs twice from the same pool: once Mr. Gondo swaps 150 KULIT paying a higher priority fee in the same block, so his swap lands first; once it is an ordinary day and Mr. Bayu swaps just 1 KULIT. Fill in the estimate and the minimum so Mrs. Endang loses nothing when she is front-run, and her swap still goes through on an ordinary day.
  11. One Semar is left. Mrs. Sari and Bagas both paid at the studio (Mr. Joko miscounted), and both press Pesan (order) on their phones, Mrs. Sari a moment first. The page uses wagmi. Fill in when what is left is read again and when the page says "Semar terakhir milikmu" (the last Semar is yours), so only Mrs. Sari’s phone says it, never before her transaction is in a block, and both phones end up showing 0 left.
  12. Yesterday Mr. Piksel showed a demo at his stand on the exhibition chain (chain id 31338), and the teacher’s wallet is still connected there. The teacher paid for the last Semar on the studio’s chain (31337). Fill the Pesan button so her order really reaches the contract on the studio’s chain.

And more, 16 levels in all.