pub enum ScriptVersion {
V0 = 0,
V1 = 1,
V2 = 2,
}
Expand description
The version of CKB Script Verifier.
Variants§
V0 = 0
CKB VM 0 with Syscall version 1.
V1 = 1
CKB VM 1 with Syscall version 1 and version 2.
V2 = 2
CKB VM 2 with Syscall version 1, version 2 and version 3.
Implementations§
Source§impl ScriptVersion
impl ScriptVersion
Sourcepub fn vm_version(self) -> VmVersion
pub fn vm_version(self) -> VmVersion
Returns the version of CKB VM in current script version.
Sourcepub fn data_hash_type(self) -> ScriptHashType
pub fn data_hash_type(self) -> ScriptHashType
Returns the specific data script hash type.
Returns:
ScriptHashType::Data
for version 0;ScriptHashType::Data1
for version 1;
Sourcepub fn init_core_machine_without_limit(self) -> CoreMachine
pub fn init_core_machine_without_limit(self) -> CoreMachine
Creates a CKB VM core machine without cycles limit.
In fact, there is still a limit of max_cycles
which is set to 2^64-1
.
Sourcepub fn init_core_machine(self, max_cycles: Cycle) -> CoreMachine
pub fn init_core_machine(self, max_cycles: Cycle) -> CoreMachine
Creates a CKB VM core machine.
Trait Implementations§
Source§impl Clone for ScriptVersion
impl Clone for ScriptVersion
Source§fn clone(&self) -> ScriptVersion
fn clone(&self) -> ScriptVersion
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 ScriptVersion
impl Debug for ScriptVersion
Source§impl Ord for ScriptVersion
impl Ord for ScriptVersion
Source§fn cmp(&self, other: &ScriptVersion) -> Ordering
fn cmp(&self, other: &ScriptVersion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ScriptVersion
impl PartialEq for ScriptVersion
Source§impl PartialOrd for ScriptVersion
impl PartialOrd for ScriptVersion
impl Copy for ScriptVersion
impl Eq for ScriptVersion
impl StructuralPartialEq for ScriptVersion
Auto Trait Implementations§
impl Freeze for ScriptVersion
impl RefUnwindSafe for ScriptVersion
impl Send for ScriptVersion
impl Sync for ScriptVersion
impl Unpin for ScriptVersion
impl UnwindSafe for ScriptVersion
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<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