npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

full-blockchain-solidity-course-js

v3.2.5

Published

full-blockchain-solidity-course-js

Downloads

10

Readme

Update: Head to Cyfrin Updraft

ℹ️ Important: This repo is no longer actively maintained as there have been changes in Hardhat tooling. The video is out of sync with the code, and you can still follow along with the video, but you will likely need to troubleshoot the changes in the tooling and dependencies. Note also that best practices have evolved since this video was made.
If you'd like to continue your training with more up-to-date material, you can take a look at Cyfrin Updraft. That content is developed with love by Patrick & Cyfrin <3. However note that Cyfrin Updraft training uses Foundry, not Hardhat, so there will be tooling changes involved.

Web3, Full Stack Solidity, Smart Contract & Blockchain - Beginner to Expert ULTIMATE Course | Javascript Edition

Welcome to the repository for the Ultimate Web3, Full Stack Solidity, and Smart Contract - Beginner to Expert Full Course | Javascript Edition FreeCodeCamp Course!

Link to video: https://www.youtube.com/watch?v=gyMwXuJrbJQ

All code references have both a javascript and a typescript edition.

Recommended Testnet: Sepolia

We have updated the repos to work with Sepolia due to Rinkeby and Kovan being sunset, and Goerli being a disaster. Let us know if any of the changes break stuff!

Testnet Faucets

Main Faucet: https://faucets.chain.link Backup Faucet: https://sepoliafaucet.com/

⚠️ All code associated with this course is for demo purposes only. They have not been audited and should not be considered production ready. Please use at your own risk.

Resources For This Course

Questions

Table of Contents

Lesson 0: The Edge of the Rabbit Hole

Welcome to the course!

⌨️ (00:00:00) Lesson 0: Welcome To Blockchain

Best Practices

  • Follow the repository: While going through the course be 100% certain to follow along with the github repository. If you run into in an issue check the chronological-updates in the repo.
  • Be Active in the community: Ask questions and engage with other developers going through the course in the discussions tab, be sure to go and say hello or gm! This space is different from the other industries, you don't have to be secretive; communicate, network and learn with others :)
  • Learn at your own pace: It doesn't matter if it takes you a day, a week, a month or even a year. Progress >>> Perfection
  • Take Breaks: You will exhaust your mind and recall less if you go all out and watch the entire course in one sitting. Suggested Strategy every 25 minutes take a 5 min break, and every 2 hours take a longer 30 min break
  • Refer to Documentation: Things are constantly being updated, so whenever Patrick opens up some documentation, open it your end and maybe even have the code sample next to you.

Lesson 1: Blockchain Basics

⌨️ (00:09:05) Lesson 1: Blockchain Basics

What is a Blockchain? What does a blockchain do?

The Purpose Of Smart Contracts

⌨️ (00:18:27) The Purpose of Smart Contracts

Other Blockchain Benefits

⌨️ (00:30:41) Other Blockchain Benefits

  • Decentralized
  • Transparency & Flexibility
  • Speed & Efficiency
  • Security & Immutability
  • Counterparty Risk Removal
  • Trust Minimized Agreements

What have Smart Contracts done so far?

⌨️ (00:36:36) What have Smart Contracts done so far?

Making Your First Transaction

⌨️ (00:39:17) Making Your First Transaction

Gas I: Introduction to Gas

⌨️ (00:58:59) Gas I: Introduction to Gas

How Do Blockchains Work?

⌨️ (01:05:32) How Do Blockchains Work

Signing Transactions

⌨️ (01:22:55) Signing Transactions

Gas II

⌨️ (01:30:22) Gas II: Block Rewards & EIP 1559

Gas II Summary

⌨️ (01:36:44) Gas II Summary

High-Level Blockchain Fundamentals

[⌨️ (01:39:32) High-Level Blockchain Fundamentals]https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=5972s()

🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Blockchain Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊

Lesson 2: Welcome to Remix! Simple Storage

⌨️ (02:01:16) Lesson 2: Welcome to Remix! Simple Storage

💻 Code: https://github.com/PatrickAlphaC/simple-storage-fcc

Introduction

⌨️ (02:03:05) Introduction

Setting Up Your First Contract

⌨️ (02:05:18) Setting Up Your First Contract

Basic Solidity: Types

⌨️ (02:12:28) Basic Solidity Types

