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写作工具学术助手办公助手营销助手AI助手
Trae

Trae

字节跳动发布的AI编程神器IDE

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

AI工具TraeAI IDE协作生产力转型热门
问小白

问小白

全能AI智能助手,随时解答生活与工作的多样问题

问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。

热门AI助手AI对话AI工具聊天机器人
Transly

Transly

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

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

讯飞智文

讯飞智文

一键生成PPT和Word,让学习生活更轻松

讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。

AI办公办公工具AI工具讯飞智文AI在线生成PPTAI撰写助手多语种文档生成AI自动配图热门
讯飞星火

讯飞星火

深度推理能力全新升级,全面对标OpenAI o1

科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。

热门AI开发模型训练AI工具讯飞星火大模型智能问答内容创作多语种支持智慧生活
Spark-TTS

Spark-TTS

一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型

Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。

咔片PPT

咔片PPT

AI助力,做PPT更简单!

咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。

讯飞绘文

讯飞绘文

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

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

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

材料星

专业的AI公文写作平台,公文写作神器

AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。

下拉加载更多