Interact with a smart contract

Teaches how to interact with Solidity smart contracts, particularly for minting NFTs. It includes setting up the necessary environment and scripts, and deploying NFTs using tools like Foundry and IPFS.

Solidity Developer

Advanced Foundry

1. Introduction to NFTs
his introductory lesson on Non-Fungible Tokens (NFTs) covers the basics of NFTs, including their creation, dynamics, and values. It features a practical project involving dynamic NFTs of dogs, emphasizing the addition of NFTs to MetaMask and connecting with platforms like OpenSea for selling NFTs. Duration: 3min
2. What is an NFT
Dive deep into the world of Non-Fungible Tokens (NFTs), exploring their uniqueness compared to traditional tokens (ERC20s). The lesson focuses on the distinct nature of NFTs, their application in digital art, and the use of platforms like OpenSea and Rarible for trading. Duration: 7min
3. Foundry setup
This session guides you through setting up the Foundry environment for NFT development. It includes instructions on creating directories, initializing your project, and using OpenZeppelin contracts for defining NFTs, highlighting the process of minting and deploying NFT images. Duration: 11min
4. Introduction to IPFS
Learn about the Interplanetary File System (IPFS), a decentralized data storage system, and its use in NFT development. Understand the concept of hashing data, pinning it on IPFS nodes, and the global network of nodes, differentiating it from blockchain in terms of data storage and access. Duration: 8min
5. Upload and use IPFS data (token URI)
This section explores using IPFS for hosting NFT images and metadata, focusing on OpenSea for practical demonstration. It also covers the customization of NFT appearances by allowing users to choose their Token URI, thus determining the look of their tokens. Duration: 7min
6. Writing the deployment script
Learn how to write a deployment script for NFTs. This includes using Forge script for deploying Basic NFTs and understanding the contract deployment process, highlighting the importance of testing and compiling before deployment. Duration: 2min
7. Test the NFTs smart contract
Focuses on testing the basic NFT contract using Solidity. It includes detailed steps for conducting tests like confirming the NFT name and testing the mint function, emphasizing the importance of testing for successful smart contract deployment. Duration: 11min
8. Quiz: NFTs Collection Intro Quiz
Questions: 9
9. Interact with a smart contract
Teaches how to interact with Solidity smart contracts, particularly for minting NFTs. It includes setting up the necessary environment and scripts, and deploying NFTs using tools like Foundry and IPFS. Duration: 3min
10. Deploy your NFTs on the testnet
Guides on deploying NFTs to a testnet and importing them into MetaMask. It covers the use of Anvil for deployment, extracting contract data, and using MetaMask to interact with the deployed NFTs. Duration: 7min
11. IPFS and Pinata vs HTTP vs on chain SVGs
Discusses the pros and cons of using IPFS, HTTP, and on-chain SVGs for storing NFT data. It covers the pitfalls of each method and introduces services like Piñata Cloud for securing digital assets on IPFS. Duration: 4min
12. What is an SVG?
Explains Scalable Vector Graphics (SVGs), their advantages, and how to create them. The lesson includes coding snippets for SVG creation and highlights their use in NFTs for on-chain storage. Duration: 8min
13. Create a dynamic NFTs collection
Focuses on creating dynamic SVG NFTs, particularly a mood-changing NFT that alternates its appearance. It includes detailed instructions for setting up the NFT project, minting the NFTs, and defining their appearance. Duration: 5min
14. Encoding SVGs to be stored onchain
Teaches encoding SVGs in Base64 format for on-chain storage in NFTs. It covers the process of encoding and testing SVG NFTs, ensuring their proper functioning and appearance Duration: 17min
15. Modify the NFT image onchain
This section is about adding functionality to change the NFT's appearance on-chain. It includes creating a function to flip the mood of an NFT, ensuring only the owner can modify it Duration: 3min
16. Create the deployment script
Guides on automating the deployment process of Mood NFTs using scripting. It covers setting up the deploy script, encoding SVGs, and testing the deployment script for effectiveness. Duration: 18min
17. Debug your smart contract
Guides on automating the deployment process of Mood NFTs using scripting. It covers setting up the deploy script, encoding SVGs, and testing the deployment script for effectiveness. Duration: 6min
18. Deploy and interact using Anvil
This lesson covers deploying and interacting with NFTs using Anvil, a local Ethereum network. It includes setting up MetaMask with Anvil, deploying Mood NFTs, minting, and flipping their mood, demonstrating the process of NFT interaction on a local blockchain network. Duration: 6min
19. Introduction to Filecoin and Arweave
Introduces Filecoin and Arweave, two decentralized storage solutions for NFT metadata. The lesson explores their features, benefits, and use cases, with insights from an expert at the Filecoin Foundation, highlighting the future of decentralized data storage. Duration: 1min
20. Advanced EVM - Opcodes, calling, etc
Delves into advanced Ethereum Virtual Machine (EVM) concepts, focusing on opcodes and function calls. It demonstrates decoding transaction data using MetaMask and highlights the importance of verifying transactions to ensure safety in the cryptocurrency world. Duration: 24min
21. Quiz: NFTs Collection Recap Quiz
Questions: 5
22. Advanced EVM - Encoding
Explores ABI encoding and decoding in the context of EVM. The lesson breaks down the process of converting variables for use in transaction data fields, emphasizing the importance of understanding bytecode and binary for blockchain transactions. Duration: 6min
23. Advanced EVM - Recap
A recap of the advanced EVM concepts covered in the course. It revisits topics like string combination, low-level concepts, binary encoding, and the use of the 'call' function in Solidity, summarizing the key takeaways from the advanced sections of the course. Duration: 2min
24. EVM signatures selectors
Focuses on EVM encoding signatures and selectors. The lesson explains how to populate the data field in function calls, the role of function selectors, and the use of ABI to call functions without explicit interface definitions. Duration: 15min
25. Verifying a transaction in Metamask
Provides a guide on verifying transactions in MetaMask. It includes steps to decode transaction data and emphasizes the importance of transaction verification for security purposes, especially when swapping tokens or interacting with smart contracts. Duration: 8min
26. Section recap
A comprehensive recap of the entire course, summarizing key concepts such as NFT basics, storage options, advanced EVM topics, smart contract interaction, and the use of tools like MetaMask for transaction verification. Duration: 4min

