Giter VIP home page Giter VIP logo

starknetbook's Introduction

The Starknet Book

All Contributors

⚠️ ARCHIVE NOTICE: This project has been archived and is no longer maintained. The Starknet book's content has been integrated into various documentation sources, including Starknet’s official documentation. Thank you to all contributors. For continued updates and contributions, please refer to starknet-docs.

This repository contains the source for The Starknet Book.

Contribution

The repository is no longer accepting updates as the content has moved to starknet-docs. We encourage users to refer to and contribute to the official documentation.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Omar U. Espejel
Omar U. Espejel

💻 📖
JameStark
JameStark

💻 📖
GianMarco
GianMarco

💻 📖
drspacemn
drspacemn

💻 📖
Gyan
Gyan

📖
Steve Goodman
Steve Goodman

📖
David Barreto
David Barreto

📖
omahs
omahs

📖
Henri
Henri

📖
devnet0x
devnet0x

📖
cryptonerdcn
cryptonerdcn

📖
Raz Landau
Raz Landau

📖
Nadai
Nadai

📖
Cyndie Kamau
Cyndie Kamau

📖
Manmit Singh
Manmit Singh

📖
Shebin John
Shebin John

📖
Dalmas Nyaboga Ogembo
Dalmas Nyaboga Ogembo

📖
Adegbite Ademola Kelvin
Adegbite Ademola Kelvin

📖
Robert
Robert

📖
lorcan-codes
lorcan-codes

📖
Olivier Boulant
Olivier Boulant

📖
Lucas @ StarkWare
Lucas @ StarkWare

📖
Okoli Evans
Okoli Evans

📖
Esther Aladi Oche
Esther Aladi Oche

📖 💻
faytey
faytey

📖
ccolorado
ccolorado

📖
Akinbola Kehinde
Akinbola Kehinde

📖
Louis Wang
Louis Wang

📖
Daniel Bejarano
Daniel Bejarano

📖
Damián Piñones
Damián Piñones

📖
Davide Silva
Davide Silva

📖
Asten
Asten

📖
Darlington Nnam
Darlington Nnam

📖
Idogwu Emmanuel Chinonso
Idogwu Emmanuel Chinonso

📖
machuwey
machuwey

💻 📖

This project follows the all-contributors specification.

starknetbook's People

Contributors

0xasten avatar 0xlucqs avatar avimak avatar barretodavid avatar codewhizperer avatar cryptonerdcn avatar cyndiekamau avatar dalmasonto avatar devnet0x avatar drspacemn avatar estheroche avatar faytey avatar gianalarcon avatar gyan0890 avatar jamestark avatar l-henri avatar landauraz avatar lorcan-codes avatar machuwey avatar nadai2010 avatar nonnyjoe avatar oboulant avatar okolievans avatar omahs avatar omarespejel avatar qd-qd avatar remedcu avatar robertkodra avatar stoobie avatar supremesingh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

starknetbook's Issues

Update Testnet Deployment section

Summary

Please answer in the comments if you are interested.

Rewarded Contributions: In collaboration with Only Dust, we offer incentives for contributors.


Detailed Objectives

We are seeking contributions to update the content tutorial, images, and code of the following section
https://book.starknet.io/ch02-05-testnet-deployment.html

  • Make this section compatible with Starknet scarb v2.4.3 and starkli v0.2.3.
  • Verify that all input commands are functioning correctly; for instance, include the necessary rpc-url providers where required.
    • Make this example compatible with Sepolia.

How to Contribute:

  • Fork the Starknet Book repository.
  • Add the tutorial and make any necessary edits.
  • Create a Pull Request, describing your changes and linking to this issue.

Contact

For questions, reach out to @gianmalarcon

Proposed new structure and topics

This issue is for proposing the next topics and structure for basecamp. Here is the original structure (feel free to add comments on proposed changes):

  1. Primer
    1. Bitcoin
    2. Smart Contracts
    3. Ethereum
    4. Rollups
  2. Camp 1: Getting Started
    1. Setting up your environment
    2. Writing Cairo
    3. StarkNet Contracts
    4. Storage
  3. Camp 2: BUIDL and Tooling
    1. Protostar
    2. Nile
    3. Hardhat
    4. Nodes
    5. Devnet
    6. Testing
    7. Libraries
  4. Camp 3: StarkNet
    1. Blocks
    2. The Lifecycle of Transactions
    3. StarkNet OS
    4. State Transition/Fees
    5. Account Contracts
    6. Account Abstraction
    7. L1-L2 Messaging
  5. Camp 4: Peering into the future
    1. Data Availability
    2. Recursion
    3. Throughput
    4. Decentralization
    5. Building Community
  6. Camp 5: Cairo
    1. CLI
    2. C(pu)AIR(o)
    3. Computational Integrity
    4. Syntax
    5. Cairo VM
  7. Camp 6: STARKs
    2. Modular Arithmetic
    3. Finite Field Arithmetic
    4. Polynomials
    5. Computational Integrity
    6. ZK Basics
    7. STARKs

Request for Contribution: Chapter on Account Abstraction - Web Wallet

Please answer in the comments if you are interested.

