full-blockchain-solidity-course-js

full-blockchain-solidity-course-js

系统学习Web3、Solidity和区块链开发的实践课程

这是一门涵盖Web3、Solidity和智能合约开发的综合课程。内容包括区块链基础、Solidity编程、智能合约部署及与区块链交互等。通过实践项目,学习者可逐步掌握从入门到进阶的区块链开发技能。课程以JavaScript为主要编程语言,适合有意深入区块链技术并开发去中心化应用的开发人员。

Web3Solidity智能合约区块链以太坊Github开源项目

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

<br/> <p align="center"> <a href="https://www.youtube.com/watch?v=gyMwXuJrbJQ" target="_blank"> <img src="./img/blockchain1.png" width="500" alt="Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Javascript Tutorial"> </a> </p> <br/>

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:<a href="https://faucets.chain.link" target="_blank"> https://faucets.chain.link</a> Backup Faucet:<a href="https://sepoliafaucet.com/" target="_blank"> https://sepoliafaucet.com/</a>

⚠️ 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

<details> <summary>Resources</summary> <ol> <li><a href="#testnet-faucets">Testnet Faucets</a></li> <li><a href="#resources-for-this-course">Resources For This Course</a><ul> <li><a href="#questions">Questions</a></li> </ul> </li> <li><a href="#table-of-contents">Table of Contents</a></li> </ol> </details> <details> <summary> <a href="#lesson-0-the-edge-of-the-rabbit-hole">Lesson 0: The Edge of the Rabbit Hole</a></summary> <ol> <li> <a href="#welcome-to-the-course">Welcome to the course! </a> </li> <li> <a href="#best-practices">Best Practices </a> </li> </ol> </details> <details> <summary> <a href="#lesson-1-blockchain-basics"> Lesson 1: Blockchain Basics </a> </summary> <ol> <li> <a href="#what-is-a-blockchain-what-does-a-blockchain-do">What is a Blockchain? What does a blockchain do?</a> </li> <li><a href="#the-purpose-of-smart-contracts">The Purpose Of Smart Contracts</a></li> <li><a href="#other-blockchain-benefits">Other Blockchain Benefits</a></li> <li><a href="#what-have-smart-contracts-done-so-far">What have Smart Contracts done so far?</a></li> <li><a href="#making-your-first-transaction">Making Your First Transaction</a></li> <li><a href="#gas-i-introduction-to-gas">Gas I: Introduction to Gas</a></li> <li><a href="#how-do-blockchains-work">How Do Blockchains Work?</a></li> <li><a href="#signing-transactions">Signing Transactions</a></li> <li><a href="#gas-ii">Gas II</a></li> <li><a href="#high-level-blockchain-fundamentals">High-Level Blockchain Fundamentals</a></li> </ol> </details> <details> <summary><a href="#lesson-2-welcome-to-remix-simple-storage">Lesson 2: Welcome to Remix! Simple Storage</a></summary> <ol> <li><a href="#introduction">Introduction</a></li> <li><a href="#setting-up-your-first-contract">Setting Up Your First Contract</a></li> <li><a href="#basic-solidity-types">Basic Solidity: Types</a></li> <li><a href="#basic-solidity-functions">Basic Solidity: Functions</a></li> <li><a href="#basic-solidity-arrays--structs">Basic Solidity: Arrays &amp; Structs</a></li> <li><a href="#basic-solidity-compiler-errors-and-warnings">Basic Solidity: Compiler Errors and Warnings</a></li> <li><a href="#memory-storage-calldata-intro">Memory, Storage, Calldata (Intro)</a></li> <li><a href="#mappings">Mappings</a></li> <li><a href="#deploying-your-first-contract">Deploying your First Contract</a></li> <li><a href="#the-evm--a-recap-of-lesson-2">The EVM &amp; A Recap of Lesson 2</a></li> </ol> </details> <details> <summary><a href="#lesson-3-remix-storage-factory">Lesson 3: Remix Storage Factory</a></summary> <ol> <li><a href="#introduction-1">Introduction</a></li> <li><a href="#basic-solidity-importing-contracts-into-other-contracts">Basic Solidity: Importing Contracts into other Contracts</a></li> <li><a href="#basic-solidity-interacting-with-other-contracts">Basic Solidity: Interacting with other Contracts</a></li> <li><a href="#basic-solidity-inheritance--overrides">Basic Solidity: Inheritance &amp; Overrides</a></li> <li><a href="#lesson-3-recap">Lesson 3 Recap</a></li> </ol> </details> <details> <summary><a href="#lesson-4-remix-fund-me">Lesson 4: Remix Fund Me</a></summary> <ol> <li><a href="#introduction-2">Introduction</a></li> <li><a href="#sending-eth-through-a-function--reverts">Sending ETH Through a Function &amp; Reverts</a></li> <li><a href="#chainlink--oracles">Chainlink &amp; Oracles</a></li> <li><a href="#review-of-sending-eth-and-working-with-chainlink">Review of Sending ETH and working with Chainlink</a></li> <li><a href="#interfaces--price-feeds">Interfaces &amp; Price Feeds</a></li> <li><a href="#importing-from-github--npm">Importing from GitHub &amp; NPM</a></li> <li><a href="#floating-point-math-in-solidtiy">Floating Point Math in Solidity</a></li> <li><a href="#basic-solidity-arrays--structs-ii">Basic Solidity: Arrays &amp; Structs II</a></li> <li><a href="#review-of-interfacs-importing-from-github--math-in-solidity">Review of Interfacs, Importing from GitHub, &amp; Math in Solidity</a></li> <li><a href="#libraries">Libraries</a></li> <li><a href="#safemath-overflow-checking-and-the-unchecked-keywork">SafeMath, Overflow Checking, and the &quot;unchecked&quot; keywork</a></li> <li><a href="#basic-solidity-for-loop">Basic Solidity: For Loop</a></li> <li><a href="#basic-solidity-resetting-an-array">Basic Solidity: Resetting an Array</a></li> <li><a href="#sending-eth-from-a-contract">Sending ETH from a Contract</a></li> <li><a href="#basic-solidity-constructor">Basic Solidity: Constructor</a></li> <li><a href="#basic-solidity-modifiers">Basic Solidity: Modifiers</a></li> <li><a href="#testnet-demo">Testnet Demo</a></li> <li><a href="#advanced-solidity">Advanced Solidity</a><ul> <li><a href="#immutable--constant">Immutable &amp; Constant</a></li> <li><a href="#custom-errors">Custom Errors</a></li> <li><a href="#receive--fallback-functions">Receive &amp; Fallback Functions</a></li> <li><a href="#lesson-4-recap">Lesson 4 Recap</a></li> </ol> </details> <details> <summary><a href="#lesson-5-ethersjs-simple-storage">Lesson 5: Ethers.js Simple Storage</a></summary> <ol> <li><a href="#effective-debugging-strategies--getting-help">Effective Debugging Strategies &amp; Getting Help</a><ul> <li><a href="#how-to-debug-anything-video">How to Debug Anything Video</a></li> </ul> </li> <li><a href="#installation--setup">Installation &amp; Setup</a><ul> <li><a href="#mac--linux-setup">Mac &amp; Linux Setup</a></li> <li><a href="#windows-setup">Windows Setup</a></li> <li><a href="#gitpod">Gitpod</a></li> </ul> </li> <li><a href="#local-development-introduction">Local Development Introduction</a><ul> <li><a href="#optional-javascript-crash-courses">Optional Javascript Crash Courses</a></li> </ul> </li> <li><a href="#tiny-javascript-refresher">Tiny Javascript Refresher</a></li> <li><a href="#asynchronous-programming-in-javascript">Asynchronous Programming in Javascript</a></li> <li><a href="#compiling-our-solidity">Compiling our Solidity</a></li> <li><a href="#ganache--networks">Ganache &amp; Networks</a></li> <li><a href="#introduction-to-ethersjs">Introduction to Ethers.js</a><ul> <li><a href="#a-note-on-the-await-keyword">A Note on the await Keyword</a></li> </ul> </li> <li><a href="#adding-transaction-overrides">Adding Transaction Overrides</a></li> <li><a href="#transaction-receipts">Transaction Receipts</a></li> <li><a href="#sending-a-raw-transaction-in-ethersjs">Sending a &quot;raw&quot; Transaction in Ethersjs</a></li> <li><a href="#interacting-with-contracts-in-ethersjs">Interacting with Contracts in Ethersjs</a></li> <li><a href="#environment-variables">Environment Variables</a></li> <li><a href="#better-private-key-management">Better Private Key Management</a></li> <li><a href="#optional-prettier-formatting">Optional Prettier Formatting</a></li> <li><a href="#deploying-to-a-testnet-or-a-mainnet">Deploying to a Testnet or a Mainnet</a></li> <li><a href="#verifying-on-block-explorers-from-the-ui">Verifying on Block Explorers from the UI</a></li> <li><a href="#alchemy-dashboard--the-mempool">Alchemy Dashboard &amp; The Mempool</a></li> <li><a href="#lesson-5-recap">Lesson 5 Recap</a><ul> <li><a href="#typescript-ethers-simple-storage">Typescript Ethers Simple Storage</a></li> </ul> </li> </ol> </details> <details> <summary><a href="#lesson-6-hardhat-simple-storage">Lesson 6: Hardhat Simple Storage</a></summary> <ol> <li><a href="#introduction-3">Introduction</a></li> <li><a href="#hardhat-setup">Hardhat Setup</a><ul> <li><a href="#troubleshooting-hardaht-setup">Troubleshooting Hardaht Setup</a></li> </ul> </li> <li><a href="#hardhat-setup-continued">Hardhat Setup Continued</a></li> <li><a href="#deploying-simplestorage-from-hardhat">Deploying SimpleStorage from Hardhat</a></li> <li><a href="#networks-in-hardhat">Networks in Hardhat</a></li> <li><a href="#programatic-verification">Programatic Verification</a></li> <li><a href="#interacting-with-contracts-in-hardhat">Interacting with Contracts in Hardhat</a></li> <li><a href="#artifacts-troubleshooting">Artifacts Troubleshooting</a></li> <li><a href="#custom-hardhat-tasks">Custom Hardhat Tasks</a></li> <li><a href="#hardhat-localhost-node">Hardhat Localhost Node</a></li> <li><a href="#the-hardhat-console">The Hardhat Console</a></li> <li><a href="#hardhat-tests">Hardhat Tests</a></li> <li><a href="#hardhat-gas-reporter">Hardhat Gas Reporter</a></li> <li><a href="#solidity-coverage">Solidity Coverage</a></li> <li><a href="#hardhat-waffle">Hardhat Waffle</a></li> <li><a href="#lesson-6-recap">Lesson 6 Recap</a><ul> <li><a href="#typescript-hardhat-simple-storage">Typescript Hardhat Simple Storage</a></li> </ul> </li> </ol> </details> <details> <summary><a href="#lesson-7-hardhat-fund-me">Lesson 7: Hardhat Fund Me</a></summary> <ol> <li><a href="#introduction-4">Introduction</a></li> <li><a href="#hardhat-setup---fund-me">Hardhat Setup - Fund Me</a></li> <li><a href="#linting">Linting</a></li> <li><a href="#hardhat-setup---fund-me---continued">Hardhat Setup - Fund Me - Continued</a></li> <li><a href="#importing-from-npm">Importing from NPM</a></li> <li><a href="#hardhat-deploy">Hardhat Deploy</a></li> <li><a href="#mocking">Mocking</a></li> <li><a href="#utils-folder">Utils Folder</a></li> <li><a href="#testnet-demo---hardhat-fund-me">Testnet Demo - Hardhat Fund Me</a></li> <li><a href="#solidity-style-guide">Solidity Style Guide</a></li> <li><a href="#testing-fund-me">Testing Fund Me</a></li> <li><a href="#breakpoints--debugging">Breakpoints &amp; Debugging</a></li> <li><a href="#gas-iii">Gas III:</a></li> <li><a href="#consolelog--debugging">console.log &amp; Debugging</a></li> <li><a href="#testing-fund-me-ii">Testing Fund Me II</a></li> <li><a href="#storage-in-solidity">Storage in Solidity</a></li> <li><a href="#gas-optimizations-using-storage-knowledge">Gas Optimizations using Storage Knowledge</a></li> <li><a href="#solidity-chainlink-style-guide">Solidity Chainlink Style Guide</a></li> <li><a href="#storage-review">Storage Review</a></li> <li><a href="#staging-tests">Staging Tests</a></li> <li><a href="#running-scripts-on-a-local-node">Running Scripts on a Local Node</a></li> <li><a href="#adding-scripts-to-your-packagejson">Adding Scripts to your package.json</a></li> <li><a href="#pushing-to-github">Pushing to GitHub</a></li> <li><a href="#-tweet-me-add-your-repo-in">🐸🐦 Tweet Me (add your repo in)!</a></li> </ol> </details> <details> <summary><a href="#lesson-8-html--javascript-fund-me-full-stack--front-end">Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)</a></summary> <ol> <li><a href="#introduction-5">Introduction</a></li> <li><a href="#how-websites-work-with-web3-wallets">How Websites work with Web3 Wallets</a></li> <li><a href="#html-setup">HTML Setup</a></li> <li><a href="#connecting-html-to-metamask">Connecting HTML to Metamask</a></li> <li><a href="#javascript-in-its-own-file">Javascript in it&#39;s own file</a></li> <li><a href="#es6-vs-nodejs">ES6 vs Nodejs</a></li> <li><a href="#sending-a-transaction-from-a-website">Sending a transaction from a Website</a></li> <li><a href="#resetting-an-account-in-metamask">Resetting an Account in Metamask</a></li> <li><a href="#listening-for-events-and-completed-transactions">Listening for Events and Completed Transactions</a></li> <li><a href="#input-forms">Input Forms</a></li> <li><a href="#reading-from-the-blockchain">Reading from the Blockchain</a></li> <li><a href="#withdraw-function">Withdraw Function</a></li> <li><a href="#lesson-8-recap">Lesson 8 Recap</a><ul> <li><a

