Skip to content

Commit

Permalink
chore: update LegacyMap to Map #224 (#226)
Browse files Browse the repository at this point in the history
* Issue Update Starknet Exercises `LegacyMap` to `Map`  #224

* chore: tiny comment update

---------

Co-authored-by: Shramee Srivastav <[email protected]>
  • Loading branch information
bengineer42 and shramee authored Sep 23, 2024
1 parent 2b160f0 commit 69caab7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions exercises/starknet/basics/starknet3.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ trait IProgressTracker<TContractState> {
mod ProgressTracker {
use starknet::ContractAddress;
use starknet::get_caller_address; // Required to use get_caller_address function

use storage::StoragePointerReadAccess;
use storage::StoragePointerWriteAccess;
use storage::StoragePathEntry;
use storage::Map;

#[storage]
struct Storage {
contract_owner: ContractAddress,
// TODO: Set types for LegacyMap
progress: LegacyMap<>
// TODO: Set types for Map
progress: Map<>
}

#[constructor]
Expand Down
2 changes: 1 addition & 1 deletion info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ name = "starknet4"
path = "exercises/starknet/basics/starknet4.cairo"
mode = "test"
hint = """
You can use LegacyMap<felt252, u32> for inventory.
You can use Map<felt252, u32> for inventory.
"""

[[exercises]]
Expand Down

0 comments on commit 69caab7

Please sign in to comment.