Course Overview

About the course

What you'll learn

Advanced smart contract development

How to develop a stablecoin

How to develop a DeFi protocol

How to develop a DAO

Advanced smart contracts testing

Fuzz testing

Manual verification

Course Description

Who is this course for?

  • Engineers
  • Smart Contract Security researchers

Potential Careers

Web3 Developer Relations

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

Web3 developer

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

Smart Contract Engineer

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

Smart Contract Auditor

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

Security researcher

$49,999 - $120,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.

Guest lecturers:

Juliette Chevalier

Juliette Chevalier

Lead Developer relations at Aragon

Ciara Nightingale

Ciara Nightingale

Developer relations at Thirdweb

Vasiliy Gualoto

Vasiliy Gualoto

Developer relations at Cyfrin

Nader Dabit

Nader Dabit

Director of developer relations at Avara

Ally Haire

Ally Haire

Developer relations at Protocol Labs

Harrison

Harrison

Founder at GasliteGG

Vitto Rivabella

Vitto Rivabella

Lead Developer relations at Cyfrin

Last updated on November 29, 2024

Testimonials

Students Reviews

Read what our students have to say about this course.

Chainlink

Chainlink

Chainlink

Gustavo Gonzalez

Gustavo Gonzalez

Solutions Engineer at OpenZeppelin

Francesco Andreoli

Francesco Andreoli

Lead Devrel at Metamask

Albert Hu

Albert Hu

DeForm Founding Engineer

Radek

Radek

Senior Developer Advocate at Ceramic

Boidushya

Boidushya

WalletConnect

Idris

Idris

Developer Relations Engineer at Axelar

Cyfrin
Updraft
CodeHawks
Solodit
Resources