Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Prettier integration #205

Merged
merged 2 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ permissions:

# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: true
group: pages
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read # To push a branch
pages: write # To push to a GitHub Pages site
contents: read # To push a branch
pages: write # To push to a GitHub Pages site
id-token: write # To update the deployment status
steps:
- uses: actions/checkout@v3
Expand All @@ -42,10 +42,10 @@ jobs:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v2

- name: Rename book to public_html
run: mv book public_html

- name: scp upload to production site
run: |
sshpass -p ${{ secrets.PROD_PASS }} scp -o 'StrictHostKeyChecking no' -r public_html/ ${{ secrets.PROD_USER }}@${{ secrets.PROD_IP }}:~/
sshpass -p ${{ secrets.PROD_PASS }} scp -o 'StrictHostKeyChecking no' -r public_html/ ${{ secrets.PROD_USER }}@${{ secrets.PROD_IP }}:~/
14 changes: 14 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Task - Linters

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run prettier
run: |-
npx prettier --check .
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
book
target
output
node_modules

# Editors tmp files.
*~
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
43 changes: 20 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,9 @@ All notable changes to this project will be documented in this file. See [standa

## [1.2.0](https://github.com/starknet-edu/starknetbook/compare/v1.1.81...v1.2.0) (2023-05-16)


### Features

* add pragma and eliminate stork ✨ ([#102](https://github.com/starknet-edu/starknetbook/issues/102)) ([9b9c2d1](https://github.com/starknet-edu/starknetbook/commit/9b9c2d1ac3296671c500340e9f4db882f329c242))
- add pragma and eliminate stork ✨ ([#102](https://github.com/starknet-edu/starknetbook/issues/102)) ([9b9c2d1](https://github.com/starknet-edu/starknetbook/commit/9b9c2d1ac3296671c500340e9f4db882f329c242))

### [1.1.81](https://github.com/starknet-edu/starknetbook/compare/v1.1.80...v1.1.81) (2023-05-16)

Expand Down Expand Up @@ -419,15 +418,14 @@ All notable changes to this project will be documented in this file. See [standa

### [1.1.6](https://github.com/starknet-edu/starknetbook/compare/v1.1.5...v1.1.6) (2023-04-10)


### Bug Fixes

* typo ([cb5d950](https://github.com/starknet-edu/starknetbook/commit/cb5d950c7446d52f78179875a2565611f2c7ef94))
* typo ([c6e07ec](https://github.com/starknet-edu/starknetbook/commit/c6e07ec75dc2d2f056fa7aa3f38525f2cb4d6d83))
* typo ([f3da9e0](https://github.com/starknet-edu/starknetbook/commit/f3da9e0f0d83ee903c91b1e0af6998876afffbcf))
* typo ([4a3112e](https://github.com/starknet-edu/starknetbook/commit/4a3112ed93371527b0343243ae88d8cd04f36ecc))
* typos ([3d52039](https://github.com/starknet-edu/starknetbook/commit/3d52039c665bfbaf540b106ab52c11efe996c262))
* typos ([0f3c7c7](https://github.com/starknet-edu/starknetbook/commit/0f3c7c7901af43a6c28536a34d00403539bd48ea))
- typo ([cb5d950](https://github.com/starknet-edu/starknetbook/commit/cb5d950c7446d52f78179875a2565611f2c7ef94))
- typo ([c6e07ec](https://github.com/starknet-edu/starknetbook/commit/c6e07ec75dc2d2f056fa7aa3f38525f2cb4d6d83))
- typo ([f3da9e0](https://github.com/starknet-edu/starknetbook/commit/f3da9e0f0d83ee903c91b1e0af6998876afffbcf))
- typo ([4a3112e](https://github.com/starknet-edu/starknetbook/commit/4a3112ed93371527b0343243ae88d8cd04f36ecc))
- typos ([3d52039](https://github.com/starknet-edu/starknetbook/commit/3d52039c665bfbaf540b106ab52c11efe996c262))
- typos ([0f3c7c7](https://github.com/starknet-edu/starknetbook/commit/0f3c7c7901af43a6c28536a34d00403539bd48ea))

### [1.1.5](https://github.com/starknet-edu/starknetbook/compare/v1.1.4...v1.1.5) (2023-04-10)

Expand All @@ -441,24 +439,23 @@ All notable changes to this project will be documented in this file. See [standa

## 1.1.0 (2023-04-04)


### Features

* **buidl:** fix python tests ([533a338](https://github.com/starknet-edu/starknetbook/commit/533a3389dadd54794d8742083827aad7b265912b))
* **camp 4:** faster hardhat tests ([d216d65](https://github.com/starknet-edu/starknetbook/commit/d216d65b646843acc9f9e14ae192dd057220dd13))
* **camp_4:** release the beast ([fe543ef](https://github.com/starknet-edu/starknetbook/commit/fe543ef229c7268cfe3733016e2eef9d9e9e5e79))

- **buidl:** fix python tests ([533a338](https://github.com/starknet-edu/starknetbook/commit/533a3389dadd54794d8742083827aad7b265912b))
- **camp 4:** faster hardhat tests ([d216d65](https://github.com/starknet-edu/starknetbook/commit/d216d65b646843acc9f9e14ae192dd057220dd13))
- **camp_4:** release the beast ([fe543ef](https://github.com/starknet-edu/starknetbook/commit/fe543ef229c7268cfe3733016e2eef9d9e9e5e79))

### Bug Fixes

* **buidl:** protostar + python ([6c56aad](https://github.com/starknet-edu/starknetbook/commit/6c56aadf0ffd522ada2e95587a3ce456d217d276))
* **buidl:** update hardhat ([f8f5e1f](https://github.com/starknet-edu/starknetbook/commit/f8f5e1f147e6fff241c1c0913913266a1ff62b2b))
* camp_1 readme typos ([03f4b22](https://github.com/starknet-edu/starknetbook/commit/03f4b22b06c0e721d0761714c907e4625821efa0))
* camp_2 readme typos ([418fcbb](https://github.com/starknet-edu/starknetbook/commit/418fcbb94bf9e8340b9975f1c1f7d2fba935699d))
* camp_3 readme typos ([5196e10](https://github.com/starknet-edu/starknetbook/commit/5196e109d0c97e257eff89dc8cc1d66c25be6434))
* camp_4 readme typos ([547c66f](https://github.com/starknet-edu/starknetbook/commit/547c66f69a11b3632b14969e006c345b00782335))
* camp_5 readme typos ([9e94295](https://github.com/starknet-edu/starknetbook/commit/9e94295846d2afc3bde113d9d049fae7d07b29b7))
* fix broken link in camp_2 module ([#39](https://github.com/starknet-edu/starknetbook/issues/39)) ([8652b6f](https://github.com/starknet-edu/starknetbook/commit/8652b6f3f6c3a57593de9621c626359c1cdc5435))
- **buidl:** protostar + python ([6c56aad](https://github.com/starknet-edu/starknetbook/commit/6c56aadf0ffd522ada2e95587a3ce456d217d276))
- **buidl:** update hardhat ([f8f5e1f](https://github.com/starknet-edu/starknetbook/commit/f8f5e1f147e6fff241c1c0913913266a1ff62b2b))
- camp_1 readme typos ([03f4b22](https://github.com/starknet-edu/starknetbook/commit/03f4b22b06c0e721d0761714c907e4625821efa0))
- camp_2 readme typos ([418fcbb](https://github.com/starknet-edu/starknetbook/commit/418fcbb94bf9e8340b9975f1c1f7d2fba935699d))
- camp_3 readme typos ([5196e10](https://github.com/starknet-edu/starknetbook/commit/5196e109d0c97e257eff89dc8cc1d66c25be6434))
- camp_4 readme typos ([547c66f](https://github.com/starknet-edu/starknetbook/commit/547c66f69a11b3632b14969e006c345b00782335))
- camp_5 readme typos ([9e94295](https://github.com/starknet-edu/starknetbook/commit/9e94295846d2afc3bde113d9d049fae7d07b29b7))
- fix broken link in camp_2 module ([#39](https://github.com/starknet-edu/starknetbook/issues/39)) ([8652b6f](https://github.com/starknet-edu/starknetbook/commit/8652b6f3f6c3a57593de9621c626359c1cdc5435))

<a name=""></a>
# (2023-04-04)

# (2023-04-04)
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ $ cargo install mdbook --version 0.4.31
Follow these steps to build and view the book:

1. Build the book:

```bash
$ mdbook build
$ mdbook build
```

2. After building, the compiled content will be located in the **`book`** subdirectory.
3. To view the content in a browser:

```bash
$ mdbook serve --open
```
$ mdbook serve --open
```

Tip: After making edits, simply refresh your browser to see the updates.

27 changes: 27 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"scripts": {
"format": "prettier . --write"
},
"devDependencies": {
"prettier": "3.0.3"
}
}
3 changes: 1 addition & 2 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@
- [Foundry Forge: Testing 🚧](ch02-11-foundry-forge.md)
- [Foundry Cast: Interacting with Starknet 🚧](ch02-12-foundry-cast.md)


## Architecture

- [Architecture](ch03-00-architecture.md)
- [Transactions](ch03-01-transactions.md)
- [Sequencers](ch03-02-sequencers.md)
- [Provers 🚧](ch03-03-provers.md)
- [Nodes 🚧](ch03-04-nodes.md)
- [Layer 3 and App Chains 🚧 ](ch03-05-layer-3.md)
- [Layer 3 and App Chains 🚧 ](ch03-05-layer-3.md)
- [Solidity Verifier 🚧](ch03-06-solidity-verifier.md)
- [Decentralization 🚧](ch03-07-decentralization.md)

Expand Down
91 changes: 45 additions & 46 deletions src/ch00-00-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

## Preamble

Historically, societal roles like currency, property rights, and social status titles have been governed by *protocols* and *registries*. Their value stems from a widely accepted understanding of their integrity. These functions have predominantly been overseen by centralized entities prone to challenges such as corruption, agency conflicts, and exclusion ([Eli Ben-Sasson, Bareli, Brandt, Volokh, 2023](https://hackmd.io/@Elibensasson/ryMelVulp)).
Historically, societal roles like currency, property rights, and social status titles have been governed by _protocols_ and _registries_. Their value stems from a widely accepted understanding of their integrity. These functions have predominantly been overseen by centralized entities prone to challenges such as corruption, agency conflicts, and exclusion ([Eli Ben-Sasson, Bareli, Brandt, Volokh, 2023](https://hackmd.io/@Elibensasson/ryMelVulp)).

Satoshi's creation, Bitcoin, introduced a novel approach for these functions, termed an _integrity web_. This is an infrastructure for societal roles that:

Satoshi's creation, Bitcoin, introduced a novel approach for these functions, termed an *integrity web*. This is an infrastructure for societal roles that:
1. Is openly described by a public protocol.
2. Operates over a wide, inclusive, peer-to-peer network.
3. Distributes value fairly and extensively to maintain societal consensus on its integrity.
Expand All @@ -29,55 +30,57 @@ Starknet bridges the gap between scalability and broad consensus. It integrates

## Starknet’s Mission

*Starknet’s mission is to allow individuals to freely implement and use any social function they desire.*
_Starknet’s mission is to allow individuals to freely implement and use any social function they desire._

## Starknet’s Values

Starknet's ethos is anchored in core principles ([Eli Ben-Sasson, Bareli, Brandt, Volokh, 2023](https://hackmd.io/@Elibensasson/ryMelVulp)):

- **Lasting Broadness.** Starknet continuously resists power consolidation. Key points include:
- Broad power distribution underpins Starknet's legitimacy and must persist across operations and decision-making. While centralized operation may be necessary at times, it should be short-lived.
- Starknet's protocol and governance should always be open and transparent.
- Governance should bolster inclusivity, with a flexible structure that can evolve to ensure enduring inclusivity.

- Broad power distribution underpins Starknet's legitimacy and must persist across operations and decision-making. While centralized operation may be necessary at times, it should be short-lived.
- Starknet's protocol and governance should always be open and transparent.
- Governance should bolster inclusivity, with a flexible structure that can evolve to ensure enduring inclusivity.

- **Neutrality.** Starknet remains impartial to the societal functions it supports.
- The objectives and ethos of functions on Starknet lie with their creators.
- **Censorship resistance:** Starknet remains agnostic to the nature and meaning of user transactions.

- The objectives and ethos of functions on Starknet lie with their creators.
- **Censorship resistance:** Starknet remains agnostic to the nature and meaning of user transactions.

- **Individual Empowerment.** At its core, Starknet thrives on a well-informed and autonomous user base. This is achieved by fostering a culture rooted in its core mission and values, with a strong emphasis on education.

## Key Features

These are some key features of Starknet:

- Low Costs: Transactions on Starknet cost less than on Ethereum.
Future updates like Volition and EIP 4844 will make it even cheaper.
- 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
decentralized apps using its native language, Cairo.
- Developer-Friendly: Starknet lets developers easily build
decentralized apps using its native language, Cairo.

- Speed and Efficiency: Upcoming releases aim to make transactions
even faster and cheaper.
- 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), that allow us to innovate beyond the Ethereum Virtual Machine
(EVM) and create a new paradigm for decentralized applications.
- 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 some of them:

- Account Abstraction: Implemented at the protocol level, this
facilitates diverse signing schemes while ensuring user security and
self-custody of assets.
- 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
developers to regulate data availability on Ethereum (L1) or on
Starknet (L2). Reducing L1 onchain data can radically reduce costs.
- 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
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
transactions, enhancing user accessibility.
- 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
transactions, enhancing user accessibility.

## Cairo: The Language of Starknet

Expand All @@ -92,26 +95,26 @@ conveniently.

### Why Choose Cairo?

Cairo is designed for *Provable Computation,* a new paradigm that lets
Cairo is designed for _Provable Computation,_ a new paradigm that lets
programs prove their correctness without re-running them. Here’s why it
stands out:

- Purpose-Built: Designed specifically for smart contracts.
- Purpose-Built: Designed specifically for smart contracts.

- No EVM Limits: Goes beyond what the Ethereum Virtual Machine can do.
- No EVM Limits: Goes beyond what the Ethereum Virtual Machine can do.

- Flexibility: Uses traits for more flexibility than inheritance.
- Flexibility: Uses traits for more flexibility than inheritance.

## Governance

The Starknet Foundation oversees Starknet’s governance. Its duties
include:

- Managing Starknet’s development and operations
- Managing Starknet’s development and operations

- Overseeing the Starknet DAO, which enables community involvement
- Overseeing the Starknet DAO, which enables community involvement

- Setting rules to maintain network integrity
- Setting rules to maintain network integrity

Our focus is on technical input and debate for improving the protocol.
While we value all perspectives, it’s often the technical insights that
Expand All @@ -120,13 +123,12 @@ steer us forward.
Members can influence Starknet by voting on changes. Here’s the process:
A new version is tested on the Goerli Testnet. Members then have six
days to review it. A Snapshot proposal is made, and the community votes.
A majority of *YES* votes means an upgrade to the Mainnet.
A majority of _YES_ votes means an upgrade to the Mainnet.

In short, governance is key to Starknet’s evolution.

To propose an improvement, create a SNIP.


### SNIP: StarkNet Improvement Proposals

SNIP is short for StarkNet Improvement Proposal. It’s essentially a
Expand Down Expand Up @@ -159,21 +161,18 @@ suggestions—they’re a roadmap. It’s beneficial for implementers to keep
a list of the SNIPs they’ve executed. This transparency helps users
gauge the state of a particular implementation or software library.


## Learning Resources

For deeper insights into Starknet and Cairo:

- [The Starknet Book](https://book.starknet.io): For mastering
Starknet
- [The Starknet Book](https://book.starknet.io): For mastering
Starknet

- [The Cairo Book](https://cairo-book.github.io/): For mastering Cairo
- [The Cairo Book](https://cairo-book.github.io/): For mastering Cairo

- [Starklings](https://github.com/shramee/starklings-cairo1):
Practical tutorials and examples
- [Starklings](https://github.com/shramee/starklings-cairo1):
Practical tutorials and examples

## Conclusion

In decentralized technology, Starknet offers a solution to challenges that previous systems encountered. It's based on established *protocols* and *registries*, following the initial concepts introduced by figures such as Satoshi. Through a specific mathematical method, Starknet seeks a balance between scalability and consensus. As this technology progresses, Starknet adheres to principles of inclusivity, neutrality, and user empowerment. It's poised for continuous adaptation and improvement in the field.


In decentralized technology, Starknet offers a solution to challenges that previous systems encountered. It's based on established _protocols_ and _registries_, following the initial concepts introduced by figures such as Satoshi. Through a specific mathematical method, Starknet seeks a balance between scalability and consensus. As this technology progresses, Starknet adheres to principles of inclusivity, neutrality, and user empowerment. It's poised for continuous adaptation and improvement in the field.
Loading