From dc64578472bc3ac12bc90fee5a5a5daeb03250a4 Mon Sep 17 00:00:00 2001 From: Radinyn Date: Wed, 2 Aug 2023 10:47:30 +0200 Subject: [PATCH] Works with new Starknet Foundry --- Scarb.toml | 2 +- tests/test_deployment.cairo | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Scarb.toml b/Scarb.toml index af127f8..54d40d0 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -9,4 +9,4 @@ casm-add-pythonic-hints = true allowed-libfuncs-list.name = "all" [dependencies] -starknet = "2.0.1" \ No newline at end of file +starknet = "2.1.0-rc2" \ No newline at end of file diff --git a/tests/test_deployment.cairo b/tests/test_deployment.cairo index 05c6541..8d476c4 100644 --- a/tests/test_deployment.cairo +++ b/tests/test_deployment.cairo @@ -27,22 +27,20 @@ trait IRouterC1 { fn test_deployment_pair_factory_router() { // TODO Separate out once setup is available. let deployer_address = 123456789987654321; - let declared_pair_class_hash = declare('PairC1').unwrap(); + let declared_pair_class_hash = declare('PairC1'); let mut factory_constructor_calldata = Default::default(); Serde::serialize(@declared_pair_class_hash, ref factory_constructor_calldata); Serde::serialize(@deployer_address, ref factory_constructor_calldata); - let factory_class_hash = declare('FactoryC1').unwrap(); + let factory_class_hash = declare('FactoryC1'); let factory_prepared = PreparedContract { class_hash: factory_class_hash, constructor_calldata: @factory_constructor_calldata }; let factory_address = deploy(factory_prepared).unwrap(); - let factory_address: ContractAddress = factory_address.try_into().unwrap(); let mut router_constructor_calldata = Default::default(); Serde::serialize(@factory_address, ref router_constructor_calldata); - let router_class_hash = declare('RouterC1').unwrap(); + let router_class_hash = declare('RouterC1'); let router_prepared = PreparedContract { class_hash: router_class_hash, constructor_calldata: @router_constructor_calldata }; let router_address = deploy(router_prepared).unwrap(); - let router_address: ContractAddress = router_address.try_into().unwrap(); // Create a Dispatcher object that will allow interacting with the deployed contract let router_dispatcher = IRouterC1Dispatcher { contract_address: router_address };