From 53812bbc54f91f98a4a87d42ae6ccfc69c5e168a Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 22 May 2024 23:29:40 +0200 Subject: [PATCH] update starknet-foundry to v0.24 --- .tool-versions | 2 +- Scarb.toml | 2 +- tests/erc721_dynamic_traits.cairo | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.tool-versions b/.tool-versions index 1a58ae3..c62bafc 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ scarb 2.6.4 -starknet-foundry 0.23.0 +starknet-foundry 0.24.0 diff --git a/Scarb.toml b/Scarb.toml index c872ce6..fd2a980 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -15,7 +15,7 @@ starknet = "2.6.3" openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.13.0" } [dev-dependencies] -snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.23.0" } +snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.24.0" } [scripts] test = "snforge test" diff --git a/tests/erc721_dynamic_traits.cairo b/tests/erc721_dynamic_traits.cairo index 2b4178a..964aeef 100644 --- a/tests/erc721_dynamic_traits.cairo +++ b/tests/erc721_dynamic_traits.cairo @@ -1,6 +1,6 @@ use core::panic_with_felt252; use snforge_std::{ - test_address, start_prank, CheatTarget, spy_events, SpyOn, EventSpy, EventAssertions + test_address, cheat_caller_address, CheatSpan, spy_events, SpyOn, EventSpy, EventAssertions }; use openzeppelin::tests::utils::constants::{TOKEN_ID, TOKEN_ID_2, OTHER, BASE_URI_2}; use openzeppelin::access::ownable::OwnableComponent; @@ -48,7 +48,7 @@ fn test_returns_value_set() { #[test] fn test_only_owner_can_set_values() { let dynamic_traits_test = DynamicTraitsTestTrait::setup(); - start_prank(CheatTarget::One(dynamic_traits_test.contract_address), OTHER()); + cheat_caller_address(dynamic_traits_test.contract_address, OTHER(), CheatSpan::TargetCalls(1)); match dynamic_traits_test.token_safe.set_trait(0, 'test', 'test') { Result::Ok(_) => panic_with_felt252('FAIL'), Result::Err(panic_data) => { @@ -100,7 +100,7 @@ fn test_get_and_set_trait_metadata_uri() { ] ); assert_eq!(dynamic_traits_test.token.get_trait_metadata_uri(), BASE_URI_2()); - start_prank(CheatTarget::One(dynamic_traits_test.contract_address), OTHER()); + cheat_caller_address(dynamic_traits_test.contract_address, OTHER(), CheatSpan::TargetCalls(1)); match dynamic_traits_test.token_safe.set_trait_metadata_uri(BASE_URI_2()) { Result::Ok(_) => panic_with_felt252('FAIL'), Result::Err(panic_data) => {