26 Sep 2022
In part 1 of the second workshop as part of the Smart India Hackathon, Rust developer Karan Dhareshwar presents a tutorial on how to build out a fundraiser contract that accepts donations and records the accounts that donated. He also gives an overview of writing and executing smart contract tests before deployment.
0:00 Introduction
0:50 Agenda
2:22 Overview of Fundraising Contract
3:20 Contents of a Contract Project Directory
7:19 Writing the Donation Entrypoint
12:10 Handling Errors
16:05 Writing Init Entrypoint
19:22 Count Donations by Account
26:47 URef Source Definition
29:42 Writing the Call Function
37:18 Contract Recap
37:39 Testing Example
39:14 Casper Documentation Overview
40:45 Debugging Failed Tests
51:20 Conclusion
Missed the first workshop? Find it here: https://youtu.be/9UvsgpXQVpk
0:00 Introduction
0:50 Agenda
2:22 Overview of Fundraising Contract
3:20 Contents of a Contract Project Directory
7:19 Writing the Donation Entrypoint
12:10 Handling Errors
16:05 Writing Init Entrypoint
19:22 Count Donations by Account
26:47 URef Source Definition
29:42 Writing the Call Function
37:18 Contract Recap
37:39 Testing Example
39:14 Casper Documentation Overview
40:45 Debugging Failed Tests
51:20 Conclusion
Missed the first workshop? Find it here: https://youtu.be/9UvsgpXQVpk
- 3 participants
- 52 minutes

26 Sep 2022
In this workshop for the Smart India Hackathon, Casper Association Developer Advocate Dylan Ireland demonstrates how to install CEP-78 contracts and mint NFTs from them with the Casper JS SDK.
Repository: https://github.com/casper-ecosystem/sih-workshop-1
Casper JS SDK: https://github.com/casper-ecosystem/casper-js-sdk
00:00 Introduction
0:47 Project Initialization
2:00 Clone and Compile CEP-78 Contract
7:27 Generate and Fund Account
10:20 Begin Coding
10:40 Importing Dependencies
12:11 Instantiate Client Objects and Constants
16:24 CEP-78 Modalities
20:28 Writing Contract Installation Function
36:04 Writing Deployment Polling Function
42:20 Iterating State Transformations
44:20 Finishing Contract Installation Function
45:40 Testing Installation
51:07 Writing the Mint Function
58:04 Testing Mint Function
1:00:16 Recap / Overview
1:02:42 Conclusion
Repository: https://github.com/casper-ecosystem/sih-workshop-1
Casper JS SDK: https://github.com/casper-ecosystem/casper-js-sdk
00:00 Introduction
0:47 Project Initialization
2:00 Clone and Compile CEP-78 Contract
7:27 Generate and Fund Account
10:20 Begin Coding
10:40 Importing Dependencies
12:11 Instantiate Client Objects and Constants
16:24 CEP-78 Modalities
20:28 Writing Contract Installation Function
36:04 Writing Deployment Polling Function
42:20 Iterating State Transformations
44:20 Finishing Contract Installation Function
45:40 Testing Installation
51:07 Writing the Mint Function
58:04 Testing Mint Function
1:00:16 Recap / Overview
1:02:42 Conclusion
- 2 participants
- 1:05 hours

26 Sep 2022
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
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
- 1 participant
- 46 minutes
