├── .logs ├── .cwd.log ├── .temp.log ├── .history_cwd.log ├── .next_command.log ├── .terminal-out.log └── .bash_history.log ├── learn-basic-rust-by-building-a-cli-wallet └── README.md ├── learn-digital-ledgers-by-building-a-blockchain └── .gitkeep ├── learn-intermediate-rust-by-building-a-blockchain └── README.md ├── learn-smart-contracts-by-building-a-dumb-contract └── README.md ├── learn-websockets-by-building-a-blockchain-explorer └── README.md ├── .prettierignore ├── learn-proof-of-stake-consensus-by-completing-a-web3-game ├── client │ ├── README.md │ ├── .babelrc │ ├── src │ │ ├── tutorial │ │ │ ├── index.js │ │ │ └── state.js │ │ ├── components │ │ │ ├── ground.js │ │ │ ├── navigation.js │ │ │ ├── ceiling.js │ │ │ ├── screen-nav.js │ │ │ ├── monitor.js │ │ │ ├── light-bulb.js │ │ │ ├── chain.css │ │ │ ├── server.css │ │ │ ├── light-bulb.css │ │ │ ├── chain.js │ │ │ ├── server.js │ │ │ ├── monitor.css │ │ │ ├── camperbot.js │ │ │ ├── screen.js │ │ │ ├── camperbot.css │ │ │ └── main-view.js │ │ ├── setupTests.js │ │ ├── tools │ │ │ ├── glow.js │ │ │ ├── utils.js │ │ │ ├── socket.js │ │ │ ├── handle-tasks.js │ │ │ └── draggable.js │ │ ├── node-state.js │ │ ├── index.js │ │ └── index.css │ ├── public │ │ ├── robots.txt │ │ ├── favicon-32x32.png │ │ ├── chain.json │ │ ├── index.html │ │ ├── prism.css │ │ ├── bubbles.json │ │ └── quiz.json │ └── package.json ├── .gitpod.yml ├── .gitignore ├── node │ ├── package.json │ ├── state.js │ ├── handle-client.js │ ├── events │ │ ├── index.js │ │ ├── utils.js │ │ ├── client-events.js │ │ └── node-events.js │ ├── index.js │ ├── handle-node.js │ └── node_trace.1.log ├── blockchain │ ├── src │ │ ├── block.rs │ │ └── lib.rs │ ├── Cargo.toml │ └── tests │ │ └── handle_mine.rs ├── utils │ ├── logger.js │ ├── perf-metrics.js │ ├── parser │ │ └── index.js │ └── websockets │ │ └── index.js ├── package.json ├── assets │ ├── quiz.json │ └── quiz.md └── README.md ├── bash ├── sourcerer.sh └── .bashrc ├── config ├── state.json └── projects.json ├── learn-proof-of-work-consensus-by-building-a-block-mining-algorithm ├── transactions.json ├── validate-chain.js ├── init-blockchain.js ├── add-transaction.js ├── add-block.js ├── blockchain-helpers.js └── blockchain.json ├── curriculum └── locales │ └── english │ ├── learn-rpc-and-idls-by-building-a-dapp.md │ ├── learn-websockets-by-building-a-chat-app.md │ ├── learn-basic-rust-by-building-a-cli-wallet.md │ ├── learn-nfts-by-building-a-set-of-concert-tickets.md │ ├── learn-smart-contracts-by-building-a-car-loan-contract.md │ ├── learn-proof-of-stake-consensus-by-completing-a-web3-game.md │ ├── learn-smart-contracts-by-building-a-dumb-contract-in-rust.md │ ├── learn-distributed-networks-by-building-a-distributed-chat-app.md │ ├── learn-intermediate-rust-by-building-a-blockchain.md │ ├── build-a-smart-contract-in-rust.md │ └── build-a-peer-to-peer-network.md ├── .gitignore ├── .prettierrc ├── learn-digital-signatures-by-building-a-wallet ├── validate-chain.js ├── get-address-balance.js ├── init-blockchain.js ├── transactions.json ├── add-transaction.js ├── mine-block.js ├── blockchain.json └── blockchain-helpers.js ├── .github └── ISSUE_TEMPLATE │ ├── HELP.md │ └── BUG.md ├── .editorconfig ├── .gitpod.Dockerfile ├── .devcontainer.json ├── tooling ├── rejig.js ├── camper-info.js └── helpers.js ├── .gitpod.yml ├── package.json ├── Dockerfile ├── LICENSE ├── freecodecamp.conf.json ├── .vscode └── settings.json └── README.md /.logs/.cwd.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.logs/.temp.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.logs/.history_cwd.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.logs/.next_command.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.logs/.terminal-out.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.logs/.bash_history.log: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /learn-basic-rust-by-building-a-cli-wallet/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /learn-digital-ledgers-by-building-a-blockchain/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /learn-intermediate-rust-by-building-a-blockchain/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /learn-smart-contracts-by-building-a-dumb-contract/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /learn-websockets-by-building-a-blockchain-explorer/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/.cache 2 | **/package-lock.json 3 | **/pkg 4 | -------------------------------------------------------------------------------- /learn-proof-of-stake-consensus-by-completing-a-web3-game/client/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /learn-proof-of-stake-consensus-by-completing-a-web3-game/client/.babelrc: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /bash/sourcerer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ./bash/.bashrc 3 | echo "BashRC Sourced" 4 | -------------------------------------------------------------------------------- /config/state.json: -------------------------------------------------------------------------------- 1 | { 2 | "currentProject": null, 3 | "locale": "english" 4 | } 5 | -------------------------------------------------------------------------------- /learn-proof-of-stake-consensus-by-completing-a-web3-game/client/src/tutorial/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /learn-proof-of-work-consensus-by-building-a-block-mining-algorithm/transactions.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /curriculum/locales/english/learn-rpc-and-idls-by-building-a-dapp.md: -------------------------------------------------------------------------------- 1 | # Web3 - Placeholder 2 | 3 | ## 1 4 | -------------------------------------------------------------------------------- /curriculum/locales/english/learn-websockets-by-building-a-chat-app.md: -------------------------------------------------------------------------------- 1 | # Web3 - Placeholder 2 | 3 | ## 1 4 | -------------------------------------------------------------------------------- /curriculum/locales/english/learn-basic-rust-by-building-a-cli-wallet.md: -------------------------------------------------------------------------------- 1 | # Web3 - Placeholder 2 | 3 | ## 1 4 | -------------------------------------------------------------------------------- /curriculum/locales/english/learn-nfts-by-building-a-set-of-concert-tickets.md: -------------------------------------------------------------------------------- 1 | # Web3 - Placeholder 2 | 3 | ## 1 4 | -------------------------------------------------------------------------------- /curriculum/locales/english/learn-smart-contracts-by-building-a-car-loan-contract.md: -------------------------------------------------------------------------------- 1 | # Web3 - Placeholder 2 | 3 | ## 1 4 | -------------------------------------------------------------------------------- /curriculum/locales/english/learn-proof-of-stake-consensus-by-completing-a-web3-game.md: -------------------------------------------------------------------------------- 1 | # Web3 - Placeholder 2 | 3 | ## 1 4 | -------------------------------------------------------------------------------- /curriculum/locales/english/learn-smart-contracts-by-building-a-dumb-contract-in-rust.md: -------------------------------------------------------------------------------- 1 | # Web3 - Placeholder 2 | 3 | ## 1 4 | -------------------------------------------------------------------------------- /curriculum/locales/english/learn-distributed-networks-by-building-a-distributed-chat-app.md: -------------------------------------------------------------------------------- 1 | # Web3 - Placeholder 2 | 3 | ## 1 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | node_modules 3 | Cargo.lock 4 | build-a-web3-client-side-package-for-your-dapp/fixture/data/tmp/**/* 5 | !.gitkeep 6 | -------------------------------------------------------------------------------- /learn-proof-of-stake-consensus-by-completing-a-web3-game/client/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /learn-proof-of-stake-consensus-by-completing-a-web3-game/client/src/components/ground.js: -------------------------------------------------------------------------------- 1 | const Ground = () => { 2 | return
; 3 | }; 4 | 5 | export default Ground; 6 | -------------------------------------------------------------------------------- /learn-proof-of-stake-consensus-by-completing-a-web3-game/client/src/components/navigation.js: -------------------------------------------------------------------------------- 1 | const Navigation = () => { 2 | return ; 3 | }; 4 | 5 | export default Navigation; 6 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "endOfLine": "lf", 3 | "semi": true, 4 | "singleQuote": true, 5 | "jsxSingleQuote": true, 6 | "tabWidth": 2, 7 | "trailingComma": "none", 8 | "arrowParens": "avoid" 9 | } 10 | -------------------------------------------------------------------------------- /learn-proof-of-stake-consensus-by-completing-a-web3-game/client/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freeCodeCamp/web3-curriculum/HEAD/learn-proof-of-stake-consensus-by-completing-a-web3-game/client/public/favicon-32x32.png -------------------------------------------------------------------------------- /learn-digital-signatures-by-building-a-wallet/validate-chain.js: -------------------------------------------------------------------------------- 1 | import { isValidChain } from './blockchain-helpers.js'; 2 | 3 | if (isValidChain()) { 4 | console.log('Chain is valid'); 5 | } else { 6 | console.log('Chain is not valid'); 7 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/HELP.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Help Needed 3 | about: Get help with a project or lesson 4 | title: '[HELP]: ' 5 | --- 6 | 7 | ### Project 8 | 9 | ### Lesson Number 10 | 11 | ### Question 12 | 13 | ### Code and Screenshots 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/BUG.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Found 3 | about: Report a bug with the platform/content 4 | title: '[BUG]: ' 5 | --- 6 | 7 | ### Issue/Experience 8 | 9 | ### Output of running `node tooling/camper-info.js` from the workspace root 10 | 11 | -------------------------------------------------------------------------------- /learn-proof-of-work-consensus-by-building-a-block-mining-algorithm/validate-chain.js: -------------------------------------------------------------------------------- 1 | import { isValidChain } from './blockchain-helpers.js'; 2 | 3 | if (isValidChain()) { 4 | console.log('Chain is valid'); 5 | } else { 6 | console.log('Chain is not valid'); 7 | } -------------------------------------------------------------------------------- /learn-digital-signatures-by-building-a-wallet/get-address-balance.js: -------------------------------------------------------------------------------- 1 | import { getAddressBalance } from './blockchain-helpers.js'; 2 | 3 | const nameOfAddress = process.argv[2]; 4 | const balance = getAddressBalance(nameOfAddress); 5 | 6 | console.log(`The balance for ${nameOfAddress} is ${balance}`); -------------------------------------------------------------------------------- /learn-proof-of-work-consensus-by-building-a-block-mining-algorithm/init-blockchain.js: -------------------------------------------------------------------------------- 1 | import { writeBlockchain } from './blockchain-helpers.js'; 2 | 3 | const genesisBlock = { 4 | hash: "0", 5 | previousHash: null 6 | } 7 | 8 | const blockchain = [genesisBlock]; 9 | writeBlockchain(blockchain); -------------------------------------------------------------------------------- /learn-proof-of-stake-consensus-by-completing-a-web3-game/.gitpod.yml: -------------------------------------------------------------------------------- 1 | tasks: 2 | - init: npm install && npm run build:blockchain && npm run build:client 3 | 4 | ports: 5 | - port: 3000 6 | visibility: private 7 | onOpen: open-preview 8 | 9 | vscode: 10 | extensions: 11 | - dbaeumer.vscode-eslint 12 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [package.json] 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /learn-digital-signatures-by-building-a-wallet/init-blockchain.js: -------------------------------------------------------------------------------- 1 | import { writeBlockchain, writeTransactions } from './blockchain-helpers.js'; 2 | 3 | const genesisBlock = { 4 | hash: "0", 5 | previousHash: null 6 | } 7 | 8 | const blockchain = [genesisBlock]; 9 | writeBlockchain(blockchain); 10 | writeTransactions([]); -------------------------------------------------------------------------------- /learn-proof-of-stake-consensus-by-completing-a-web3-game/client/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /learn-digital-signatures-by-building-a-wallet/transactions.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "fromAddress": null, 4 | "toAddress": "Me", 5 | "amount": 50 6 | }, 7 | { 8 | "hash": "187116b5a916e63287cdb275a2e6cab646fde335639f820a0e4531ad444ea7b8", 9 | "fromAddress": "Me", 10 | "toAddress": "I", 11 | "amount": 5 12 | } 13 | ] -------------------------------------------------------------------------------- /learn-proof-of-stake-consensus-by-completing-a-web3-game/client/public/chain.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "metadata": {}, 4 | "transactions": [], 5 | "nonce": "", 6 | "prev_hash": null, 7 | "hash": "" 8 | }, 9 | { 10 | "metadata": {}, 11 | "transactions": [], 12 | "nonce": "", 13 | "prev_hash": "", 14 | "hash": "" 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /learn-proof-of-stake-consensus-by-completing-a-web3-game/client/src/components/ceiling.js: -------------------------------------------------------------------------------- 1 | import LightBulb from "./light-bulb"; 2 | 3 | const Ceiling = ({ isLightOn, toggleLight }) => { 4 | return ( 5 |{typewriter}
126 |