From 4604b4a18a79775aa0ef2e9c9e97828f0550b8a7 Mon Sep 17 00:00:00 2001 From: nprimo Date: Fri, 10 Mar 2023 13:23:54 +0000 Subject: [PATCH] chore: run prettier --- introductions.md | 130 +++++++++++++++++------------------------------ 1 file changed, 46 insertions(+), 84 deletions(-) diff --git a/introductions.md b/introductions.md index cc2254e..76cdaf6 100644 --- a/introductions.md +++ b/introductions.md @@ -1,17 +1,18 @@ ### Transactions Quest -*Sometimes science is more art than science. - Rick Sanchez* +_Sometimes science is more art than science. - Rick Sanchez_ -Welcome and congratulations for choosing to learn blockchains and cryptocurrencies. +Welcome and congratulations for choosing to learn blockchains and cryptocurrencies. Today we get a first experience in the most core element, transactions. We will use the actual Bitcoin software to create transactions and send them. We will learn to interact with command lines, APIs and wallets to move cryptocurrencies around. Most open blockchains offer three categories of networks: + - The main network `mainnet` on which value is transacted - One or several `testnet`, that work more or less similarly to the mainnet with no value -- Local networks, to test locally with a node. It is called `regtest` on Bitcoin. +- Local networks, to test locally with a node. It is called `regtest` on Bitcoin. -*🚨 Caution 🚨* +_🚨 Caution 🚨_ You should not use any crypto with value for any exercise of the module. If you already own crypto, we recommend that you use a new separate wallet to avoid any loss of funds. We will never use the main network of any blockchain `mainnet`. #### Mandatory @@ -26,14 +27,9 @@ You should not use any crypto with value for any exercise of the module. If you 6. [retrieveTransactionInOut](retrieveTransactionInOut/README.md) _get inputs and outputs from a transaction_ - - - - - ### Crypto Quest -*When in doubt, use brute force. - Ken Thompson* +_When in doubt, use brute force. - Ken Thompson_ Today , we will learn the fundamentals of cryptography that underlies all blockchain projects. We will practice binary variables, hash functions and digital signatures. By the end of the quest, you should be able to create a basic wallet to generate keys, store them and sign transaction. @@ -68,13 +64,9 @@ Launch tests with node test.mjs ``` - - - - ### Festival Smart Contract Quest -*We didn't take the Bastille to make an opera out of it! - Pierre Desproges* +_We didn't take the Bastille to make an opera out of it! - Pierre Desproges_ Today we will build our first Smart Contracts. Smart Contracts are programs deployed on a blockchain network to provide additional functionalities. In the context of this quest, we will focus on Ethereum Smart Contracts. There main development language is Solidity. @@ -104,52 +96,45 @@ In this Quest, tests can be run with: npm i npx hardhat test ``` -Individual tests can be run with + +Individual tests can be run with + ```bash npx hardhat test tests/.test.js ``` - - - - ### Anchoring -A simple use of blockchains is to anchor documents. We will hash documents and store them in a blockchain. +A simple use of blockchains is to anchor documents. We will hash documents and store them in a blockchain. For this, we will use a local test node and interact with it using JavaScript #### Mandatory + 1. [localNode](localNode.md) 2. [getAccount](getAccount.md) 3. [sendEther](sendEther.md) 4. [sendHash](sendHash.md) 5. [checkDocument](checkDocument.md) -7. [register](register.md) - - -Keep for later -8. [registerWithEvents](registerWithEvents.md) +6. [register](register.md) +Keep for later 8. [registerWithEvents](registerWithEvents.md) #### Integration + In this Quest, tests can be run with + ```sh -npm i +npm i npx hardhat node& npx mocha sendHash.test.js ``` - - - - - ### Connect Interface -*Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem. - David Wheeler* +_Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem. - David Wheeler_ -Today we will learn how to create basic interfaces. All those exercises consist in a single HTML page with Javascript. You will need an Ethereum JavaScript Library, ethers.js and web3.js should be suitable. +Today we will learn how to create basic interfaces. All those exercises consist in a single HTML page with Javascript. You will need an Ethereum JavaScript Library, ethers.js and web3.js should be suitable. #### Mandatory @@ -160,64 +145,55 @@ Today we will learn how to create basic interfaces. All those exercises consist 5. [Tip](tip/README.md) #### Optional -6. [Read a Secret](readSecret/README.md) +6. [Read a Secret](readSecret/README.md) #### Integration In this Quest, tests can be run with + ```sh -npm i +npm i npx hardhat node npx mocha .test.js ``` - - - - - ### Simple Tokens -*Listen, I'm not the nicest guy in the universe because I'm the smartest. And being nice is something stupid people do to hedge their bets. - Rick Sanchez* +_Listen, I'm not the nicest guy in the universe because I'm the smartest. And being nice is something stupid people do to hedge their bets. - Rick Sanchez_ -On of the key factors of blockchain success over the past years has been the creation of standards. Those token standards allow interoperability and composability of smart contracts. +On of the key factors of blockchain success over the past years has been the creation of standards. Those token standards allow interoperability and composability of smart contracts. -Today, We will start by creating a Minimal Token that provides the basic functionalities of a token. From this, we will build basic services using this token. This will allow us to learn more advanced functionalities of Smart Contracts. +Today, We will start by creating a Minimal Token that provides the basic functionalities of a token. From this, we will build basic services using this token. This will allow us to learn more advanced functionalities of Smart Contracts. #### Mandatory + 1. [Minimal Token](minimalToken/README.md) 2. [Token Sale](tokenSale/README.md) 3. [Usable token](usableToken/README.md) 4. [Basic Swap](basicSwap/README.md) + #### Optional + 5. [Eventful token](eventfulToken/README.md) 6. [Transfers History](transfersHistory/README.md) - #### Integration + In this Quest, tests can be run with + ```sh -npm i +npm i npx hardhat test tests/.test.js ``` - - - - - - - - ### Non Fungible Cats -Today's quest objective is to master Non Fungible Tokens, NFTs. - -To represent a simple token, we used a smart contract with with each blockchain address amount of tokens. We talk about fungible token because each token has the same value. A Non-Fungible Token is a token with a unique identifier, usually part of a collection. NFTs are used to represent playing cards, works of art, financial securities and even physical objects. +Today's quest objective is to master Non Fungible Tokens, NFTs. +To represent a simple token, we used a smart contract with with each blockchain address amount of tokens. We talk about fungible token because each token has the same value. A Non-Fungible Token is a token with a unique identifier, usually part of a collection. NFTs are used to represent playing cards, works of art, financial securities and even physical objects. -Internally fungible token that we have seen in the prior quest are represented with a mapping from addresses to an amount: +Internally fungible token that we have seen in the prior quest are represented with a mapping from addresses to an amount: Address ---> Amount 0x2FE34 20 @@ -227,7 +203,7 @@ Non-Fungible Tokens are represented with a mapping of unique identifiers to an o Identifier ---> Address 123455 0x2FE34 -In addition, each token is linked to an Uniform Resource Identifier (URI) where additional information about the NFT can be found, such as metadata, an image... +In addition, each token is linked to an Uniform Resource Identifier (URI) where additional information about the NFT can be found, such as metadata, an image... Identifier ---> Address 123455 0x2FE34 @@ -235,59 +211,45 @@ In addition, each token is linked to an Uniform Resource Identifier (URI) where bafkreiajlq3 #### Mandatory + 1. [Napping cats ](nappingCats/README.md) 2. [Showcase](showcase/README.md) -#### Optional -3. [Automated reveal](automatedReveal/README.md) - - - - - - - +#### Optional +3. [Automated reveal](automatedReveal/README.md) ### Decentralized Finance +_I accidentally killed it - devops199_ -*I accidentally killed it - devops199* - -It is time for us to advance beyond basic contracts for integrate with actual DeFi smart contract. For this we will need to use current standards and implementations. +It is time for us to advance beyond basic contracts for integrate with actual DeFi smart contract. For this we will need to use current standards and implementations. -First, we will create a simple stablecoin, following the ERC20 standard and an oracle. We will then create a decentralised exchange that will allow us to exchange our stablecoin. Finally, we will create the tests for this project. +First, we will create a simple stablecoin, following the ERC20 standard and an oracle. We will then create a decentralised exchange that will allow us to exchange our stablecoin. Finally, we will create the tests for this project. #### Content + 1. [stablecoin](stablecoin/README.md) 2. [Lending Platform](lendingPlatform/README.md) 3. [Test and coverage](testsAndCoverage/README.md) #### Integration --> Audited - - - - - - - +-> Audited #### Exploring blockchains. -*If you don't believe it or don't get it, I don't have the time to try to convince you, sorry. — Satoshi Nakamoto* - +_If you don't believe it or don't get it, I don't have the time to try to convince you, sorry. — Satoshi Nakamoto_ While we have focused on fundamentals and the two main public blockchains, other alternatives and projects have been build over the years. I can only recommend you to try and test various alternatives. Most reuse the same principles that we have seen in the previous quests. In this course, we will focus on two solutions provided by the Hyperledger project. The Hyperledger project is an umbrella that regroup vastly different technical solution. The solutions we will explore are both lego sets that allow you to create varied projects #### Content + 2. [Private network](privateNetwork/README.md) 1. [Command line wallet](clillet/README.md) #### Integration --> Audited - +-> Audited