Basic Solidity: Functions

⌨️ (02:18:40) Basic Solidity Functions

  • Functions
  • Deploying a Contract
    • Smart Contracts have addresses just like our wallets
  • Calling a public state-changing Function
  • Visibility
  • Gas III | An example
  • Scope
  • View & Pure Functions

Basic Solidity: Arrays & Structs

⌨️ (02:35:30) Basic Solidity Arrays & Structs

  • Structs
  • Intro to Storage
  • Arrays
  • Dynamic & Fixed Sized
  • push array function

Basic Solidity: Compiler Errors and Warnings

⌨️ (02:45:35) Basic Solidity Errors & Warnings

  • Yellow: Warnings are Ok
  • Red: Errors are not Ok

Memory, Storage, Calldata (Intro)

⌨️ (02:46:34) Basic Solidity Memory, Storage, & Calldata (Intro)

  • 6 Places you can store and access data
    • calldata
    • memory
    • storage
    • code
    • logs
    • stack

Mappings

⌨️ (02:50:17) Basic Solidity Mappings

Deploying your First Contract

⌨️ (02:53:38) Deploying your First Contract

  • A testnet or mainnet
  • Connecting Metamask
  • Find a faucet here
  • See the faucets at the top of this readme!
  • Interacting with Deployed Contracts

The EVM & A Recap of Lesson 2

⌨️ (03:03:07) The EVM & A Recap of Lesson 2

  • The EVM

Lesson 3: Remix Storage Factory

⌨️ (03:05:34) Lesson 3: Remix Storage Factory

💻 Code: https://github.com/PatrickAlphaC/storage-factory-fcc

Introduction

⌨️ (03:06:06) Introduction

Basic Solidity: Importing Contracts into other Contracts

⌨️ (03:07:29) Importing Contracts into other Contracts

Basic Solidity: Interacting with other Contracts

⌨️ (03:16:36) Interacting with other contracts

  • To interact, you always need: ABI + Address
  • ABI

Basic Solidity: Inheritance & Overrides

⌨️ (03:25:23) Inheritance & Overrides

Lesson 3 Recap

⌨️ (03:30:29) Lesson 3 Recap

Lesson 4: Remix Fund Me

⌨️ (03:31:55) Lesson 4: Remix Fund Me

💻 Code: https://github.com/PatrickAlphaC/fund-me-fcc

Introduction

Sending ETH Through a Function & Reverts

Chainlink & Oracles

Review of Sending ETH and working with Chainlink

Interfaces & Price Feeds

Importing from GitHub & NPM

Floating Point Math in Solidity

Basic Solidity: Arrays & Structs II

Review of Interfaces, Importing from GitHub, & Math in Solidity

Libraries

SafeMath, Overflow Checking, and the "unchecked" keyword

Basic Solidity: For Loop

  • For Loop
  • /* */ is another way to make comments

Basic Solidity: Resetting an Array

Sending ETH from a Contract

Basic Solidity: Constructor

Basic Solidity: Modifiers

Testnet Demo

Advanced Solidity

Immutable & Constant

Custom Errors

Receive & Fallback Functions

Lesson 4 Recap

🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Solidity Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊

Lesson 5: Ethers.js Simple Storage

⌨️ (05:30:42) Lesson 5: Ethers.js Simple Storage

💻 Code: https://github.com/PatrickAlphaC/ethers-simple-storage-fcc

🧪 Alchemy: https://alchemy.com/?a=673c802981

Effective Debugging Strategies & Getting Help

⌨️ (5:30:46) Effective Debugging Stategies & Getting Help

  1. Tinker and isolate problem
    1. For this course, take at LEAST 15 minutes to figure out a bug.
  2. Google / Web Search the Exact problem
    1. Go to this GitHub Repo / Discussions
  3. Ask a question on a Forum like Stack Exchange Ethereum or Stack Overflow
    1. Format your questions!!
    2. Use Markdown

How to Debug Anything Video

Installation & Setup

Mac & Linux Setup

Windows Setup

  • WSL
    • When working in WSL, use Linux commands instead of Windows commands
  • TroubleShooting
  • curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

⚠️ Please use Gitpod as an absolute last resort

Gitpod

  • Gitpod
    • If using this, NEVER share a private key with real money on Gitpod
    • Ideally you figure out the MacOS, Linux, or Windows install though