Incentivized Contributions: Via Only Dust, we offer incentives for contributors.


We are seeking contributions to add a detailed example of how to use Web Wallet in JavaScript to Section 4.5 of Chapter 4 of the Starknet Book.

Details

Objectives

  • Develop an application akin to Sorare, detailing the creation process using StarnetJS.
  • The app must enable user registration and login, offering an experience similar to Sorare's, integrating blockchain technology without explicit mention.
  • Avoid using terms like 'crypto', 'blockchain', or 'starknet' throughout the app to maintain a non-crypto user interface.

Instructions for Contributing

  • Leave a comment on this Issue.
  • Wait for our confirmation to start on the project.
  • Once you have received confirmation, begin working on your contribution.
  • The source code must be added within the repository for Chapter 4.5 of the Starknet Book.

Remuneration

  • We have assigned a grant of 400 USD from OnlyDust to reward this project.

Contact

For questions, reach out to @espejelomar.

Contributors for Chapter 8: Starknet Architecture

📢 Hey there, Starknet devs!

We're looking for community contributors to help us create the content for Chapter 8: Starknet Architecture in the Starknetbook. This chapter will take you on a journey through the complex world of Starknet's architecture, touching on everything from the fundamentals of blocks and transactions to advanced topics like L1-L2 messaging and bridges.

The proposed structure of Chapter 8 is as follows, but if you believe more content should be included, existing content needs to be revised, or have suggestions for different content, feel free to let us know:

  • 8.2 The Lifecycle of Transactions @Darlington02
  • 8.3 Starknet OS
  • 8.4 State Transition/Fees
  • 8.5 L1-L2 Messaging @Darlington02
  • 8.7 Provers
  • 8.8 Verifiers in Solidity - @trangnv
  • 8.9 Verifiers in Cairo
  • 8.10 Hints
  • 8.11 Fee calculation and paying for fees
  • 8.12 Bridges

To streamline the process of tracking who is working on each section and prevent duplication of efforts, please feel free to comment on this issue with the section number(s) you'd like to contribute to**. We'll then update the issue description to show the current assignments.

For any questions, ideas, or further discussion, don't hesitate to contact @espejelomar on Telegram or Twitter. Remember, this is a collaborative effort, and we're thrilled to have you on board!

We're truly grateful for your commitment and contributions! Your expertise and enthusiasm are the driving forces behind the exceptional Starknet community. We're eager to witness the amazing content you'll produce!

Request for Contributions: Chapter on Architecture - Sequencers

Summary

Please answer in the comments if you are interested.

Incentivized Contributions: In collaboration with Only Dust, we offer incentives for contributors.


We are looking for contributions to the section 3.3.1 on Sequencers in Chapter 3 of the Starknet Book

Detailed Objectives

We are seeking contributions that showcase basic and intermediate examples of using Madara for Section 3.2 of Chapter 3 in the Starknet Book. Please comment on this thread with your proposed adaptation. It can be based on an existing application; the key is to provide a clear breakdown of the executed operations.

How to Contribute:

  • Fork the Starknet Book repository.
  • Add the tutorial and make any necessary edits.
  • Create a Pull Request, describing your changes and linking to this issue.

Contact

For questions, reach out to @espejelomar.

Request for Contributions: Starknet Devnet

Summary

Please answer in the comments if you are interested.

Sponsored by Only Dust with a reward of 100 USD


We are seeking contributions to update Chapter 2.6 "Starknet Devnet" by detailing the process of interaction with tools like Starkli and Foundry Cast when using Starknet's Devnet in Rust.

Detailed Objectives

  1. Provide clear steps and guidelines on how these tools integrate with Starknet's Devnet in the Rust environment.
  2. Illustrate with an example: Perhaps consider leveraging a Smart contract from Chapter 2.7 "Javascript SDK". Show how this contract can be used in tandem with Starknet's Devnet.
  3. Offer actionable interaction tips to ensure users can easily replicate the process.

How to Contribute:

  • Fork the Starknet Book repository.
  • Add the tutorial and make any necessary edits.
  • Create a Pull Request, describing your changes and linking to this issue.

Contact

For questions, reach out to @espejelomar.

Update Lesson Proposal: Starknet React ERC20-UI Tutorial

I noticed that the example guides/demo for Starknet React are outdated, and since I have contributed a bit to the starknet-react I would like to update the tutorials starting with ERC20-UI.

Potential Areas of Affected Changes

  • Example Beginner ERC-20 UI
    • Scrab version upgrade - 2.3.1
    • OpenZeppelin Library version upgrade - 0.8.0
    • Starknet React version upgrade - 2.0
    • NodeJS version upgrade - 20.9.0
    • NextJS version upgrade - 14.0.2

Can someone kindly assign this issue to me, as I have already started working on it on my fork.

cc: @omarespejel

Chapter 2.2 is outdated: Cairo compiler now supports type inference

Currently it says:

In Cairo, every variable or function argument must be explicitly typed. This helps the compiler identify and prevent type-related issues at compile-time, increasing code safety and robustness. Moreover, it also improves code readability by making the types of values and the purpose of the code more apparent.

