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

Adapt project to the new Starknet Foundry #38

Open
wants to merge 1 commit into
base: 31-upgrade-to-cairo-10
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ casm-add-pythonic-hints = true
allowed-libfuncs-list.name = "all"

[dependencies]
starknet = "2.0.1"
starknet = "2.1.0-rc2"
8 changes: 3 additions & 5 deletions tests/test_deployment.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,20 @@ trait IRouterC1<T> {
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 };
Expand Down