Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor _Scarb.toml_ refactors #251

Merged
merged 10 commits into from
Oct 24, 2024
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why many packages don't have assert_macros declared in their tomls, and yet they work just fine.
AFAIK this package should be declared explicitly from 2.8.1 at least

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert_macros is included in cairo_test
However cairo_test is not compatible with starknet foundry, so for listing using snforge we have to explicitly import it.
See Adding a new Cairo program

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