Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into erc721
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNeshi committed Oct 24, 2024
2 parents aa3c4a2 + 024cd07 commit fef0cd3
Show file tree
Hide file tree
Showing 100 changed files with 3,201 additions and 1,050 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
scarb 2.8.2
starknet-foundry 0.30.0
starknet-foundry 0.30.0
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ version.workspace = true

[dependencies]
starknet.workspace = true
snforge_std.workspace = true
# Uncomment the following lines if you want to use additional dependencies:
# OpenZeppelin:
# openzeppelin.workspace = true
Expand All @@ -122,6 +121,7 @@ snforge_std.workspace = true

[dev-dependencies]
assert_macros.workspace = true
snforge_std.workspace = true

[scripts]
test.workspace = true
Expand Down Expand Up @@ -200,7 +200,7 @@ c
Then, in the markdown file, you can use the following syntax to include only the code between the delimiting comments:

````markdown
````rust
````cairo
{{#include ../../listings/path/to/listing/src/contract.cairo:anchor_name}}
\```
````
Expand All @@ -215,7 +215,7 @@ b
Using `#rustdoc_include` you can have the same result, but users can expand the code in the book to see the whole file (used for showing tests):
````markdown
````rust
````cairo
{{#rustdoc_include ../../listings/path/to/listing/src/contract.cairo:anchor_name}}
\```
````
Expand Down
1 change: 1 addition & 0 deletions Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ homepage = "https://www.nethermind.io/"
license = "MIT"
authors = ["julio4", "msaug"]
version = "0.1.0"
edition = "2024_07"

[tool]
snforge.workspace = true
8 changes: 7 additions & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ title = "Starknet by Example"
[build]
extra-watch-dirs = ["listings", "po"]

[preprocessor.gettext]
[preprocessor.cairo]
after = ["links"]

[preprocessor.gettext]
after = ["cairo"]

[preprocessor.last-changed]
command = "mdbook-last-changed"
renderer = ["html"]

[output.html.code.hidelines]
cairo = "# "

[output.html]
git-repository-url = "https://github.com/NethermindEth/StarknetByExample"
edit-url-template = "https://github.com/NethermindEth/StarknetByExample/edit/main/{path}"
Expand Down
2 changes: 1 addition & 1 deletion listings/advanced-concepts/ecdsa_verification/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ecdsa_verification"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "hash_solidity_compatible"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/advanced-concepts/hash_trait/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "hash_trait"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/advanced-concepts/library_calls/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "library_calls"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/advanced-concepts/simple_account/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "simple_account"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/advanced-concepts/store_using_packing/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "store_using_packing"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "struct_as_mapping_key"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/advanced-concepts/write_to_any_slot/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "write_to_any_slot"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
5 changes: 2 additions & 3 deletions listings/applications/advanced_factory/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
[package]
name = "advanced_factory"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
components.workspace = true
snforge_std.workspace = true
crowdfunding = { path = "../crowdfunding" }

[dev-dependencies]
assert_macros.workspace = true
snforge_std.workspace = true

[scripts]
test.workspace = true

[[target.starknet-contract]]
casm = true
build-external-contracts = ["crowdfunding::campaign::Campaign"]
6 changes: 2 additions & 4 deletions listings/applications/coin_flip/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
[package]
name = "coin_flip"
version.workspace = true
edition = "2024_07"

[lib]
edition.workspace = true

[dependencies]
starknet.workspace = true
openzeppelin.workspace = true
pragma_lib.workspace = true
snforge_std.workspace = true

[dev-dependencies]
assert_macros.workspace = true
snforge_std.workspace = true

[scripts]
test.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/applications/components/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "components"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[lib]

Expand Down
2 changes: 1 addition & 1 deletion listings/applications/components_dependencies/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "components_dependencies"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/applications/constant_product_amm/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "constant_product_amm"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions listings/applications/crowdfunding/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[package]
name = "crowdfunding"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[lib]

[dependencies]
starknet.workspace = true
openzeppelin.workspace = true
components.workspace = true
snforge_std.workspace = true

[dev-dependencies]
assert_macros.workspace = true
snforge_std.workspace = true

[scripts]
test.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/applications/erc20/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "erc20"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[lib]

Expand Down
2 changes: 1 addition & 1 deletion listings/applications/merkle_tree/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "merkle_tree"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions listings/applications/nft_dutch_auction/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "nft_dutch_auction"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
erc20 = { path = "../erc20" }
starknet.workspace = true
snforge_std.workspace = true

[dev-dependencies]
assert_macros.workspace = true
snforge_std.workspace = true

[scripts]
test.workspace = true
Expand Down
4 changes: 1 addition & 3 deletions listings/applications/simple_storage_starknetjs/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
[package]
name = "simple_storage"
version.workspace = true
edition = "2024_07"

[lib]
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/applications/simple_vault/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "simple_vault"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/applications/staking/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "staking"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
5 changes: 2 additions & 3 deletions listings/applications/timelock/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
[package]
name = "timelock"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
snforge_std.workspace = true
openzeppelin.workspace = true
components.workspace = true

[dev-dependencies]
assert_macros.workspace = true
snforge_std.workspace = true

[scripts]
test.workspace = true

[[target.starknet-contract]]
casm = true
2 changes: 1 addition & 1 deletion listings/applications/upgradeable_contract/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "upgradeable_contract"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/getting-started/bytearray/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "bytearray"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/getting-started/cairo_cheatsheet/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cairo_cheatsheet"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "calling_other_contracts"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/getting-started/constructor/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "constructor"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/getting-started/counter/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "counter"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/getting-started/custom_type_serde/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "custom_type_serde"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/getting-started/errors/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "errors"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion listings/getting-started/events/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "events"
version.workspace = true
edition = "2024_07"
edition.workspace = true

[dependencies]
starknet.workspace = true
Expand Down
Loading

0 comments on commit fef0cd3

Please sign in to comment.