-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: streamline the starknet api contract class object
- Loading branch information
1 parent
98f8d2c
commit a5fa529
Showing
2 changed files
with
10 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,11 @@ | ||
use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
/// Compiled contract class. | ||
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] | ||
pub enum ContractClass { | ||
V1(ContractClassV1), | ||
} | ||
|
||
/// Compiled contract class variant for Cairo 1 contracts. | ||
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] | ||
pub enum ContractClassV1 { | ||
Casm(CasmContractClass), | ||
} | ||
|
||
/// All relevant information about a declared contract class, including the compiled contract class | ||
/// and other parameters derived from the original declare transaction required for billing. | ||
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] | ||
pub struct ClassInfo { | ||
pub contract_class: ContractClass, | ||
pub casm_contract_class: CasmContractClass, | ||
pub sierra_program_length: usize, | ||
pub abi_length: usize, | ||
} |