But now cairo's compiler support type inference, explicit type annotations are only required when type is ambiguous and compiler cannot infer it.

I would be happy to open a PR fixing this if its helpful.

Request for Contributions: Update Chapter on Nodes

Summary

Please answer in the comments if you are interested.

We are seeking a contributor to update the node tutorial found in Chapter 3 of the Starknet Book. The updated content should delve deeper into the functionality of nodes, their relationship with sequencers, and their significance within the Starknet ecosystem.

Detailed Objectives

1. Elaborate on Node Functionality:

  • Explain what nodes do in the Starknet network and why they are crucial. As a guideline, you can see the existing chapter on Sequencers in Chapter 3.

2. Clarify the Relationship with Sequencers, Clients and the mempool:

  • Why are nodes and sequencers relevant to each other in Starknet?
  • How do the nodes relate to the Clients
  • How do the nodes relate to the mempool?

3. Significance of Node Diversity:

  • Explain why it's important to have a variety of node implementations.

4. Existing Node Implementations:

  • List examples such as Papyrus, Kasarlabs, Juno, etc.
  • Provide a brief comparison between them, possibly in table form.

5. Implementation guide:

  • The current node chapter is outdated, but we would love to bring it up to speed for utilizing nodes in Starknet.
  • Show the reader how to implement/create at least two different nodes at the contributor's choice. This would include approximate prices of recommended hardware and clear instructions so the user can implement them easily.
  • Show the user how to interact with them (invoke, call, check the blocks, etc.), and their relationship with Ethereum's Layer 1.

You can follow the format of Chapter 3 on Starknet sequencers as a guide.

Contact

If you have any questions, please write to @espejelomar.

Missing Image Error

When running the book locally, the following error is produced in the terminal:

[generate:watch] {"level":"error","time":1684837704051,"name":"asciidoctor","file":{"path":"/Users/raphaelndonga/starknet/starknetbook/chapters/book/modules/chapter_7/pages/multicall.adoc"},"source":{"url":"https://github.com/starknet-edu/starknetbook.git","local":"/Users/raphaelndonga/starknet/starknetbook/.git","worktree":"/Users/raphaelndonga/starknet/starknetbook","refname":"main","reftype":"branch","startPath":"chapters/book"},"msg":"target of image not found: aa_defi_ex.png"}

This makes it impossible to run the book locally.
The reason for it was that there is a file being called in
/starknetbook/chapters/book/modules/chapter_7/pages/multicall.adoc on line 20 that does not exist.

Request for Contribution: Chapter on Architecture - Provers

Summary

Please answer in the comments if you are interested.

Incentivized Contributions: In collaboration with Only Dust, we offer incentives for contributors.

THIS ISSUE HAS PRIORITY AND WILL BE REVIEWED ASAP. Please get in touch with espejelomar (on Telegram) for any doubts or comments.


We are looking for contributions to explain the role of provers, delving into their technical aspects for Chapter 3 titled "Architecture" in the Starknet book. Specifically, we are interested in the inner workings of the Stone, Platinum, and Sandstorm provers.

Details

Objectives

Instructions for Contributing

  1. Comment on this Issue, specifying which prover (Stone, Platinum, or Sandstorm) you'd like to delve into.
  2. Once confirmed, start working and focus on your selected prover(s).
  3. Submit your contribution through the respective GitHub repositories provided.

Remuneration

We have allocated a grant from OnlyDust to reward this project. The contribution is segmented into three distinct parts: one for the Stone Prover, one for the Platinum Prover, and one for the Sandstorm Prover. Each segment, when approved, will be rewarded individually (200 USD each).

Deadline

  • October 30.

We look forward to your proposals. Thank you for contributing to the Starknet ecosystem!

`ERROR: Failed building wheel for fastecdsa` on Ubuntu 23.04 with `pyenv`

In the environment setup, this step fails on installing fastecdsa:

pip install ecdsa fastecdsa sympy

I'm using pyenv, I've used Python 3.9.0 for my virtualenv and have activated it.

It's failing to find the Python.h header, which is in these places on my machine:

$locate Python.h
/home/e/.pyenv/versions/3.9.0/include/python3.9/Python.h
/home/e/.pyenv/versions/3.9.15/include/python3.9/Python.h
/usr/include/python3.11/Python.h

But the gcc build is looking for it here: -I/usr/include/python3.9

I'm running Ubuntu 23.04:

$uname -a
Linux x1c9 6.2.0-24-generic #24-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 16 12:03:50 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
$lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 23.04
Release:	23.04
Codename:	lunar

I considered whether I could install an APK for Python 3.9 that would provide /usr/include/python3.9. Note that I can't use the deadsnakes PPA, because that only supports LTS versions of Ubuntu and I'm on 23.04.

I also considered just giving up on pyenv and using venv, but venv has problems of its own:

python3.9 -m venv ~/cairo_venv
Error: Command '['/home/e/cairo_venv/bin/python3.9', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

I recall that changing the system Python on Ubuntu breaks the OS badly. So I won't be doing that.

This (closed) bug on fastecdsa is relevant: AntonKueltz/fastecdsa#81