Local Development Introduction

  • CMD + K or CTRL + K clears the terminal
  • mkdir ethers-simple-storage-fcc
  • code . to open VSCode in a new VSCode window

Optional Javascript Crash Courses

    "[solidity]": {
        "editor.defaultFormatter": "NomicFoundation.hardhat-solidity"
    },
    "[javascript]":{
      "editor.defaultFormatter": "esbenp.prettier-vscode"
    }

In your .vscode/settings.json file.

Tiny Javascript Refresher

Asynchronous Programming in Javascript

Compiling our Solidity

Ganache & Networks

Introduction to Ethers.js

A Note on the await Keyword

Adding Transaction Overrides

Transaction Receipts

Sending a "raw" Transaction in Ethers.js

Interacting with Contracts in Ethers.js

Environment Variables

Better Private Key Management

Optional Prettier Formatting

Deploying to a Testnet or a Mainnet

Verifying on Block Explorers from the UI

Alchemy Dashboard & The Mempool

Lesson 5 Recap

Typescript Ethers Simple Storage

Lesson 6: Hardhat Simple Storage

⌨️ (08:20:17) Lesson 6: Hardhat Simple Storage

💻 Code: https://github.com/PatrickAlphaC/hardhat-simple-storage-fcc

Introduction

⌨️ (08:20:19) Introduction

Hardhat Setup

⌨️ (08:22:47) Hardhat Setup

Troubleshooting Hardhat Setup

⌨️ (08:29:43) Troubleshooting Hardhat Setup

Hardhat Setup Continued

⌨️ (08:31:48) Hardhat Setup Continued

Deploying SimpleStorage from Hardhat

⌨️ (08:33:10) Deploying SimpleStorage from Hardhat

Networks in Hardhat

⌨️ (08:41:44) Networks in Hardhat

Programmatic Verification

⌨️ (08:51:16) Programmatic Verification

Interacting with Contracts in Hardhat

⌨️ (09:06:37) Interacting with Contracts in Hardhat

Artifacts Troubleshooting

⌨️ (09:09:42) Artifacts Troubleshooting

Custom Hardhat Tasks

⌨️ (09:10:52) Custom Hardhat Tasks

Hardhat Localhost Node

⌨️ (09:18:12) Hardhat Localhost Node

The Hardhat Console

⌨️ (09:23:11) The Hardhat Console

Hardhat Tests

⌨️ (09:26:13) Hardhat Tests

Hardhat Gas Reporter

⌨️ (09:38:10) Hardhat Gas Reporter

Solidity Coverage

⌨️ (09:44:40) Solidity Coverage

Hardhat Waffle

⌨️ (09:47:02) Hardhat Waffle

Lesson 6 Recap

⌨️ (09:47:37) Lesson 6 Recap

Typescript Hardhat Simple Storage

⌨️ (09:52:15) Typescript Hardhat Simple Storage

yarn add --dev @typechain/ethers-v5 @typechain/hardhat @types/chai @types/node @types/mocha ts-node typechain typescript

Lesson 7: Hardhat Fund Me

⌨️ (10:00:48) Lesson 7: Hardhat Fund Me

💻 Code: https://github.com/PatrickAlphaC/hardhat-fund-me-fcc

Introduction

⌨️ (10:00:50) Introduction

Hardhat Setup - Fund Me

⌨️ (10:03:41) Hardhat Setup - Fund Me

Linting

⌨️ (10:06:20) Linting

Hardhat Setup - Fund Me - Continued

⌨️ (10:07:47) Hardhat Setup - Fund Me - Continued

Importing from NPM

⌨️ (10:09:38) Importing from NPM

Hardhat Deploy

⌨️ (10:10:43) Hardhat Deploy

Mocking

⌨️ (10:21:05) Mocking

Utils Folder

⌨️ (10:52:51) Utils Folder

Testnet Demo - Hardhat Fund Me

⌨️ (10:55:45) Testnet Demo - Hardhat Fund Me

  • Hardhat Deploy Block Confirmations

TypeScript

  • Code file (TypeScript edition)
  • Define blockConfirmations in the helper-hardhat-config.ts file instead of hardhat-config.js.

Solidity Style Guide

⌨️ (11:00:10) Solidity Style Guide

