Intro

An advanced guide to working with Mocassin NFTs - Learn how to build your own NFT contracts using Python, Vyper, and the powerful tools of Mocassin. This lesson covers building basic and advanced NFTs, working with low-level encoding, and deploying to a testnet.

1. Intro
An advanced guide to working with Mocassin NFTs - Learn how to build your own NFT contracts using Python, Vyper, and the powerful tools of Mocassin. This lesson covers building basic and advanced NFTs, working with low-level encoding, and deploying to a testnet. Duration: 5min
2. Setup
A comprehensive guide to setting up a new project with Mox - a Python framework for interacting with blockchain. The lesson walks through creating a project directory, initializing it with Mox, and configuring it for use with Visual Studio Code. Duration: 1min
3. What Is An Nft
A beginner's introduction to NFTs, explaining their purpose and functionality. The lesson covers how NFTs are unique, how they differ from fungible tokens, and how they can be used for various purposes beyond just digital art. Duration: 7min
4. Building An Erc721 Contract
A comprehensive guide to building a basic ERC721 smart contract using Viper and Snekmate. The lesson covers setting up the project, importing libraries, and initializing essential state variables such as 'name', 'symbol', and 'baseURI'. Duration: 8min
5. Tokenuri
A basic guide to setting up a token URI with a base URI for your NFT smart contract. The lesson covers how to use IPFS to store images, create a mint function, and define the base URI in your smart contract. Duration: 8min
6. Deploy
A practical guide to deploying a Solidity smart contract using a Python script. The lesson covers setting up the environment, importing the contract, minting a token with a custom URI, and printing the token URI for verification. Duration: 3min
7. What Is Ipfs
A comprehensive guide to understanding IPFS and how it's used for decentralized storage of NFT data. The lesson explains how IPFS hashes data to generate unique identifiers, allowing for secure and resilient storage and retrieval. It also introduces the concept of pinning and the importance of utilizing services like Pinata for data persistence. Duration: 8min
8. Viewing An Nft In Metamask
A practical guide to viewing your NFT in Metamask - This lesson explains how to deploy your NFT to your own blockchain and view it in your Metamask. You'll also learn how to use a centralized gateway to access IPFS data within Metamask. Duration: 6min
9. Deploying To Zksync
A comprehensive guide to deploying an NFT smart contract to the ZkSync Era Test Node. The lesson covers setting up the necessary configuration in the "mocassin.toml" file and deploying the NFT contract through the terminal, demonstrating how to connect and interact with the Era Test Node. Duration: 3min
10. Note What Happens When We Stop Anvil
A practical guide to troubleshooting errors in your MetaMask wallet after stopping your Anvil and Era test nodes - This lesson explores how to resolve common MetaMask errors that occur when your test nodes are shut down, including clearing activity tab data and refreshing your MetaMask list. Duration: 1min
11. Workshop 1
A comprehensive guide to creating and deploying your own NFT with the help of IPFS. This lesson dives into the process of uploading and minting an NFT, utilizing both local and centralized IPFS gateways, and then viewing the results in Metamask. Duration: 3min
12. What Is An Svg
A technical introduction to using SVGs in NFTs. The lesson explains the benefits of using SVGs for NFT images, demonstrates how to create simple SVGs in VS Code, and covers how to encode an SVG into a URI to be used on-chain. Duration: 9min
13. Mood Nft
A comprehensive guide to creating a dynamic NFT with a mood that can be changed. The lesson covers creating a smart contract, initializing state variables, incorporating ERC721, and storing image data on-chain. Duration: 3min
14. Base 64 Encoding Images
A practical guide to base64 encoding images for on-chain use. The lesson covers using Python to base64 encode SVG images and save the output as a string variable for use in a Solidity smart contract. Duration: 6min
15. Base 64 Encoding Json
A comprehensive guide to Base64 encoding JSON on-chain. This lesson explores how to convert a JSON string into a Base64 encoded token URI, a key step for storing and retrieving metadata for your NFTs. Duration: 11min
16. Abi Encoding
A comprehensive guide to ABI encoding and decoding in Viper. This lesson explores the concept of encoding data in hex form and decoding it back to its original type. Duration: 12min
17. Function Selectors And Signatures
A powerful introduction to function selectors and signatures in Vyper, showcasing how they unlock contract interaction without requiring ABI encoding. The lesson covers using the "cast sig" command, the "method_id" function, and exploring function signature composition. Duration: 12min
18. Calling Functions Raw
A comprehensive guide to calling Solidity smart contracts using raw hex data in Viper. This lesson shows how to generate raw hex data to call a transfer function, and then how to use that data to directly interact with a smart contract. Duration: 7min
19. Manually Crafting Calldata
A practical guide to manually creating calldata - Learn how to use the 'cast calldata' tool in the terminal to create hexadecimal data for sending to a smart contract. This lesson uses Remix IDE to demonstrate sending calldata to an external function and analyzing the results. Duration: 2min
20. Mid Section Recap
A technical deep dive into raw calls in Viper and Solidity. The lesson explores the concept of function selectors, method IDs, and how to directly interact with smart contracts without relying on the ABI or interfaces. Duration: 3min
21. Verifying Calldata In Metamask
A comprehensive guide to verifying Metamask transactions - This lesson covers how to verify the call data within a transaction by using Metamask, Foundry, Etherscan, and openchain's signature database to ensure your wallet is performing the actions you intend. Duration: 8min
22. Finishing The Mood Nft
A comprehensive guide to finishing the Mood NFT project using Viper. The lesson covers creating a new flag, deploying the contract, and updating the token URI to reflect the mood of the owner. Duration: 7min
23. Workshop 2
A fun workshop to deploying a mood NFT - This lesson will show you how to deploy your own mood NFT to a locally running chain, flip its mood, and view it in Metamask. You'll also learn how to write tests to get 80% test coverage. Duration: 2min
24. Recap
A comprehensive recap of the concepts learned in the Moccasin NFTs workshop - This lesson is a refresher of the key topics covered in the workshop, including NFTs, ERC721, ABI encoding and decoding, and raw data call functions. You'll see how to build a custom token URI and use it to control the mood of an NFT. Duration: 6min

Course Overview

About the course

What you'll learn

How to build a DeFi stablecoin and customized NFT

How to deploy your smart contract on ZKsync with Moccasin

Advanced testing techniques like stateful and stateless Python fuzzing

How to write algorithmic trading scripts in Python

Hashing signatures, proxies, delegate calls, upgradable contracts, random numbers, and more!

Course Description

Who is this course for?

  • Software engineers
  • Web3 developers
  • Finance developers
  • AI developers
  • Anyone interested in learning Python and smart contracts

Potential Careers

Smart Contract Auditor

$100,000 - $200,000 (avg. salary)

On-chain Data Analyst

$59,000 - $139,000 (avg. salary)

DeFi Developer

$75,000 - $200,000 (avg. salary)

Smart Contract Engineer

$100,000 - $150,000 (avg. salary)

Web3 developer

$60,000 - $150,000 (avg. salary)

Web3 Developer Relations

$85,000 - $125,000 (avg. salary)

Meet your instructors

Patrick Collins

Patrick Collins

Founder at Cyfrin

Web3 engineer, educator, and Cyfrin co-founder. Patrick's smart contract development and security courses have helped hundreds of thousands of engineers kickstarting their careers into web3.

Last updated on January 15, 2025

Cyfrin
Updraft
CodeHawks
Solodit
Resources