diff --git a/listings/applications/components/Scarb.toml b/listings/applications/components/Scarb.toml index be98c7a1..afa1fd51 100644 --- a/listings/applications/components/Scarb.toml +++ b/listings/applications/components/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "components" version.workspace = true -edition = '2024_07' +edition = "2024_07" [lib] diff --git a/listings/applications/components_dependencies/Scarb.toml b/listings/applications/components_dependencies/Scarb.toml index 4f461fe7..27d39111 100644 --- a/listings/applications/components_dependencies/Scarb.toml +++ b/listings/applications/components_dependencies/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "components_dependencies" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/applications/constant_product_amm/Scarb.toml b/listings/applications/constant_product_amm/Scarb.toml index 6dc35d8d..4a798451 100644 --- a/listings/applications/constant_product_amm/Scarb.toml +++ b/listings/applications/constant_product_amm/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "constant_product_amm" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/applications/erc20/Scarb.toml b/listings/applications/erc20/Scarb.toml index 1aeedbc6..81a90227 100644 --- a/listings/applications/erc20/Scarb.toml +++ b/listings/applications/erc20/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "erc20" version.workspace = true -edition = '2024_07' +edition = "2024_07" [lib] diff --git a/listings/applications/nft_dutch_auction/Scarb.toml b/listings/applications/nft_dutch_auction/Scarb.toml index 083bd71e..667098d4 100644 --- a/listings/applications/nft_dutch_auction/Scarb.toml +++ b/listings/applications/nft_dutch_auction/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "nft_dutch_auction" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] erc20 = { path = "../erc20" } diff --git a/listings/applications/nft_dutch_auction/src/erc721.cairo b/listings/applications/nft_dutch_auction/src/erc721.cairo index 0b0bca00..b18c6a05 100644 --- a/listings/applications/nft_dutch_auction/src/erc721.cairo +++ b/listings/applications/nft_dutch_auction/src/erc721.cairo @@ -25,7 +25,10 @@ mod ERC721 { // library imports //////////////////////////////// use starknet::{ContractAddress, get_caller_address}; - use starknet::storage::{Map, StorageMapReadAccess, StorageMapWriteAccess, StoragePointerReadAccess, StoragePointerWriteAccess}; + use starknet::storage::{ + Map, StorageMapReadAccess, StorageMapWriteAccess, StoragePointerReadAccess, + StoragePointerWriteAccess + }; use core::num::traits::Zero; //////////////////////////////// @@ -163,7 +166,7 @@ mod ERC721 { } //////////////////////////////// - // set_approval_for_all function approves an operator to spend all tokens + // set_approval_for_all function approves an operator to spend all tokens //////////////////////////////// fn set_approval_for_all( ref self: ContractState, operator: ContractAddress, approved: bool diff --git a/listings/applications/nft_dutch_auction/src/nft_dutch_auction.cairo b/listings/applications/nft_dutch_auction/src/nft_dutch_auction.cairo index c72634a8..f139c2b1 100644 --- a/listings/applications/nft_dutch_auction/src/nft_dutch_auction.cairo +++ b/listings/applications/nft_dutch_auction/src/nft_dutch_auction.cairo @@ -235,7 +235,7 @@ mod tests { assert_eq!(buyer_bal_after_buy, buyer_bal_before_buy - nft_price); assert_eq!(erc721_dispatcher.owner_of(nft_id_1), buyer); - // Forward block timestamp in order for a reduced nft price + // Forward block timestamp in order for a reduced nft price let forward_blocktime_by = 4000; // milliseconds cheat_block_timestamp(nft_auction_address, forward_blocktime_by, CheatSpan::TargetCalls(1)); @@ -277,7 +277,7 @@ mod tests { erc20_dispatcher.approve(nft_auction_address, nft_price); nft_auction_dispatcher.buy(nft_id_1); - // Forward block timestamp in order for a reduced nft price + // Forward block timestamp in order for a reduced nft price let forward_blocktime_by = 4000; // 4 seconds (in milliseconds) cheat_block_timestamp(nft_auction_address, forward_blocktime_by, CheatSpan::TargetCalls(1)); @@ -322,7 +322,7 @@ mod tests { nft_auction_dispatcher.buy(nft_id_1); // Forward block timestamp to a time after duration has ended - // During deployment, duration was set to 60 seconds + // During deployment, duration was set to 60 seconds let forward_blocktime_by = 61000; // 61 seconds (in milliseconds) cheat_block_timestamp(nft_auction_address, forward_blocktime_by, CheatSpan::TargetCalls(1)); diff --git a/listings/applications/simple_vault/Scarb.toml b/listings/applications/simple_vault/Scarb.toml index 5fe57ff5..11d2642c 100644 --- a/listings/applications/simple_vault/Scarb.toml +++ b/listings/applications/simple_vault/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "simple_vault" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/applications/staking/Scarb.toml b/listings/applications/staking/Scarb.toml index 3dcb0110..93510593 100644 --- a/listings/applications/staking/Scarb.toml +++ b/listings/applications/staking/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "staking" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/applications/upgradeable_contract/Scarb.toml b/listings/applications/upgradeable_contract/Scarb.toml index 1f90d664..c4dcec0d 100644 --- a/listings/applications/upgradeable_contract/Scarb.toml +++ b/listings/applications/upgradeable_contract/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "upgradeable_contract" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/bytearray/Scarb.toml b/listings/getting-started/bytearray/Scarb.toml index f387be8b..21e61cdd 100644 --- a/listings/getting-started/bytearray/Scarb.toml +++ b/listings/getting-started/bytearray/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "bytearray" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/cairo_cheatsheet/Scarb.toml b/listings/getting-started/cairo_cheatsheet/Scarb.toml index 98a86560..b1ec0393 100644 --- a/listings/getting-started/cairo_cheatsheet/Scarb.toml +++ b/listings/getting-started/cairo_cheatsheet/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "cairo_cheatsheet" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/calling_other_contracts/Scarb.toml b/listings/getting-started/calling_other_contracts/Scarb.toml index c140f0df..f1727dbd 100644 --- a/listings/getting-started/calling_other_contracts/Scarb.toml +++ b/listings/getting-started/calling_other_contracts/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "calling_other_contracts" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/constructor/Scarb.toml b/listings/getting-started/constructor/Scarb.toml index edd510a9..8235973e 100644 --- a/listings/getting-started/constructor/Scarb.toml +++ b/listings/getting-started/constructor/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "constructor" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/counter/Scarb.toml b/listings/getting-started/counter/Scarb.toml index 403b142f..1a78d653 100644 --- a/listings/getting-started/counter/Scarb.toml +++ b/listings/getting-started/counter/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "counter" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/custom_type_serde/Scarb.toml b/listings/getting-started/custom_type_serde/Scarb.toml index af3351af..5414b1dd 100644 --- a/listings/getting-started/custom_type_serde/Scarb.toml +++ b/listings/getting-started/custom_type_serde/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "custom_type_serde" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/errors/Scarb.toml b/listings/getting-started/errors/Scarb.toml index 10fd51a8..2b8cc106 100644 --- a/listings/getting-started/errors/Scarb.toml +++ b/listings/getting-started/errors/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "errors" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/events/Scarb.toml b/listings/getting-started/events/Scarb.toml index 97e17fd7..58d641fa 100644 --- a/listings/getting-started/events/Scarb.toml +++ b/listings/getting-started/events/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "events" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/factory/Scarb.toml b/listings/getting-started/factory/Scarb.toml index 3e73755c..5df9fd4c 100644 --- a/listings/getting-started/factory/Scarb.toml +++ b/listings/getting-started/factory/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "factory" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/interfaces_traits/Scarb.toml b/listings/getting-started/interfaces_traits/Scarb.toml index 0b3b07e8..94a47b46 100644 --- a/listings/getting-started/interfaces_traits/Scarb.toml +++ b/listings/getting-started/interfaces_traits/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "interfaces_traits" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/mappings/Scarb.toml b/listings/getting-started/mappings/Scarb.toml index 7a5d07d9..a1f50323 100644 --- a/listings/getting-started/mappings/Scarb.toml +++ b/listings/getting-started/mappings/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "mappings" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/storage/Scarb.toml b/listings/getting-started/storage/Scarb.toml index 5a24326f..caf77195 100644 --- a/listings/getting-started/storage/Scarb.toml +++ b/listings/getting-started/storage/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "storage" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/storage/src/minimal_contract.cairo b/listings/getting-started/storage/src/minimal_contract.cairo index 28128fc7..22bb7ccc 100644 --- a/listings/getting-started/storage/src/minimal_contract.cairo +++ b/listings/getting-started/storage/src/minimal_contract.cairo @@ -17,7 +17,7 @@ mod test { Contract::TEST_CLASS_HASH.try_into().unwrap(), 0, array![].span(), false ) .unwrap_syscall(); - // Not much to test + // Not much to test } } diff --git a/listings/getting-started/storing_custom_types/Scarb.toml b/listings/getting-started/storing_custom_types/Scarb.toml index 3ed28c0f..4a949d4f 100644 --- a/listings/getting-started/storing_custom_types/Scarb.toml +++ b/listings/getting-started/storing_custom_types/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "storing_custom_types" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/testing_how_to/Scarb.toml b/listings/getting-started/testing_how_to/Scarb.toml index 54f3e12f..5046ee3d 100644 --- a/listings/getting-started/testing_how_to/Scarb.toml +++ b/listings/getting-started/testing_how_to/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "testing_how_to" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/variables/Scarb.toml b/listings/getting-started/variables/Scarb.toml index bcf5c21f..4b6f31b2 100644 --- a/listings/getting-started/variables/Scarb.toml +++ b/listings/getting-started/variables/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "variables" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/listings/getting-started/variables/src/global_variables.cairo b/listings/getting-started/variables/src/global_variables.cairo index 1389bdaf..1e808e50 100644 --- a/listings/getting-started/variables/src/global_variables.cairo +++ b/listings/getting-started/variables/src/global_variables.cairo @@ -17,7 +17,7 @@ pub mod GlobalExample { fn foo(ref self: ContractState) { // Call the get_caller_address function to get the sender address let _caller = get_caller_address(); - // ... + // ... } } } @@ -34,6 +34,6 @@ mod test { GlobalExample::TEST_CLASS_HASH.try_into().unwrap(), 0, array![].span(), false ) .unwrap_syscall(); - // Not much to test + // Not much to test } } diff --git a/listings/getting-started/variables/src/local_variables.cairo b/listings/getting-started/variables/src/local_variables.cairo index 2bcd195d..4b2bcac5 100644 --- a/listings/getting-started/variables/src/local_variables.cairo +++ b/listings/getting-started/variables/src/local_variables.cairo @@ -22,7 +22,7 @@ pub mod LocalVariablesExample { let sum = value + increment; sum } - // We can't access the variable `sum` here, as it's out of scope. + // We can't access the variable `sum` here, as it's out of scope. } } } diff --git a/listings/getting-started/variables/src/storage_variables.cairo b/listings/getting-started/variables/src/storage_variables.cairo index 61d8d358..864c9175 100644 --- a/listings/getting-started/variables/src/storage_variables.cairo +++ b/listings/getting-started/variables/src/storage_variables.cairo @@ -37,8 +37,8 @@ pub mod StorageVariablesExample { #[cfg(test)] mod test { use super::{ - StorageVariablesExample, - IStorageVariableExampleDispatcher, IStorageVariableExampleDispatcherTrait + StorageVariablesExample, IStorageVariableExampleDispatcher, + IStorageVariableExampleDispatcherTrait }; use starknet::{SyscallResultTrait, syscalls::deploy_syscall}; use starknet::testing::set_contract_address; diff --git a/listings/getting-started/visibility/Scarb.toml b/listings/getting-started/visibility/Scarb.toml index fea47954..aeadb2ef 100644 --- a/listings/getting-started/visibility/Scarb.toml +++ b/listings/getting-started/visibility/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "visibility" version.workspace = true -edition = '2024_07' +edition = "2024_07" [dependencies] starknet.workspace = true diff --git a/src/starknet-by-example.md b/src/starknet-by-example.md index 9a1b1f7d..1dcc4f45 100644 --- a/src/starknet-by-example.md +++ b/src/starknet-by-example.md @@ -37,6 +37,6 @@ The current version this book uses: ``` cairo 2.6.3 -edition = '2024_07' +edition = "2024_07" {{#include ../.tool-versions}} ```