编辑推荐精选

iTerms

iTerms

企业专属的AI法律顾问

iTerms是法大大集团旗下法律子品牌,基于最先进的大语言模型(LLM)、专业的法律知识库和强大的智能体架构,帮助企业扫清合规障碍,筑牢风控防线,成为您企业专属的AI法律顾问。

SimilarWeb流量提升

SimilarWeb流量提升

稳定高效的流量提升解决方案,助力品牌曝光

稳定高效的流量提升解决方案,助力品牌曝光

Sora2视频免费生成

Sora2视频免费生成

最新版Sora2模型免费使用,一键生成无水印视频

最新版Sora2模型免费使用,一键生成无水印视频

Transly

Transly

实时语音翻译/同声传译工具

Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。

讯飞绘文

讯飞绘文

选题、配图、成文,一站式创作,让内容运营更高效

讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。

热门AI辅助写作AI工具讯飞绘文内容运营AI创作个性化文章多平台分发AI助手
TRAE编程

TRAE编程

AI辅助编程,代码自动修复

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

AI工具TraeAI IDE协作生产力转型热门
商汤小浣熊

商汤小浣熊

最强AI数据分析助手

小浣熊家族Raccoon,您的AI智能助手,致力于通过先进的人工智能技术,为用户提供高效、便捷的智能服务。无论是日常咨询还是专业问题解答,小浣熊都能以快速、准确的响应满足您的需求,让您的生活更加智能便捷。

imini AI

imini AI

像人一样思考的AI智能体

imini 是一款超级AI智能体,能根据人类指令,自主思考、自主完成、并且交付结果的AI智能体。

Keevx

Keevx

AI数字人视频创作平台

Keevx 一款开箱即用的AI数字人视频创作平台,广泛适用于电商广告、企业培训与社媒宣传,让全球企业与个人创作者无需拍摄剪辑,就能快速生成多语言、高质量的专业视频。

即梦AI

即梦AI

一站式AI创作平台

提供 AI 驱动的图片、视频生成及数字人等功能,助力创意创作

下拉加载更多