-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add casm contract class struct compatible for executable tr…
…ansaction (#357) * refactor: add casm contract class struct compatible for executable transaction * refactor: use casm contract class for executable transaction * refactor: add try from executable declare tx to account tx
- Loading branch information
1 parent
6996784
commit a4ced95
Showing
6 changed files
with
86 additions
and
9 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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; | ||
|
||
/// Compiled contract class. | ||
#[derive(Clone, Debug, Eq, PartialEq)] | ||
pub enum ContractClass { | ||
V1(ContractClassV1), | ||
} | ||
|
||
/// Compiled contract class variant for Cairo 1 contracts. | ||
#[derive(Clone, Debug, Eq, PartialEq)] | ||
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, Eq, PartialEq)] | ||
pub struct ClassInfo { | ||
pub contract_class: ContractClass, | ||
pub sierra_program_length: usize, | ||
pub abi_length: usize, | ||
} |
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