youtube image
From YouTube: Smart India Hackathon Workshop #2 pt. 2 - CEP-78 with Casper JS SDK pt. 2

Description

In part 2 of the second workshop for the Smart India Hackathon, Casper Association Developer Advocate Dylan Ireland expands on what was learned from workshop #1. In workshop #2 you’ll learn how to transfer NFTs, as well as query information like balance of on account, the tokens owned by an account, and the total number of NFTs minted. You will also learn how to build a basic front-end and use the Casper Signer to sign transactions, allowing users to mint and transfer directly from a webpage.

Workshop #1: https://youtu.be/9UvsgpXQVpk
Workshop #2 pt 1: https://youtu.be/R9g1K9ngHmY

Template Repository: https://github.com/casper-ecosystem/sih-workshop-2-template

Complete Repository: https://github.com/casper-ecosystem/sih-workshop-2

Casper JS SDK: https://github.com/casper-ecosystem/casper-js-sdk


0:00 Introduction
0:15 Clone Template Repository
0:40 Changes Made Since Workshop #1
2:25 Writing the Transfer Function
4:34 Create Recipient Keys
5:17 Writing balanceOf Function
8:10 Writing ownerOf Function
9:22 Writing TotalMinted Function
10:20 Writing Test Function
12:57 Running a Test
17:15 Set Contract Hash in server.js
17:40 Review Template JavaScript
18:40 Fix Error and Re-test
20:22 Review Template JavaScript
22:40 Rewrite Mint Function on Front-End
26:25 sendDeploy Function Overview
27:36 sendDeploy Endpoint in server.js
28:47 - receiveAndSendDeploy Function
30:00 Error Resolution
31:45 Successful NFT State Data Retrieval
32:00 Start Server
32:48 Testing Front-End Minting
35:00 Rewrite Transfer Function on Front-End
37:20 Testing Front-End Transfers
38:52 Rewrite ownerOf on Front-End
41:42 Add balanceOf, totalMinted Functions
44:15 Testing State Retrieval Functions
44:15 Testing State Retrieval Functions
45:37 Conclusion