Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit f58cc4f

Browse files
fguthmannfannyguthmann
andauthored
Added comments to document-execution/execution_entry_point.rs (#898)
Co-authored-by: fannyguthmann <[email protected]>
1 parent 8458b8c commit f58cc4f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/execution/execution_entry_point.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ pub struct ExecutionEntryPoint {
7878
}
7979
#[allow(clippy::too_many_arguments)]
8080
impl ExecutionEntryPoint {
81+
/// Creates a new ExecutionEntryPoint instance.
8182
pub fn new(
8283
contract_address: Address,
8384
calldata: Vec<Felt252>,
@@ -227,7 +228,7 @@ impl ExecutionEntryPoint {
227228
}
228229
}
229230

230-
/// Returns the entry point with selector corresponding with self.entry_point_selector, or the
231+
/// Returns for version 0 the entry point with selector corresponding with self.entry_point_selector, or the
231232
/// default if there is one and the requested one is not found.
232233
fn get_selected_entry_point_v0(
233234
&self,
@@ -260,6 +261,8 @@ impl ExecutionEntryPoint {
260261
.ok_or(TransactionError::EntryPointNotFound)
261262
}
262263

264+
// Returns the entry point with selector corresponding with self.entry_point_selector, or the
265+
/// default if there is one and the requested one is not found.
263266
fn get_selected_entry_point(
264267
&self,
265268
contract_class: &CasmContractClass,
@@ -291,6 +294,7 @@ impl ExecutionEntryPoint {
291294
.ok_or(TransactionError::EntryPointNotFound)
292295
}
293296

297+
/// Constructs a CallInfo object for deprecated contract classes.
294298
fn build_call_info_deprecated<S: StateReader, C: ContractClassCache>(
295299
&self,
296300
previous_cairo_usage: ExecutionResources,
@@ -324,6 +328,7 @@ impl ExecutionEntryPoint {
324328
})
325329
}
326330

331+
/// Constructs a CallInfo object for current contract classes.
327332
fn build_call_info<S: StateReader, C: ContractClassCache>(
328333
&self,
329334
previous_cairo_usage: ExecutionResources,
@@ -383,6 +388,7 @@ impl ExecutionEntryPoint {
383388
get_deployed_address_class_hash_at_address(state, code_address)
384389
}
385390

391+
/// The function is designed to execute a contract class for version 0.
386392
fn _execute_version0_class<S: StateReader, C: ContractClassCache>(
387393
&self,
388394
state: &mut CachedState<S, C>,
@@ -488,6 +494,7 @@ impl ExecutionEntryPoint {
488494
)
489495
}
490496

497+
/// This function executes a contract class.
491498
fn _execute<S: StateReader, C: ContractClassCache>(
492499
&self,
493500
state: &mut CachedState<S, C>,

0 commit comments

Comments
 (0)