From f928dab7c291b5a5433d60025cb8537476e4e44d Mon Sep 17 00:00:00 2001 From: Arni Hod Date: Sun, 18 Aug 2024 12:12:51 +0300 Subject: [PATCH] chore: fix docstring of executable contract class structs --- .../blockifier/src/execution/contract_class.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/crates/blockifier/src/execution/contract_class.rs b/crates/blockifier/src/execution/contract_class.rs index 1e257619b7..f9e3a349c5 100644 --- a/crates/blockifier/src/execution/contract_class.rs +++ b/crates/blockifier/src/execution/contract_class.rs @@ -43,13 +43,9 @@ use crate::transaction::errors::TransactionExecutionError; #[path = "contract_class_test.rs"] pub mod test; -/// Represents a runnable Starknet contract class (meaning, the program is runnable by the VM). -/// We wrap the actual class in an Arc to avoid cloning the program when cloning the class. -// Note: when deserializing from a SN API class JSON string, the ABI field is ignored -// by serde, since it is not required for execution. - pub type ContractClassResult = Result; +/// Represents a runnable Starknet contract class (meaning, the program is runnable by the VM). #[derive(Clone, Debug, Eq, PartialEq, derive_more::From)] pub enum ContractClass { V0(ContractClassV0), @@ -103,6 +99,12 @@ impl ContractClass { } // V0. + +/// Represents a runnable Cario 0 Starknet contract class (meaning, the program is runnable by the +/// VM). We wrap the actual class in an Arc to avoid cloning the program when cloning the +/// class. +// Note: when deserializing from a SN API class JSON string, the ABI field is ignored +// by serde, since it is not required for execution. #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq)] pub struct ContractClassV0(pub Arc); impl Deref for ContractClassV0 { @@ -170,6 +172,10 @@ impl TryFrom for ContractClassV0 { } // V1. + +/// Represents a runnable Cario (Cairo 1) Starknet contract class (meaning, the program is runnable +/// by the VM). We wrap the actual class in an Arc to avoid cloning the program when cloning the +/// class. #[derive(Clone, Debug, Eq, PartialEq)] pub struct ContractClassV1(pub Arc); impl Deref for ContractClassV1 {