pub struct CasmContractClass {
pub prime: BigUint,
pub compiler_version: String,
pub bytecode: Vec<BigUintAsHex>,
pub bytecode_segment_lengths: Option<NestedIntList>,
pub hints: Vec<(usize, Vec<Hint>)>,
pub pythonic_hints: Option<Vec<(usize, Vec<String>)>>,
pub entry_points_by_type: CasmContractEntryPoints,
}
Expand description
Represents a contract in the Starknet network.
Fields§
§prime: BigUint
§compiler_version: String
§bytecode: Vec<BigUintAsHex>
§bytecode_segment_lengths: Option<NestedIntList>
§hints: Vec<(usize, Vec<Hint>)>
§pythonic_hints: Option<Vec<(usize, Vec<String>)>>
§entry_points_by_type: CasmContractEntryPoints
Implementations§
source§impl CasmContractClass
impl CasmContractClass
sourcepub fn compiled_class_hash(&self) -> Felt252
pub fn compiled_class_hash(&self) -> Felt252
Returns the hash value for the compiled contract class.
sourcepub fn get_bytecode_segment_lengths(&self) -> NestedIntList
pub fn get_bytecode_segment_lengths(&self) -> NestedIntList
Returns the lengths of the bytecode segments.
If the length field is missing, the entire bytecode is considered a single segment.
source§impl CasmContractClass
impl CasmContractClass
pub fn from_contract_class( contract_class: ContractClass, add_pythonic_hints: bool, max_bytecode_size: usize, ) -> Result<Self, StarknetSierraCompilationError>
pub fn from_contract_class_with_debug_info( contract_class: ContractClass, add_pythonic_hints: bool, max_bytecode_size: usize, ) -> Result<(Self, CairoProgramDebugInfo), StarknetSierraCompilationError>
Trait Implementations§
source§impl Clone for CasmContractClass
impl Clone for CasmContractClass
source§fn clone(&self) -> CasmContractClass
fn clone(&self) -> CasmContractClass
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CasmContractClass
impl Debug for CasmContractClass
source§impl<'de> Deserialize<'de> for CasmContractClass
impl<'de> Deserialize<'de> for CasmContractClass
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for CasmContractClass
impl PartialEq for CasmContractClass
source§impl Serialize for CasmContractClass
impl Serialize for CasmContractClass
impl Eq for CasmContractClass
impl StructuralPartialEq for CasmContractClass
Auto Trait Implementations§
impl Freeze for CasmContractClass
impl RefUnwindSafe for CasmContractClass
impl Send for CasmContractClass
impl Sync for CasmContractClass
impl Unpin for CasmContractClass
impl UnwindSafe for CasmContractClass
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more