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

编辑推荐精选

扣子-AI办公

扣子-AI办公

职场AI,就用扣子

AI办公助手,复杂任务高效处理。办公效率低?扣子空间AI助手支持播客生成、PPT制作、网页开发及报告写作,覆盖科研、商业、舆情等领域的专家Agent 7x24小时响应,生活工作无缝切换,提升50%效率!

堆友

堆友

多风格AI绘画神器

堆友平台由阿里巴巴设计团队创建,作为一款AI驱动的设计工具,专为设计师提供一站式增长服务。功能覆盖海量3D素材、AI绘画、实时渲染以及专业抠图,显著提升设计品质和效率。平台不仅提供工具,还是一个促进创意交流和个人发展的空间,界面友好,适合所有级别的设计师和创意工作者。

图像生成AI工具AI反应堆AI工具箱AI绘画GOAI艺术字堆友相机AI图像热门
码上飞

码上飞

零代码AI应用开发平台

零代码AI应用开发平台,用户只需一句话简单描述需求,AI能自动生成小程序、APP或H5网页应用,无需编写代码。

Vora

Vora

免费创建高清无水印Sora视频

Vora是一个免费创建高清无水印Sora视频的AI工具

Refly.AI

Refly.AI

最适合小白的AI自动化工作流平台

无需编码,轻松生成可复用、可变现的AI自动化工作流

酷表ChatExcel

酷表ChatExcel

大模型驱动的Excel数据处理工具

基于大模型交互的表格处理系统,允许用户通过对话方式完成数据整理和可视化分析。系统采用机器学习算法解析用户指令,自动执行排序、公式计算和数据透视等操作,支持多种文件格式导入导出。数据处理响应速度保持在0.8秒以内,支持超过100万行数据的即时分析。

AI工具酷表ChatExcelAI智能客服AI营销产品使用教程
TRAE编程

TRAE编程

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

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

AI工具TraeAI IDE协作生产力转型热门
AIWritePaper论文写作

AIWritePaper论文写作

AI论文写作指导平台

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

AI辅助写作AI工具AI论文工具论文写作智能生成大纲数据安全AI助手热门
博思AIPPT

博思AIPPT

AI一键生成PPT,就用博思AIPPT!

博思AIPPT,新一代的AI生成PPT平台,支持智能生成PPT、AI美化PPT、文本&链接生成PPT、导入Word/PDF/Markdown文档生成PPT等,内置海量精美PPT模板,涵盖商务、教育、科技等不同风格,同时针对每个页面提供多种版式,一键自适应切换,完美适配各种办公场景。

AI办公办公工具AI工具博思AIPPTAI生成PPT智能排版海量精品模板AI创作热门
潮际好麦

潮际好麦

AI赋能电商视觉革命,一站式智能商拍平台

潮际好麦深耕服装行业,是国内AI试衣效果最好的软件。使用先进AIGC能力为电商卖家批量提供优质的、低成本的商拍图。合作品牌有Shein、Lazada、安踏、百丽等65个国内外头部品牌,以及国内10万+淘宝、天猫、京东等主流平台的品牌商家,为卖家节省将近85%的出图成本,提升约3倍出图效率,让品牌能够快速上架。

下拉加载更多