From 3b6830ec7c7e7831e58d7fc36ad9e17d9500075b Mon Sep 17 00:00:00 2001 From: hardikthecoder <85208662+hardiktheprogrammer@users.noreply.github.com> Date: Sun, 28 Jan 2024 12:28:00 +0530 Subject: [PATCH] Fix all small Typeo Issue --- src/ch00-00-introduction.md | 14 ++-- src/ch02-00-starknet-tooling.md | 12 ++-- src/ch02-06-starkli.md | 6 +- src/ch02-08-01-deployment-script.md | 4 ++ src/ch03-06-solidity-verifier.md | 10 ++- src/ch03-08-01-deploymet-and-interaction.md | 10 +++ src/ch04-02-hello-account.md | 73 +++------------------ src/ch04-03-standard-account.md | 11 ++++ src/ch04-05-06-web-wallet.md | 4 ++ 9 files changed, 64 insertions(+), 80 deletions(-) diff --git a/src/ch00-00-introduction.md b/src/ch00-00-introduction.md index 3c790df38..dff6c7e29 100644 --- a/src/ch00-00-introduction.md +++ b/src/ch00-00-introduction.md @@ -53,30 +53,30 @@ Starknet's ethos is anchored in core principles ([Eli Ben-Sasson, Bareli, Brandt These are some key features of Starknet: -- Low Costs: Transactions on Starknet cost less than on Ethereum. +- **Low Costs**: Transactions on Starknet cost less than on Ethereum. Future updates like Volition and EIP 4844 will make it even cheaper. -- Developer-Friendly: Starknet lets developers easily build +- **Developer-Friendly**: Starknet lets developers easily build decentralized apps using its native language, Cairo. -- Speed and Efficiency: Upcoming releases aim to make transactions +- **Speed and Efficiency**: Upcoming releases aim to make transactions even faster and cheaper. -- CVM: Thanks to Cairo, Starknet runs on it´s own VM, called Cairo VM +- **CVM**: Thanks to Cairo, Starknet runs on it´s own VM, called Cairo VM (CVM), that allow us to innovate beyond the Ethereum Virtual Machine (EVM) and create a new paradigm for decentralized applications. Here are some of them: -- Account Abstraction: Implemented at the protocol level, this +- **Account Abstraction**: Implemented at the protocol level, this facilitates diverse signing schemes while ensuring user security and self-custody of assets. -- Volition: Will be implemented on testnet during Q4 2023 will allow +- **Volition**: Will be implemented on testnet during Q4 2023 will allow developers to regulate data availability on Ethereum (L1) or on Starknet (L2). Reducing L1 onchain data can radically reduce costs. -- Paymaster: Starknet will allow users to choose how to pay for +- **Paymaster**: Starknet will allow users to choose how to pay for transaction fee, follows the guidelines laid out in EIP 4337 and allows the transaction to specify a specific contract, a **Paymaster**, to pay for their transaction. Supports gasless diff --git a/src/ch02-00-starknet-tooling.md b/src/ch02-00-starknet-tooling.md index fec0a7b14..5f9433417 100644 --- a/src/ch02-00-starknet-tooling.md +++ b/src/ch02-00-starknet-tooling.md @@ -35,15 +35,15 @@ enabling efficient dApp development. Here’s a quick rundown of the tools that could be used for Starknet development and that we’ll cover in this chapter: -1. Scarb: A package manager that compiles your contracts. +1. **Scarb**: A package manager that compiles your contracts. -2. Starkli: A CLI tool for interacting with the Starknet network. +2. **Starkli**: A CLI tool for interacting with the Starknet network. -3. Starknet Foundry: For contract testing. +3. **Starknet Foundry**: For contract testing. -4. Katana: Creates a local test node. +4. **Katana**: Creates a local test node. -5. SDKs: starknet.js, Starknet.py, and starknet.rs interface with +5. **SDKs**: starknet.js, Starknet.py, and starknet.rs interface with Starknet using common programming languages. -6. Starknet-react: Builds front-end apps using React. +6. **Starknet-react**: Builds front-end apps using React. diff --git a/src/ch02-06-starkli.md b/src/ch02-06-starkli.md index 255bd1506..a8552ce91 100644 --- a/src/ch02-06-starkli.md +++ b/src/ch02-06-starkli.md @@ -1,8 +1,12 @@ # Starkli: Querying Starknet -[Starkli](https://book.starkli.rs/) is a Command Line Interface (CLI) tool designed for Starknet interaction, utilizing the capabilities of [starknet-rs](https://github.com/xJonathanLEI/starknet-rs). This tool simplifies querying and executing transactions on Starknet. +[Starkli](https://book.starkli.rs/) is a Command Line Interface (CLI) tool designed for Starknet interaction, utilizing the capabilities of [starknet-rs](https://github.com/xJonathanLEI/starknet-rs). This tool simplifies querying and executing transactions on Starkn et. +<<<<<<< HEAD > **NOTE:** Before continuing with this chapter, make sure you have completed the Basic Installation subchapter of Chapter 2. This includes the installation of Starkli. +======= +> NOTE: Before continuing with this chapter, make sure you have completed the Basic Installation subchapter of Chapter 2. This includes the installation of Starkli. +>>>>>>> 97de1e8ae50ff447117faec5d147f0124d075eea In the next subchapter we will create a short Bash script using Starkli to query Starknet. It's just an example, however, creating your own Bash scripts to interact with Starknet would be very useful in practice. diff --git a/src/ch02-08-01-deployment-script.md b/src/ch02-08-01-deployment-script.md index d6c6a47dc..46c719258 100644 --- a/src/ch02-08-01-deployment-script.md +++ b/src/ch02-08-01-deployment-script.md @@ -1,6 +1,10 @@ # Deployment Script Example +<<<<<<< HEAD > **RECOMMENDED:** Before starting this chapter, make sure you have completed the Starknet Devnet subchapter. +======= +> RECOMMENDED: Before starting this chapter, make sure you have completed the Starknet Devnet subchapter. +>>>>>>> 97de1e8ae50ff447117faec5d147f0124d075eea This tutorial explains how to set up a test and deployment environment for smart contracts. The given script initializes accounts, runs tests, and carries out multicalls. diff --git a/src/ch03-06-solidity-verifier.md b/src/ch03-06-solidity-verifier.md index 815bb7236..d10fcb423 100644 --- a/src/ch03-06-solidity-verifier.md +++ b/src/ch03-06-solidity-verifier.md @@ -6,7 +6,11 @@ Starknet's Solidity Verifier plays a pivotal role in the rollup landscape, ensur ## Quick Overview: SHARP and Sharp Jobs -> NOTE: For a more detailed explanation of SHARP and Sharp Jobs, refer to the Provers subchapter in the Starknet Architecture chapter. This is a brief review. +<<<<<<< HEAD +>**NOTE**: For a more detailed explanation of SHARP and Sharp Jobs, refer to the Provers subchapter in the Starknet Architecture chapter. This is a brief review. +======= +NOTE: For a more detailed explanation of SHARP and Sharp Jobs, refer to the Provers subchapter in the Starknet Architecture chapter. This is a brief review. +>>>>>>> 97de1e8ae50ff447117faec5d147f0124d075eea SHARP, or Shared Prover, in Starknet, aggregates various Cairo programs from distinct users. These programs, each with unique logic, run together, producing a common proof for all, optimizing cost and efficiency. @@ -99,7 +103,11 @@ Below is a visual representation of these parameters in relation to key contract - **Verification:** It integrates with `MerkleStatementContract` for merkle verification and `FriStatementContract` for Fri-related tasks. - **Security:** The `num_security_bits` and `min_proof_of_work_bits` contracts ensure secure operation. +<<<<<<< HEAD > **NOTE:** For instances like `CpuFrilessVerifier0`, specific contracts (e.g., `CpuConstraintPoly0`, `PoseidonPoseidonFullRoundKeyColumn0`, `CpuOods0`) become particularly relevant. +======= +**NOTE:** For instances like `CpuFrilessVerifier0`, specific contracts (e.g., `CpuConstraintPoly0`, `PoseidonPoseidonFullRoundKeyColumn0`, `CpuOods0`) become particularly relevant. +>>>>>>> 97de1e8ae50ff447117faec5d147f0124d075eea #### GpsStatementVerifier Constructor Parameters diff --git a/src/ch03-08-01-deploymet-and-interaction.md b/src/ch03-08-01-deploymet-and-interaction.md index 4e1ad7965..ceb44e491 100644 --- a/src/ch03-08-01-deploymet-and-interaction.md +++ b/src/ch03-08-01-deploymet-and-interaction.md @@ -6,6 +6,7 @@ In this section we will be focussing on declaring, deploying and interacting wit To declare and deploy the piggy bank contract, it’s required that you have the following available; don't worry, we’ll point you to resources or links to get them sorted out. +<<<<<<< HEAD 1. **Starkli**: Starkli is a CLI tool that connects us to the Starknet blockchain. Installation steps can be found [here](ch02-02-starkli-scarb-katana.md). 2. **Starknet testnet RPC**: You need your personalized gateway to access the starknet network. Starkli utilizes this API gateway to communicate with the starknet network: you can get one from Infura [here](https://app.infura.io). @@ -13,6 +14,15 @@ To declare and deploy the piggy bank contract, it’s required that you have the 3. **Deployer Account**: To interact with the starknet network via Starkli, you need a cli account/ wallet. You can easily set that up by going through [this page](ch04-03-deploy-hello-account.md). 4. **Sufficient gas fees to cover the declaration and deployment steps**: you can get starknet Goerli Eth either by bridging your Goerli Eth on Ethereum to Starknet [here](https://goerli.starkgate.starknet.io/), or by using the starknet faucet to get goerli Eth [here](https://faucet.goerli.starknet.io/). +======= +1. **Starkli**: Starkli is a CLI tool that connects us to the Starknet blockchain. Installation steps can be found [here](ch02-02-starkli-scarb-katana.md). + +2. **Starknet testnet RPC**: You need your personalized gateway to access the starknet network. Starkli utilizes this API gateway to communicate with the starknet network: you can get one from Infura [here](https://app.infura.io). + +3. **Deployer Account**: To interact with the starknet network via Starkli, you need a cli account/ wallet. You can easily set that up by going through [this page](ch04-03-deploy-hello-account.md). + +4. Sufficient gas fees to cover the declaration and deployment steps: you can get starknet Goerli Eth either by bridging your Goerli Eth on Ethereum to Starknet [here](https://goerli.starkgate.starknet.io/), or by using the starknet faucet to get goerli Eth [here](https://faucet.goerli.starknet.io/). +>>>>>>> 97de1e8ae50ff447117faec5d147f0124d075eea Once you’ve been able to sort all that out, let's proceed with declaring and deploying the piggy bank contract. diff --git a/src/ch04-02-hello-account.md b/src/ch04-02-hello-account.md index 39cecad24..07b980975 100644 --- a/src/ch04-02-hello-account.md +++ b/src/ch04-02-hello-account.md @@ -1,71 +1,14 @@ -# Hello World! Account Contract +# Hello World Account Contract -<<<<<<< HEAD -> **NOTE:** THIS CHAPTER NEEDS TO BE UPDATED TO REFLECT THE NEW SYNTAX FOR ACCOUNT CONTRACTS. PLEASE DO NOT USE THIS CHAPTER AS A REFERENCE UNTIL THIS NOTE IS REMOVED. +> **NOTE:** +THIS CHAPTER NEEDS TO BE UPDATED TO REFLECT THE NEW SYNTAX FOR ACCOUNT CONTRACTS. PLEASE DO NOT USE THIS CHAPTER AS A REFERENCE UNTIL THIS NOTE IS REMOVED. -> **CONTRIBUTE**: This subchapter is missing an example of declaration, deployment and interaction with the contract. We would love to see your contribution! Please submit a PR. -======= -This section guides you through the creation of the simplest possible account contract, adhering to the SNIP-6 standard. The account contract will be the simplest implementation of an account contract, with the following features: +**CONTRIBUTE: This subchapter is missing an example of declaration, deployment and interaction with the contract. We would love to see your contribution! Please submit a PR.** -- Signature validation for transactions will be not enforced. In other words, every transaction will be considered valid no matter who signed it; there will be no pivate key. -- It will make a single call and not multicall in the execution phase. -- It will only implement the SNIP-6 standard which is the minimum to be considered an account contract. - - -We will deployed using `starknet.py` and use it to deploy other contracts. - -## Setting Up Your Project - -For deploying an account contract to Starknet's testnet or mainnet, use Scarb version 2.3.1, which is compatible with the Sierra 1.3.0 target supported by both networks. For the latest information, review the [Starknet Release Notes](https://docs.starknet.io/documentation/starknet_versions/version_notes/). As of November 2023, Scarb version 2.3.1 is the recommended choice. - -To check your current Scarb version, run: - -```bash -scarb --version -``` - -To install or update Scarb, refer to the Basic Installation instructions in Chapter 2, covering macOS and Linux environments: - -```bash -curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -``` - -## Starting a New Scarb Project - -Begin by creating a new project (more details in the Scarb subchapter in Chapter 2): - -```bash -scarb new hello_account -``` - -Check the generated project structure: - -```bash -$ tree . -. -└── hello_account - ├── Scarb.toml - └── src - └── lib.cairo -``` - -By default, Scarb sets up for vanilla Cairo. Add Starknet capacities by editing `Scarb.toml` to include the `starknet` dependency: - -```bash -[package] -name = "hello_account" -version = "0.1.0" - -[dependencies] -starknet = ">=2.3.0" - -[[target.starknet-contract]] -sierra = true -casm = true -casm-add-pythonic-hints = true -``` - -Replace the code in `src/lib.cairo` with the Hello World account contract: +In this chapter, we will explore the fundamentals of account contracts +in Starknet using an example "Hello World" account contract written in +Cairo language. You can find it in the contracts directory of this +chapter in the Book’s repository (TODO: add link). ```rust use starknet::account::Call; diff --git a/src/ch04-03-standard-account.md b/src/ch04-03-standard-account.md index ba3c4b92b..973b51455 100644 --- a/src/ch04-03-standard-account.md +++ b/src/ch04-03-standard-account.md @@ -1,5 +1,6 @@ # Standard Account Contract +<<<<<<< HEAD >**NOTE:** >THIS CHAPTER NEEDS TO BE UPDATED TO REFLECT THE NEW SYNTAX FOR ACCOUNT CONTRACTS. PLEASE DO NOT USE THIS CHAPTER AS A REFERENCE UNTIL THIS NOTE IS REMOVED. @@ -14,6 +15,16 @@ For deploying an account contract to Starknet's testnet or mainnet, use Scarb ve To check your current Scarb version, run: +======= +This section guides you through the creation of a standard account contract, adhering to the SNIP-6 and SRC-5 standards. Previously, we created a simple account contract that lacked signature validation and multicall execution. This time, we'll implement a more robust account contract that includes these features and adheres to the standards of an account contract. + +## Setting Up Your Project + +For deploying an account contract to Starknet's testnet or mainnet, use Scarb version 2.3.1, which is compatible with the Sierra 1.3.0 target supported by both networks. For the latest information, review the [Starknet Release Notes](https://docs.starknet.io/documentation/starknet_versions/version_notes/). As of November 2023, Scarb version 2.3.1 is the recommended choice. + +To check your current Scarb version, run: + +>>>>>>> 97de1e8ae50ff447117faec5d147f0124d075eea ```bash scarb --version ``` diff --git a/src/ch04-05-06-web-wallet.md b/src/ch04-05-06-web-wallet.md index 0f039de32..f98298600 100644 --- a/src/ch04-05-06-web-wallet.md +++ b/src/ch04-05-06-web-wallet.md @@ -42,7 +42,11 @@ const connectWallet = async () => { }; ``` +<<<<<<< HEAD > **NOTE**: Web Wallet is currently available only on the mainnet. For testnet access, contact the Argent team. +======= +> NOTE: Web Wallet is currently available only on the mainnet. For testnet access, contact the Argent team. +>>>>>>> 97de1e8ae50ff447117faec5d147f0124d075eea ## Transaction Signing Process