pub enum ScriptHashType {
Data,
Type,
Data1,
Data2,
}Expand description
Specifies how the script code_hash is used to match the script code and how to run the code.
Allowed kinds: “data”, “type”, “data1” and “data2”
Refer to the section Code Locating and Upgradable Script in the RFC CKB Transaction Structure.
The hash type is split into the high 7 bits and the low 1 bit, when the low 1 bit is 1, it indicates the type, when the low 1 bit is 0, it indicates the data, and then it relies on the high 7 bits to indicate that the data actually corresponds to the version.
Variants§
Data
Type “data” matches script code via cell data hash, and run the script code in v0 CKB VM.
Type
Type “type” matches script code via cell type script hash.
Data1
Type “data1” matches script code via cell data hash, and run the script code in v1 CKB VM.
Data2
Type “data2” matches script code via cell data hash, and run the script code in v2 CKB VM.
Trait Implementations§
source§impl Clone for ScriptHashType
impl Clone for ScriptHashType
source§fn clone(&self) -> ScriptHashType
fn clone(&self) -> ScriptHashType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ScriptHashType
impl Debug for ScriptHashType
source§impl Default for ScriptHashType
impl Default for ScriptHashType
source§impl<'de> Deserialize<'de> for ScriptHashType
impl<'de> Deserialize<'de> for ScriptHashType
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>,
source§impl Display for ScriptHashType
impl Display for ScriptHashType
source§impl From<ScriptHashType> for ScriptHashType
impl From<ScriptHashType> for ScriptHashType
source§fn from(core: ScriptHashType) -> ScriptHashType
fn from(core: ScriptHashType) -> ScriptHashType
source§impl From<ScriptHashType> for ScriptHashType
impl From<ScriptHashType> for ScriptHashType
source§fn from(json: ScriptHashType) -> Self
fn from(json: ScriptHashType) -> Self
source§impl Hash for ScriptHashType
impl Hash for ScriptHashType
source§impl PartialEq<ScriptHashType> for ScriptHashType
impl PartialEq<ScriptHashType> for ScriptHashType
source§fn eq(&self, other: &ScriptHashType) -> bool
fn eq(&self, other: &ScriptHashType) -> bool
self and other values to be equal, and is used
by ==.