Skip to content

Commit

Permalink
feat : added debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ocdbytes committed Dec 4, 2024
1 parent 14b905a commit ecb6a42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ pub async fn setup_l2(config_file: &ConfigFile, clients: &Clients) -> Bootstrapp
let account = get_account(clients, config_file).await;

let core_contract_client = get_core_contract_client(config_file, clients);

println!(">>> get core contract client done");
// setup eth bridge
let eth_bridge_setup_outputs =
setup_eth_bridge(Some(account.clone()), &core_contract_client, config_file, clients).await;
Expand Down
8 changes: 8 additions & 0 deletions src/setup_scripts/account_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ pub async fn account_init<'a>(clients: &'a Clients, arg_config: &'a ConfigFile)

log::info!("Waiting for block to be mined [/]");
sleep(Duration::from_secs(10)).await;
println!(">>> wait done");

let account_address_temp =
deploy_account_using_priv_key(TEMP_ACCOUNT_PRIV_KEY.to_string(), clients.provider_l2(), oz_account_class_hash)
.await;
println!(">>> account address temp deployed");
sleep(Duration::from_secs(10)).await;
println!(">>> wait done");

let user_account_temp = build_single_owner_account(
clients.provider_l2(),
Expand All @@ -39,15 +42,18 @@ pub async fn account_init<'a>(clients: &'a Clients, arg_config: &'a ConfigFile)
false,
)
.await;
println!(">>> temp account built");
let oz_account_caio_1_class_hash = declare_contract(DeclarationInput::DeclarationInputs(
String::from(OZ_ACCOUNT_SIERRA_PATH),
String::from(OZ_ACCOUNT_CASM_PATH),
user_account_temp.clone(),
))
.await;
println!(">>> oz_account_caio_1_class_hash declared");
save_to_json("oz_account_caio_1_class_hash", &JsonValueType::StringType(oz_account_caio_1_class_hash.to_string()))
.unwrap();
sleep(Duration::from_secs(10)).await;
println!(">>> wait done");
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

// Using Account Cairo 1 contract
Expand All @@ -58,7 +64,9 @@ pub async fn account_init<'a>(clients: &'a Clients, arg_config: &'a ConfigFile)
oz_account_caio_1_class_hash,
)
.await;
println!(">>> cairo 1 account declared");
save_to_json("account_address", &JsonValueType::StringType(account_address.to_string())).unwrap();
println!(">>> account init done.");
build_single_owner_account(
clients.provider_l2(),
&arg_config.rollup_priv_key,
Expand Down

0 comments on commit ecb6a42

Please sign in to comment.