But python3.9-dev is not an available package on 23.04:

sudo apt install python3.9-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python3.9-dev
E: Couldn't find any package by glob 'python3.9-dev'

Here's what I do have installed for Python 3.9:

$apt list --installed | grep python3.9

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libpython3.9-minimal/now 3.9.16-1+jammy1 amd64 [installed,local]
libpython3.9-stdlib/now 3.9.16-1+jammy1 amd64 [installed,local]
python3.9-distutils/now 3.9.16-1+jammy1 all [installed,local]
python3.9-lib2to3/now 3.9.16-1+jammy1 all [installed,local]
python3.9-minimal/now 3.9.16-1+jammy1 amd64 [installed,local]
python3.9/now 3.9.16-1+jammy1 amd64 [installed,local]

-minimal sounds bad here but I can find no way to get python3.9-dev installed.

Of course, the workaround is just to use the docker container.

Full output of the pip install attempt:

$pip install ecdsa fastecdsa sympy
Defaulting to user installation because normal site-packages is not writeable
Collecting ecdsa
  Using cached ecdsa-0.18.0-py2.py3-none-any.whl (142 kB)
Collecting fastecdsa
  Using cached fastecdsa-2.3.0.tar.gz (49 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting sympy
  Using cached sympy-1.12-py3-none-any.whl (5.7 MB)
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3/dist-packages (from ecdsa) (1.16.0)
Collecting mpmath>=0.19 (from sympy)
  Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)