Testing Fund Me

⌨️ (11:08:36) Testing Fund Me

Breakpoints & Debugging

⌨️ (11:30:39) Breakpoints & Debugging

Gas III

⌨️ (11:33:40) Gas III

console.log & Debugging

⌨️ (11:36:35) console.log & Debugging

Testing Fund Me II

⌨️ (11:37:31) Testing Fund Me II

Storage in Solidity

⌨️ (11:44:34) Storage in Solidity

Gas Optimizations using Storage Knowledge

⌨️ (11:52:38) Gas Optimizations using Storage Knowledge

Solidity Chainlink Style Guide

⌨️ (12:05:29) Solidity Chainlink Style Guide

Storage Review

⌨️ (12:09:59) Storage Review

Staging Tests

⌨️ (12:11:43) Staging Tests

Running Scripts on a Local Node

⌨️ (12:17:58) Running Scripts on a Local Node

Adding Scripts to your package.json

⌨️ (12:22:00) Adding Scripts to your package.json

Pushing to GitHub

⌨️ (12:25:17) Pushing to GitHub

🐸🐦 Tweet Me (add your repo in)!

Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)

⌨️ (12:32:57) Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)

💻 Code: https://github.com/PatrickAlphaC/html-fund-me-fcc

Introduction

How Websites work with Web3 Wallets

  • How to Connect your Smart Contracts to Metamask
    • 💻 Code from Video: https://github.com/PatrickAlphaC/full-stack-web3-metamask-connectors
    • ✍️ Article from Video: https://betterprogramming.pub/everything-you-need-to-know-about-fullstack-web3-94c0f1b18019?sk=a2764bcbdae98bf05e1052931de77982

HTML Setup

  • Live Server: ExtensionID: ritwickdey.LiveServer

Connecting HTML to Metamask

Javascript in it's own file

ES6 vs Nodejs

Sending a transaction from a Website

Resetting an Account in Metamask

MetaMask - RPC Error:
[ethjs-query] while formatting ouputs from RPC '{"value":{"code":-32603,"data":{"code":-32000,"message":"Nonce too high. Expected nonce to be 2 but got 4. Note that transactions can't be queued when automining."}}}'

Listening for Events and Completed Transactions

Input Forms

Reading from the Blockchain

Withdraw Function

Lesson 8 Recap

Optional Links:

Lesson 9: Hardhat Smart Contract Lottery

⌨️ (13:41:02) Lesson 9: Hardhat Smart Contract Lottery

💻 Code: https://github.com/PatrickAlphaC/hardhat-smartcontract-lottery-fcc

Introduction

Hardhat Setup - Smart Contract Lottery

⌨️ (13:43:43) Hardhat Setup

  • Install dependencies:
yarn add --dev @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers @nomiclabs/hardhat-etherscan @nomiclabs/hardhat-waffle chai ethereum-waffle hardhat hardhat-contract-sizer hardhat-deploy hardhat-gas-reporter prettier prettier-plugin-solidity solhint solidity-coverage dotenv
  • Install dependencies (Typescript version):
yarn add --dev @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers @nomiclabs/hardhat-etherscan @nomiclabs/hardhat-waffle chai ethereum-waffle hardhat hardhat-contract-sizer hardhat-deploy hardhat-gas-reporter prettier prettier-plugin-solidity solhint solidity-coverage dotenv @typechain/ethers-v5 @typechain/hardhat @types/chai @types/node ts-node typechain typescript

Raffle.sol Setup

⌨️ (13:46:55) Raffle.sol Setup

Introduction to Events

⌨️ (13:54:02) Introduction to Events

Events in Raffle.sol

⌨️ (14:00:47) Events in Raffle.sol

Introduction to Chainlink VRF

⌨️ (14:02:30) Introduction to Chainlink VRF

Sub-Lesson: Chainlink VRF

Implementing Chainlink VRF - Introduction

⌨️ (14:09:53) Implementing Chainlink VRF

Hardhat Shorthand

Implementing Chainlink VRF - The Request

Implementing Chainlink VRF - The FulFill

Modulo

Introduction to Chainlink Keepers

Implementing Chainlink Keepers - checkUpkeep

Enums

Implementing Chainlink Keepers - checkUpkeep continued

  • block.timestamp

Implementing Chainlink Keepers - perform