Skip to content

Commit

Permalink
Minor _Scarb.toml_ refactors (#251)
Browse files Browse the repository at this point in the history
* Set one common edition version in workspace Scarb.toml

* move snforge_std to dev-deps

* Remove [lib] from coin_flip and simple_storage_starknetjs

* rebuild projects

* remove casm attr from scarb.toml

* Update foundry to 0.31.0 in tool-versions

* Set workspace cairo_test in mappings

* Add missing cairo_test.workspace attrbs to Scarb.tomls

* Revert snforge_std to 0.30.0

* Revert "Add missing cairo_test.workspace attrbs to Scarb.tomls"

This reverts commit 7a9131d.
  • Loading branch information
0xNeshi authored Oct 24, 2024
1 parent 7e8358e commit 024cd07
Show file tree
Hide file tree
Showing 41 changed files with 47 additions and 52 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
2 changes: 1 addition & 1 deletion 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
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
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
2 changes: 1 addition & 1 deletion listings/getting-started/factory/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "factory"
version.workspace = true
edition = "2024_07"
edition.workspace = true

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

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

[dependencies]
starknet.workspace = true

[dev-dependencies]
cairo_test = "2.7.1"
cairo_test.workspace = true

[scripts]
test.workspace = true
Expand Down
Loading

0 comments on commit 024cd07

Please sign in to comment.