Building wheels for collected packages: fastecdsa
  Building wheel for fastecdsa (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for fastecdsa (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [60 lines of output]
      /tmp/pip-build-env-i8zvygtl/overlay/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py:66: _BetaConfiguration: Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*.
        config = read_configuration(filepath, True, ignore_option_errors, dist)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-39
      creating build/lib.linux-x86_64-cpython-39/fastecdsa
      copying fastecdsa/keys.py -> build/lib.linux-x86_64-cpython-39/fastecdsa
      copying fastecdsa/point.py -> build/lib.linux-x86_64-cpython-39/fastecdsa
      copying fastecdsa/__init__.py -> build/lib.linux-x86_64-cpython-39/fastecdsa
      copying fastecdsa/curve.py -> build/lib.linux-x86_64-cpython-39/fastecdsa
      copying fastecdsa/benchmark.py -> build/lib.linux-x86_64-cpython-39/fastecdsa
      copying fastecdsa/ecdsa.py -> build/lib.linux-x86_64-cpython-39/fastecdsa
      copying fastecdsa/util.py -> build/lib.linux-x86_64-cpython-39/fastecdsa
      creating build/lib.linux-x86_64-cpython-39/fastecdsa/encoding
      copying fastecdsa/encoding/__init__.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/encoding
      copying fastecdsa/encoding/der.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/encoding
      copying fastecdsa/encoding/pem.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/encoding
      copying fastecdsa/encoding/asn1.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/encoding
      copying fastecdsa/encoding/sec1.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/encoding
      copying fastecdsa/encoding/util.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/encoding
      creating build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/test_nonce_generation.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/test_rfc6979_ecdsa.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/__init__.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/test_key_recovery.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/test_brainpool_ecdh.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/test_whitespace_parsing.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/test_keygen.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/test_whycheproof_vectors.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/test_key_export_import.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/test_point.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/test_prehashed.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/test_p256_ecdsa.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      copying fastecdsa/tests/test_prime_field_curve_math.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests
      creating build/lib.linux-x86_64-cpython-39/fastecdsa/tests/encoding
      copying fastecdsa/tests/encoding/test_der.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests/encoding
      copying fastecdsa/tests/encoding/__init__.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests/encoding
      copying fastecdsa/tests/encoding/test_sec1.py -> build/lib.linux-x86_64-cpython-39/fastecdsa/tests/encoding
      running egg_info
      writing fastecdsa.egg-info/PKG-INFO
      writing dependency_links to fastecdsa.egg-info/dependency_links.txt
      writing top-level names to fastecdsa.egg-info/top_level.txt
      reading manifest file 'fastecdsa.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      writing manifest file 'fastecdsa.egg-info/SOURCES.txt'
      running build_ext
      building 'fastecdsa.curvemath' extension
      creating build/temp.linux-x86_64-cpython-39
      creating build/temp.linux-x86_64-cpython-39/src
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Isrc/ -I/usr/include/python3.9 -c src/curve.c -o build/temp.linux-x86_64-cpython-39/src/curve.o -O2
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Isrc/ -I/usr/include/python3.9 -c src/curveMath.c -o build/temp.linux-x86_64-cpython-39/src/curveMath.o -O2
      In file included from src/curveMath.c:1:
      src/curveMath.h:4:10: fatal error: Python.h: No such file or directory
          4 | #include <Python.h>
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for fastecdsa
Failed to build fastecdsa
ERROR: Could not build wheels for fastecdsa, which is required to install pyproject.toml-based projects

Call for Contributions: Enhancing Starknet JS, Starknet PY, and Starknet RS Chapters

Greetings Starknet Community,

We are currently seeking contributions from the community to expand and enrich our content for the Starknet JS, Starknet PY, and Starknet RS chapters of the Starknet Book.

Here are the specific sections we are focusing on:

If you have expertise and knowledge in either of these areas, we encourage you to contribute. Also, if you believe there are relevant subtopics or areas of interest we have not covered, feel free to propose new subchapters.

To streamline our collaborative efforts and prevent work duplication, please comment on this issue indicating the section number(s) you are interested in enhancing. We will update this issue accordingly to show current assignments.

For any inquiries, suggestions, or ideas, don't hesitate to reach out to @espejelomar on Telegram or Twitter. We want to emphasize that this is a community-led initiative and every contribution, no matter its size, is greatly appreciated!

Let's unite and turn the Starknet SDKs chapters of the StarkNet Book into an outstanding resource for everyone. 🚀

Request for Contributions: Starkli

Summary

Please answer in the comments if you are interested.

Sponsored by Only Dust with a reward of 250 USD


We are seeking contributions that showcase advanced use cases of Starkli for Chapter 2.4 "Starkli: A CLI Interface".

Detailed Objectives

  1. Dive deep into more advanced topics. Some examples might include:

    • Engaging with the blockchain and maximizing its capabilities.
    • Covering as many operations with Starkli as possible within a comprehensive example.
  2. Please avoid duplicating content from Chapter 2.2 (Compile, Deploy, Interact). However, if there's a need to update this section due to relevant changes or enhancements, we are open to it.

How to Contribute:

  • Fork the Starknet Book repository.
  • Add the tutorial and make any necessary edits.
  • Create a Pull Request, describing your changes and linking to this issue.

Contact

For questions, reach out to @espejelomar.

Request for Contributions: Scarb

Summary

Please answer in the comments if you are interested.

Sponsored by Only Dust with a reward of 100 USD


We are looking for contributions to update Chapter 2.3 "Scarb: The Package Manager"

Detailed Objectives

  1. Add as much detail as possible to the chapter, given that Scarb is now the heart of all Starknet tooling.

How to Contribute:

  • Fork the Starknet Book repository.
  • Add the tutorial and make any necessary edits.
  • Create a Pull Request, describing your changes and linking to this issue.

Contact

For questions, reach out to @espejelomar.

Contributors for Chapter 2: Smart Contracts in Cairo

📣 Calling all Starknet community!

We’re on the lookout for community contributors to help us fill the content for Chapter 2: Smart Contracts in Cairo in the starknetbook. Chapter 2 will be an in-depth exploration of Cairo, covering everything from basic concepts to advanced features, as well as practical applications and integration with the Ethereum Virtual Machine.

The current structure of Chapter 2 is as follows, but if you believe more content should be added, existing content should be edited, or have suggestions for different content, please let us know:

  • 2.4 Introduction to Scarb (only the compiling and project setup section) - @codeWhizperer
  • 2.8 Enums in Cairo - @codeWhizperer
  • 2.9 Arrays in Cairo - @codeWhizperer
  • 2.10 Pointers in Cairo
  • 2.11 Strings in Cairo - @codeWhizperer
  • 2.12 Loops in Cairo
  • 2.13 Transpiling Solidity into Cairo using WARP - @ArturVargas
  • 2.14 Cairo and the Ethereum Virtual Machine: The Kakarot ZKEVM

To ensure we can efficiently track who is working on each section and avoid duplicating efforts, please comment on this issue with the section number(s) you would like to contribute to. We will then update the issue description to reflect the current assignments.

If you have any doubts, or ideas, or want to discuss this further, please get in touch with @espejelomar on Telegram or Twitter. This is a community effort, and we're excited to have you on board!

We're incredibly grateful for your support and contributions! Your expertise and passion are what make the Starknet community truly exceptional. We can't wait to see what you come up with!

Happy contributing! 🚀

Request for Contribution: Update Foundry cast section

Summary

Please answer in the comments if you are interested.

This issue is rewarded on OnlyDust.


We are looking for contributions to update the section 2.8 Foundry Forge: Testing (it also includes section 2.8.1)

Details

Objectives

  • Refresh the content, code, and images in this section.
  • Ensure compatibility with snforge version 0.14.0. and scarb 2.4.3
  • Check and confirm all input commands work as intended. Update tests where necessary.

How to Contribute:

  • Fork the Starknet Book repository.
  • Add the tutorial and make any necessary edits.
  • Create a Pull Request, describing your changes and linking to this issue.

Contact

For questions, reach out to @gianmalarcon on tg

Request for Contribution: Chapter on Starknet JS and Starknet React

Summary

We are looking for contributions to complete a chapter dedicated to Starknet JS and Starknet React in our Starknet book. This chapter will focus on building a full-stack application using Starknet JS and Starknet React along with a Cairo contract. The contribution will be remunerated through OnlyDust.

Details

Objectives

  1. Complete the tutorial on Starknet JS and Starknet React:

  2. Develop a chapter that explains how to build a full-stack application:

    • Use a Cairo contract (any well-documented contract is acceptable)
    • The frontend should be launched using Starknet React and Starknet JS.
    • The application must demonstrate the use of Starknet JS and Starknet React components.
    • Include a detailed tutorial on how the components and libraries were used to build the application.

Instructions for Contributing

  1. Leave a comment on this Issue describing what example you'd like to create.
  2. Wait for our confirmation to start on the project.
  3. Once you have received confirmation, begin working on your contribution.
  4. The source code must be added within the repository for Chapter 2 of the Starknet Book.

Remuneration

Funding is available for the creation of three distinct examples. Each example must be unique and should not overlap with any previously submitted work. The examples should demonstrate a range of capabilities by utilizing diverse components from both Starknet JS and React JS. Specifically, we're seeking submissions for one basic, one intermediate, and one advanced example.

Basic Example: This should serve as a comprehensive walkthrough, effectively completing the chapters on Starknet JS and Starknet React that are already present in the Starknet Book.

Intermediate and Advanced Examples: These should go beyond the basics, providing a detailed account of how each example was constructed, with an emphasis on innovative uses of Starknet JS and React JS components.

Compensation for the approved contributions will be provided via OnlyDust.

Deadline

  • Maximum of 10 days per example

If you have any questions or need further details, please don't hesitate to ask.


We look forward to your proposals. Thank you for contributing to the Starknet ecosystem!

Request for Contributions: Starknet Foundry

Summary

Please answer in the comments if you are interested.

Incentivized Contributions: In collaboration with Only Dust, we offer incentives for contributors.

THIS ISSUE HAS PRIORITY AND WILL BE REVIEWED ASAP. Please get in touch with espejelomar (on Telegram) for any doubts or comments.


We need contributions for Starknet Foundry and have identified key areas where the community can add value to the project.

Detailed Objectives

We would need one contributor for FORGE and one for CAST.

FORGE Section:

We're seeking contributors to write about FORGE, providing detailed documentation and explanations, accompanied by at least one example. In this subchapter you can add your work.

CAST Section:

We need a comprehensive guide for CAST, with at least one illustrative example of its use. This is the subchapter to add your work.

How to Contribute:

  • Fork the Starknet Book repository.
  • Add the tutorial and make any necessary edits.
  • Create a Pull Request, describing your changes and linking to this issue.

Contact

For questions, reach out to @espejelomar.

Chapter2 - Scarb: Example code for `hello_scarb.cairo` does not compile with latest Scarb version

The guide instructs users to create a file hello_scarb.cairo with the following contents:

// src/hello_scarb.cairo
use debug::PrintTrait;
fn main() {
    "Hello, Scarb!".print();
}

However, when compiling with the latest version of Scarb the following error will occur:

dev@dev:~/dev/hello_scarb$ scarb build
   Compiling hello_scarb v0.1.0 (/home/dev/dev/learning/cairo/starknetbook/ch2/hello_scarb/Scarb.toml)
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `TerminalBadCharacters`,
 right: `TerminalLParen`', /cargo/registry/src/index.crates.io-6f17d22bba15001f/cairo-lang-parser-1.0.0/src/parser.rs:1825:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The "Hello, Scarb" string should actually be enclosed in single quotes in order to compile:

// src/hello_scarb.cairo    
use debug::PrintTrait;    
fn main() {    
    'Hello, Scarb!'.print();    
}    

The version of Scarb used was:

dev@dev:~$ scarb --version
scarb 0.2.1 (0bccfe675 2023-05-18)
cairo: 1.0.0 (https://crates.io/crates/cairo-lang-compiler/1.0.0)

Duplicate message definition error when generating .po file.

In some environments, trying to run the generating language .po file command will cause an error like this:

po/messages.pot:964: duplicate message definition...
po/messages.pot:3: ...this is the location of the first definition

It looks like:

#: src/ch01-00-getting-started.md:13
#: src/ch01-00-getting-started.md:127
#: src/ch02-07-starknet-js.md:11
#: src/ch03-00-architecture.md:26
#: src/ch03-02-sequencers.md:52
#: src/ch03-02-sequencers.md:211
#: src/ch03-04-nodes.md:66
#: src/ch03-04-nodes.md:350
#: src/ch03-04-nodes.md:420
#: src/ch03-05-layer-3.md:18
msgid ""
msgstr ""

It was because of this. google/mdbook-i18n-helpers#64

Libfunc bool_eq error

https://book.starknet.io/chapter_2/structure.html
https://book.starknet.io/chapter_2/event.html

I get this error when I try to run the sample voting contracts in the links above.

image

the sequencers do not recognize these methods as executable in the current cairo VM.

image

assert(is_voter , 'USER_ALREADY_VOTED');
assert(can_vote, 'USER_NOTED_REGISTERED');


https://book.starknet.io/chapter_2/security_considerations.html
In this section, the Recommendation part is too much (i.e. again).

Issue Faced: StarkNet Faucet Rejection and Alternative Funding Method

I recently encountered an issue while navigating the StarkNet repository, specifically in dealing with the StarkNet faucet. In the context of a Discord discussion, I observed that the faucet might reject transfer requests due to high demand. To provide a workaround for others facing a similar situation, I found an alternative method that could be beneficial.

Alternative Funding Method Using Browser-Based Wallets:

If you encounter difficulties with the StarkNet faucet, consider utilizing a browser-based smart wallet like Argent-X or Braavos.

Follow these steps to potentially overcome the issue:

✨ Connect your browser wallet to https://goerli.starkgate.starknet.io/.
✨ Bridge Goerli ETH from your Layer 1 (L1) wallet to your browser wallet.
Once the funds arrive, use your browser wallet to transfer funds to the appropriate contract address. Obtain this address by running the command starknet new_account.

Contributors to Chapter 5: Front End Development

We're currently looking for community contributors to assist us in enhancing the content for Chapter 5: Front-End Development.

Chapter 5 will delve into the specifics of front-end development in the context of Starknet, with a focus on:

  • 5.1 Vue Stark Boil
  • 5.2 Starknet React

However, feel free to open new subchapters if you find it useful.

Here's an excellent opportunity to share your knowledge, insights, and experience with these two popular frameworks in the context of StarkNet.

To ensure efficient collaboration and to avoid duplicated work, we kindly request that you comment on this issue with the section number(s) you are interested in contributing to. We will then update the issue description to reflect the current assignments.

For any queries, ideas, or suggestions, feel free to reach out to @espejelomar on Telegram or Twitter. Remember, this is a community-led initiative, and every contribution, no matter how small, is highly valued!

Let's come together and make Chapter 5 of the StarkNet Book an exceptional resource for everyone! 🚀

Update `Getting Started` section - Remix

Summary

Please answer in the comments if you are interested.

Rewarded Contributions: In collaboration with Only Dust, we offer incentives for contributors.


Detailed Objectives

We are seeking contributions to update the content tutorial, images, and code of the following section
https://book.starknet.io/ch01-00-getting-started.html
Make this section compatible with Starknet Remix Plugin v2.4.0

How to Contribute:

  • Fork the Starknet Book repository.
  • Add the tutorial and make any necessary edits.
  • Create a Pull Request, describing your changes and linking to this issue.

Contact

For questions, reach out to @gianmalarcon

Translation I18n

Good morning Team, @omarespejel we have detected how to solve the translation versions for the different projects with mdbook, basically they work with different versions in i18n, mdbook...

With the International translation team formed with @cryptonerdcn , we have tested Starknet by Example and it works perfectly.

I'll do some update these days for Starknet Book and we'll try if it goes well, do you think?

Chapter 1 - "Creating an account descriptor" confusion

In chapter 1 - creating an account descriptor, the step asks you to use starkli in order to fetch your account descriptor with your wallet address; however, up until this point, the book does not have you deploy any contract to Starknet, so you get the following error:

Error: code=ContractNotFound, message="Contract with address {SMART_WALLET_ADDRESS} is not deployed."

I think this is confusing for newcomers who are going through the book in order because each step should be laid out in logical order.

Contribute to security tools and considerations section

As the StarkNet project continues to evolve 🚀, the collective knowledge and expertise of this community play a crucial role in ensuring the security and integrity of the platform.

Therefore, you are invited to contribute to the enhancement of this Security Considerations chapter (https://book.starknet.io/ch02-14-security-considerations.html) and related tools (https://book.starknet.io/ch02-15-security-tools.html) 💪🔒.

Your insights, experiences, and expertise can significantly strengthen the overall security posture of Cairo smart contracts 💡🛡️✨.

Contributors to Chapter 7: Account Abstraction

Greetings, StarkNet devs! 🌟

We're on the lookout for community members to help us create content for Chapter 7: Account Abstraction.

Chapter 7 will dive into the world of Account Abstraction, covering topics such as:

  • 7.4 Deploying and Interacting with Account Contracts
  • 7.5 Coding Custom Account Contracts
    • 7.5.1 Alternative Signature Schemes
    • 7.5.2 Multicalls
    • 7.5.3 Auto-Payments Accounts
    • 7.5.4 Multisig Accounts
    • ... Other examples!
  • 7.6 Security Considerations
  • 7.7 Roadmap

Here are some existing AA examples created by the community; it would be great to use them as a guideline for the content in the book:

To streamline collaboration and prevent duplicated work, please comment on this issue with the section number(s) you'd like to contribute to. We will then update the issue description to show current assignments.

Feel free to reach out to @espejelomar on Telegram or Twitter if you have any questions, ideas, or suggestions. Remember, this is a community-driven effort, and your input is greatly appreciated!

Let's join forces and make Chapter 7 of the StarkNetBook a phenomenal resource for everyone! 🚀

Request for Contributions: Account Abstraction

Summary

Please answer in the comments if you are interested.

Incentivized Contributions: In collaboration with Only Dust, we offer incentives for contributors.


We are seeking contributions to update Chapter 4 on Account Abstraction in the Starknet book (https://book.starknet.io/ch04-00-account-abstraction.html).

Detailed Objectives:

We are in need of two specific contributions:

Incorporate David Barreto's Tutorial

We aim to integrate David Barreto's tutorials on Account Abstraction into Chapter 4 of the Starknet book. Contributors can incorporate this material into any appropriate section of the chapter they deem fit.

David Barreto's Tutorials:
• Part I: https://medium.com/starknet-edu/account-abstraction-on-starknet-part-i-2ff84c6a3c30
• Part II: https://medium.com/starknet-edu/account-abstraction-on-starknet-part-ii-24d52874e0bd
• Part III: https://medium.com/starknet-edu/account-abstraction-on-starknet-part-iii-698904e7792c

Example Adaptation

For Section 4.4 of Chapter 4 in the Starknet book, we require the adaptation of various examples, such as Multicaller, Multisig, Auto-Payments, among others that illustrate the use of different signatures. For each adaptation, a reward of 200 USD will be granted.

How to Contribute:

  • Fork the Starknet Book repository.
  • Add the tutorial and make any necessary edits.
  • Create a Pull Request, describing your changes and linking to this issue.

Contact

For questions, reach out to @espejelomar.

Request for Contribution: Introduce the Rust Devnet to the tooling chapter

Please answer in the comments if you are interested.

Incentivized Contributions: Via Only Dust, we offer incentives for contributors.


We're looking for contributors to add a new chapter to the Starknet Book, akin to Section 2.2 of Chapter 2, but with a twist: it will center around the Rust-based Devnet.

Details

Objectives

  • Craft the chapter around the Rust-based Devnet instead of Katana.
  • You can use the same contracts and style as with the Katana version of the chapter but with the Rust based devnet.
  • In the chapter before it, show how to set up the Rust-based Devnet, presenting it as an alternative to Katana.

Instructions for Contributing

  • Leave a comment on this Issue.
  • Wait for our confirmation to start on the project.
  • Once you have received confirmation, begin working on your contribution.

Remuneration

  • We have assigned a grant of 100 USD from OnlyDust to reward this project.

Contact

For questions, reach out to @espejelomar.

Confusion around cli account deployment

saw the starknetbook referenced in this question https://discord.com/channels/793094838509764618/793094838987128844/1102540724416806943

I think it might help clarifying that due to high demand the starknet faucet may reject your transfer request.
If this happens I've found the easiest way to fund a cli account is to use a browser based smart wallet like argent-x or braavos and

  1. connect it to https://goerli.starkgate.starknet.io
  2. bridge goerli eth from your L1 wallet to your browser wallet
  3. When funds arrive, use browser wallet to transfer funds to the appropriate contract address you got from running starknet new_account

Screen Shot 2023-05-01 at 2 54 23 PM

I would be happy to submit a PR if this sounds helpful 🙂

Error on Chapter 7.3: Exploring StarkNet's Account Abstraction model

"validate: Allows you to define an arbitrary logic to determine if a transaction is valid or not. They can not read This function allows you to define custom logic for determining the validity of a transaction. "

The highlighted sentence does not convey a complete meaning. I believe the author had some information to pass at the beginning of the sentence that was omitted.

Request for Contribution: Update Foundry forge section

Summary

Please answer in the comments if you are interested.

This issue is rewarded on OnlyDust.


We are looking for contributions to update the section 2.13 Foundry Forge: Testing

Details

Objectives

  • Refresh the content, code, and images in this section.
  • Ensure compatibility with snforge version 0.16.0.
  • Check and confirm all input commands work as intended. Update tests where necessary.
    Note: Update the Example: Testing ERC20 Contract to use version 0.8.1 of OppenZepplelin (it uses components)

How to Contribute:

  • Fork the Starknet Book repository.
  • Include and edit the tutorial as needed.
  • Submit a Pull Request with a description of your changes and a link to this issue.

Contact

For questions, reach out to @gianmalarcon.

Import Error

When following up the steps for setting up an environment in Chapter 1.3 (Setting Up Your Environment), I got to the part of running starknet --version and got the following error:

ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3. See: https://github.com/urllib3/urllib3/issues/2168

I am running macOS Monterey version 12.5 Apple M2.

Request for Contributions: Darlington's Tutorial for Starknet Book

Summary

Please answer in the comments if you are interested.

THIS ISSUE HAS PRIORITY AND WILL BE REVIEWED ASAP. Please get in touch with omarespejel (on Telegram) for any doubts or comments.

We invite you to enhance the Starknet Book by integrating Darlington's Tutorial. His recent basecamp session delves into creating interfaces using starknet-js, an addition that will undoubtedly elevate the book, providing readers with a hands-on experience with starknet-js.

Here's What's Needed:

  • Tutorial Integration: Adapt and weave Darlington's insights into the Starknet Book's format.
  • Reference the Basecamp Session: Use the recent basecamp session as a guide. Access it here. Here is the repo used.
  • Where in the Book: Adapt it inside Chapter 2: Tooling as a new subchapter called "Starknet-js and starknet-react: Creating XXX".

How to Contribute:

  • Fork the Starknet Book repository.
  • Add the tutorial and make any necessary edits.
  • Create a Pull Request, describing your changes and linking to this issue.

Contact

For questions, reach out to @espejelomar.

Coexistence of contract syntax v1 and v2

New contract syntax has been introduced and the older version will exists alongside the new syntax for at least six months.

I propose the following:

  1. Create separate sections in the documentation for syntax v1 and v2.
  2. Provide detailed documentation for both syntax versions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.