Skip to content

Commit d95ad3b

Browse files
committed
Remove deploy_at cheatnet tests
Closes #3659 commit-id:558e11b5
1 parent d6d54b9 commit d95ad3b

File tree

6 files changed

+2
-283
lines changed

6 files changed

+2
-283
lines changed

crates/cheatnet/src/runtime_extensions/forge_runtime_extension/cheatcodes/deploy.rs

Lines changed: 0 additions & 73 deletions
This file was deleted.

crates/cheatnet/src/runtime_extensions/forge_runtime_extension/cheatcodes/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ pub mod cheat_caller_address;
1010
pub mod cheat_execution_info;
1111
pub mod cheat_sequencer_address;
1212
pub mod declare;
13-
pub mod deploy;
1413
pub mod generate_random_felt;
1514
pub mod get_class_hash;
1615
pub mod l1_handler_execute;

crates/cheatnet/src/runtime_extensions/forge_runtime_extension/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ impl<'a> ExtensionLogic for ForgeExtension<'a> {
187187

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

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

557-
fn handle_declare_deploy_result<T: CairoSerialize>(
557+
fn handle_declare_result<T: CairoSerialize>(
558558
declare_result: Result<T, CheatcodeError>,
559559
) -> Result<CheatcodeHandlingResult, EnhancedHintError> {
560560
let result = match declare_result {

crates/cheatnet/tests/cheatcodes/deploy.rs

Lines changed: 0 additions & 172 deletions
This file was deleted.

crates/cheatnet/tests/cheatcodes/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ mod cheat_caller_address;
77
mod cheat_execution_info;
88
mod cheat_sequencer_address;
99
mod declare;
10-
mod deploy;
1110
mod generate_random_felt;
1211
mod get_class_hash;
1312
mod load;

crates/cheatnet/tests/common/mod.rs

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ use cheatnet::runtime_extensions::call_to_blockifier_runtime_extension::rpc::{
1919
CallFailure, CallResult,
2020
};
2121
use cheatnet::runtime_extensions::common::create_execute_calldata;
22-
use cheatnet::runtime_extensions::forge_runtime_extension::cheatcodes::CheatcodeError;
2322
use cheatnet::runtime_extensions::forge_runtime_extension::cheatcodes::declare::declare;
24-
use cheatnet::runtime_extensions::forge_runtime_extension::cheatcodes::deploy::deploy_at;
2523
use cheatnet::runtime_extensions::forge_runtime_extension::contracts_data::ContractsData;
2624
use cheatnet::state::CheatnetState;
2725
use conversions::IntoConv;
@@ -160,38 +158,6 @@ pub fn deploy(
160158
contract_address
161159
}
162160

163-
pub fn deploy_at_wrapper(
164-
state: &mut dyn State,
165-
cheatnet_state: &mut CheatnetState,
166-
class_hash: &ClassHash,
167-
calldata: &[Felt],
168-
contract_address: ContractAddress,
169-
) -> Result<ContractAddress, CheatcodeError> {
170-
let mut entry_point_execution_context = build_context(
171-
&cheatnet_state.block_info,
172-
None,
173-
&TrackedResource::CairoSteps,
174-
);
175-
let hints = HashMap::new();
176-
177-
let mut syscall_hint_processor = build_syscall_hint_processor(
178-
&CallEntryPoint::default(),
179-
state,
180-
&mut entry_point_execution_context,
181-
&hints,
182-
);
183-
184-
let (contract_address, _retdata) = deploy_at(
185-
&mut syscall_hint_processor,
186-
cheatnet_state,
187-
class_hash,
188-
calldata,
189-
contract_address,
190-
)?;
191-
192-
Ok(contract_address)
193-
}
194-
195161
fn deploy_helper(
196162
syscall_handler: &mut SyscallHintProcessor,
197163
cheatnet_state: &mut CheatnetState,

0 commit comments

Comments
 (0)