Skip to content
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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pub mod cheat_caller_address;
pub mod cheat_execution_info;
pub mod cheat_sequencer_address;
pub mod declare;
pub mod deploy;
pub mod generate_random_felt;
pub mod get_class_hash;
pub mod l1_handler_execute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl<'a> ExtensionLogic for ForgeExtension<'a> {

let contract_name: String = input_reader.read::<ByteArray>()?.to_string();

handle_declare_deploy_result(declare(*state, &contract_name, self.contracts_data))
handle_declare_result(declare(*state, &contract_name, self.contracts_data))
}
// Internal cheatcode used to pass a contract address when calling `deploy_at`.
"set_deploy_at_address" => {
Expand Down Expand Up @@ -554,7 +554,7 @@ enum SignError {
HashOutOfRange,
}

fn handle_declare_deploy_result<T: CairoSerialize>(
fn handle_declare_result<T: CairoSerialize>(
declare_result: Result<T, CheatcodeError>,
) -> Result<CheatcodeHandlingResult, EnhancedHintError> {
let result = match declare_result {
Expand Down
172 changes: 0 additions & 172 deletions crates/cheatnet/tests/cheatcodes/deploy.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/cheatnet/tests/cheatcodes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ mod cheat_caller_address;
mod cheat_execution_info;
mod cheat_sequencer_address;
mod declare;
mod deploy;
mod generate_random_felt;
mod get_class_hash;
mod load;
Expand Down
34 changes: 0 additions & 34 deletions crates/cheatnet/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ use cheatnet::runtime_extensions::call_to_blockifier_runtime_extension::rpc::{
CallFailure, CallResult,
};
use cheatnet::runtime_extensions::common::create_execute_calldata;
use cheatnet::runtime_extensions::forge_runtime_extension::cheatcodes::CheatcodeError;
use cheatnet::runtime_extensions::forge_runtime_extension::cheatcodes::declare::declare;
use cheatnet::runtime_extensions::forge_runtime_extension::cheatcodes::deploy::deploy_at;
use cheatnet::runtime_extensions::forge_runtime_extension::contracts_data::ContractsData;
use cheatnet::state::CheatnetState;
use conversions::IntoConv;
Expand Down Expand Up @@ -160,38 +158,6 @@ pub fn deploy(
contract_address
}

pub fn deploy_at_wrapper(
state: &mut dyn State,
cheatnet_state: &mut CheatnetState,
class_hash: &ClassHash,
calldata: &[Felt],
contract_address: ContractAddress,
) -> Result<ContractAddress, CheatcodeError> {
let mut entry_point_execution_context = build_context(
&cheatnet_state.block_info,
None,
&TrackedResource::CairoSteps,
);
let hints = HashMap::new();

let mut syscall_hint_processor = build_syscall_hint_processor(
&CallEntryPoint::default(),
state,
&mut entry_point_execution_context,
&hints,
);

let (contract_address, _retdata) = deploy_at(
&mut syscall_hint_processor,
cheatnet_state,
class_hash,
calldata,
contract_address,
)?;

Ok(contract_address)
}

fn deploy_helper(
syscall_handler: &mut SyscallHintProcessor,
cheatnet_state: &mut CheatnetState,
Expand Down
Loading