ScriptHashType

Enum ScriptHashType 

Source
#[repr(u8)]
pub enum ScriptHashType {
Show 129 variants Data = 0, Type = 1, Data1 = 2, Data2 = 4, Data3 = 6, Data4 = 8, Data5 = 10, Data6 = 12, Data7 = 14, Data8 = 16, Data9 = 18, Data10 = 20, Data11 = 22, Data12 = 24, Data13 = 26, Data14 = 28, Data15 = 30, Data16 = 32, Data17 = 34, Data18 = 36, Data19 = 38, Data20 = 40, Data21 = 42, Data22 = 44, Data23 = 46, Data24 = 48, Data25 = 50, Data26 = 52, Data27 = 54, Data28 = 56, Data29 = 58, Data30 = 60, Data31 = 62, Data32 = 64, Data33 = 66, Data34 = 68, Data35 = 70, Data36 = 72, Data37 = 74, Data38 = 76, Data39 = 78, Data40 = 80, Data41 = 82, Data42 = 84, Data43 = 86, Data44 = 88, Data45 = 90, Data46 = 92, Data47 = 94, Data48 = 96, Data49 = 98, Data50 = 100, Data51 = 102, Data52 = 104, Data53 = 106, Data54 = 108, Data55 = 110, Data56 = 112, Data57 = 114, Data58 = 116, Data59 = 118, Data60 = 120, Data61 = 122, Data62 = 124, Data63 = 126, Data64 = 128, Data65 = 130, Data66 = 132, Data67 = 134, Data68 = 136, Data69 = 138, Data70 = 140, Data71 = 142, Data72 = 144, Data73 = 146, Data74 = 148, Data75 = 150, Data76 = 152, Data77 = 154, Data78 = 156, Data79 = 158, Data80 = 160, Data81 = 162, Data82 = 164, Data83 = 166, Data84 = 168, Data85 = 170, Data86 = 172, Data87 = 174, Data88 = 176, Data89 = 178, Data90 = 180, Data91 = 182, Data92 = 184, Data93 = 186, Data94 = 188, Data95 = 190, Data96 = 192, Data97 = 194, Data98 = 196, Data99 = 198, Data100 = 200, Data101 = 202, Data102 = 204, Data103 = 206, Data104 = 208, Data105 = 210, Data106 = 212, Data107 = 214, Data108 = 216, Data109 = 218, Data110 = 220, Data111 = 222, Data112 = 224, Data113 = 226, Data114 = 228, Data115 = 230, Data116 = 232, Data117 = 234, Data118 = 236, Data119 = 238, Data120 = 240, Data121 = 242, Data122 = 244, Data123 = 246, Data124 = 248, Data125 = 250, Data126 = 252, Data127 = 254,
}
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 = 0

Type “data” matches script code via cell data hash, and run the script code in v0 CKB VM.

§

Type = 1

Type “type” matches script code via cell type script hash.

§

Data1 = 2

Type “data1” matches script code via cell data hash, and run the script code in v1 CKB VM.

§

Data2 = 4

Type “data2” matches script code via cell data hash, and run the script code in v2 CKB VM.

§

Data3 = 6

Type “data3” matches script code via cell data hash, and runs the script code in v3 CKB VM.

§

Data4 = 8

Type “data4” matches script code via cell data hash, and runs the script code in v4 CKB VM.

§

Data5 = 10

Type “data5” matches script code via cell data hash, and runs the script code in v5 CKB VM.

§

Data6 = 12

Type “data6” matches script code via cell data hash, and runs the script code in v6 CKB VM.

§

Data7 = 14

Type “data7” matches script code via cell data hash, and runs the script code in v7 CKB VM.

§

Data8 = 16

Type “data8” matches script code via cell data hash, and runs the script code in v8 CKB VM.

§

Data9 = 18

Type “data9” matches script code via cell data hash, and runs the script code in v9 CKB VM.

§

Data10 = 20

Type “data10” matches script code via cell data hash, and runs the script code in v10 CKB VM.

§

Data11 = 22

Type “data11” matches script code via cell data hash, and runs the script code in v11 CKB VM.

§

Data12 = 24

Type “data12” matches script code via cell data hash, and runs the script code in v12 CKB VM.

§

Data13 = 26

Type “data13” matches script code via cell data hash, and runs the script code in v13 CKB VM.

§

Data14 = 28

Type “data14” matches script code via cell data hash, and runs the script code in v14 CKB VM.

§

Data15 = 30

Type “data15” matches script code via cell data hash, and runs the script code in v15 CKB VM.

§

Data16 = 32

Type “data16” matches script code via cell data hash, and runs the script code in v16 CKB VM.

§

Data17 = 34

Type “data17” matches script code via cell data hash, and runs the script code in v17 CKB VM.

§

Data18 = 36

Type “data18” matches script code via cell data hash, and runs the script code in v18 CKB VM.

§

Data19 = 38

Type “data19” matches script code via cell data hash, and runs the script code in v19 CKB VM.

§

Data20 = 40

Type “data20” matches script code via cell data hash, and runs the script code in v20 CKB VM.

§

Data21 = 42

Type “data21” matches script code via cell data hash, and runs the script code in v21 CKB VM.

§

Data22 = 44

Type “data22” matches script code via cell data hash, and runs the script code in v22 CKB VM.

§

Data23 = 46

Type “data23” matches script code via cell data hash, and runs the script code in v23 CKB VM.

§

Data24 = 48

Type “data24” matches script code via cell data hash, and runs the script code in v24 CKB VM.

§

Data25 = 50

Type “data25” matches script code via cell data hash, and runs the script code in v25 CKB VM.

§

Data26 = 52

Type “data26” matches script code via cell data hash, and runs the script code in v26 CKB VM.

§

Data27 = 54

Type “data27” matches script code via cell data hash, and runs the script code in v27 CKB VM.

§

Data28 = 56

Type “data28” matches script code via cell data hash, and runs the script code in v28 CKB VM.

§

Data29 = 58

Type “data29” matches script code via cell data hash, and runs the script code in v29 CKB VM.

§

Data30 = 60

Type “data30” matches script code via cell data hash, and runs the script code in v30 CKB VM.

§

Data31 = 62

Type “data31” matches script code via cell data hash, and runs the script code in v31 CKB VM.

§

Data32 = 64

Type “data32” matches script code via cell data hash, and runs the script code in v32 CKB VM.

§

Data33 = 66

Type “data33” matches script code via cell data hash, and runs the script code in v33 CKB VM.

§

Data34 = 68

Type “data34” matches script code via cell data hash, and runs the script code in v34 CKB VM.

§

Data35 = 70

Type “data35” matches script code via cell data hash, and runs the script code in v35 CKB VM.

§

Data36 = 72

Type “data36” matches script code via cell data hash, and runs the script code in v36 CKB VM.

§

Data37 = 74

Type “data37” matches script code via cell data hash, and runs the script code in v37 CKB VM.

§

Data38 = 76

Type “data38” matches script code via cell data hash, and runs the script code in v38 CKB VM.

§

Data39 = 78

Type “data39” matches script code via cell data hash, and runs the script code in v39 CKB VM.

§

Data40 = 80

Type “data40” matches script code via cell data hash, and runs the script code in v40 CKB VM.

§

Data41 = 82

Type “data41” matches script code via cell data hash, and runs the script code in v41 CKB VM.

§

Data42 = 84

Type “data42” matches script code via cell data hash, and runs the script code in v42 CKB VM.

§

Data43 = 86

Type “data43” matches script code via cell data hash, and runs the script code in v43 CKB VM.

§

Data44 = 88

Type “data44” matches script code via cell data hash, and runs the script code in v44 CKB VM.

§

Data45 = 90

Type “data45” matches script code via cell data hash, and runs the script code in v45 CKB VM.

§

Data46 = 92

Type “data46” matches script code via cell data hash, and runs the script code in v46 CKB VM.

§

Data47 = 94

Type “data47” matches script code via cell data hash, and runs the script code in v47 CKB VM.

§

Data48 = 96

Type “data48” matches script code via cell data hash, and runs the script code in v48 CKB VM.

§

Data49 = 98

Type “data49” matches script code via cell data hash, and runs the script code in v49 CKB VM.

§

Data50 = 100

Type “data50” matches script code via cell data hash, and runs the script code in v50 CKB VM.

§

Data51 = 102

Type “data51” matches script code via cell data hash, and runs the script code in v51 CKB VM.

§

Data52 = 104

Type “data52” matches script code via cell data hash, and runs the script code in v52 CKB VM.

§

Data53 = 106

Type “data53” matches script code via cell data hash, and runs the script code in v53 CKB VM.

§

Data54 = 108

Type “data54” matches script code via cell data hash, and runs the script code in v54 CKB VM.

§

Data55 = 110

Type “data55” matches script code via cell data hash, and runs the script code in v55 CKB VM.

§

Data56 = 112

Type “data56” matches script code via cell data hash, and runs the script code in v56 CKB VM.

§

Data57 = 114

Type “data57” matches script code via cell data hash, and runs the script code in v57 CKB VM.

§

Data58 = 116

Type “data58” matches script code via cell data hash, and runs the script code in v58 CKB VM.

§

Data59 = 118

Type “data59” matches script code via cell data hash, and runs the script code in v59 CKB VM.

§

Data60 = 120

Type “data60” matches script code via cell data hash, and runs the script code in v60 CKB VM.

§

Data61 = 122

Type “data61” matches script code via cell data hash, and runs the script code in v61 CKB VM.

§

Data62 = 124

Type “data62” matches script code via cell data hash, and runs the script code in v62 CKB VM.

§

Data63 = 126

Type “data63” matches script code via cell data hash, and runs the script code in v63 CKB VM.

§

Data64 = 128

Type “data64” matches script code via cell data hash, and runs the script code in v64 CKB VM.

§

Data65 = 130

Type “data65” matches script code via cell data hash, and runs the script code in v65 CKB VM.

§

Data66 = 132

Type “data66” matches script code via cell data hash, and runs the script code in v66 CKB VM.

§

Data67 = 134

Type “data67” matches script code via cell data hash, and runs the script code in v67 CKB VM.

§

Data68 = 136

Type “data68” matches script code via cell data hash, and runs the script code in v68 CKB VM.

§

Data69 = 138

Type “data69” matches script code via cell data hash, and runs the script code in v69 CKB VM.

§

Data70 = 140

Type “data70” matches script code via cell data hash, and runs the script code in v70 CKB VM.

§

Data71 = 142

Type “data71” matches script code via cell data hash, and runs the script code in v71 CKB VM.

§

Data72 = 144

Type “data72” matches script code via cell data hash, and runs the script code in v72 CKB VM.

§

Data73 = 146

Type “data73” matches script code via cell data hash, and runs the script code in v73 CKB VM.

§

Data74 = 148

Type “data74” matches script code via cell data hash, and runs the script code in v74 CKB VM.

§

Data75 = 150

Type “data75” matches script code via cell data hash, and runs the script code in v75 CKB VM.

§

Data76 = 152

Type “data76” matches script code via cell data hash, and runs the script code in v76 CKB VM.

§

Data77 = 154

Type “data77” matches script code via cell data hash, and runs the script code in v77 CKB VM.

§

Data78 = 156

Type “data78” matches script code via cell data hash, and runs the script code in v78 CKB VM.

§

Data79 = 158

Type “data79” matches script code via cell data hash, and runs the script code in v79 CKB VM.

§

Data80 = 160

Type “data80” matches script code via cell data hash, and runs the script code in v80 CKB VM.

§

Data81 = 162

Type “data81” matches script code via cell data hash, and runs the script code in v81 CKB VM.

§

Data82 = 164

Type “data82” matches script code via cell data hash, and runs the script code in v82 CKB VM.

§

Data83 = 166

Type “data83” matches script code via cell data hash, and runs the script code in v83 CKB VM.

§

Data84 = 168

Type “data84” matches script code via cell data hash, and runs the script code in v84 CKB VM.

§

Data85 = 170

Type “data85” matches script code via cell data hash, and runs the script code in v85 CKB VM.

§

Data86 = 172

Type “data86” matches script code via cell data hash, and runs the script code in v86 CKB VM.

§

Data87 = 174

Type “data87” matches script code via cell data hash, and runs the script code in v87 CKB VM.

§

Data88 = 176

Type “data88” matches script code via cell data hash, and runs the script code in v88 CKB VM.

§

Data89 = 178

Type “data89” matches script code via cell data hash, and runs the script code in v89 CKB VM.

§

Data90 = 180

Type “data90” matches script code via cell data hash, and runs the script code in v90 CKB VM.

§

Data91 = 182

Type “data91” matches script code via cell data hash, and runs the script code in v91 CKB VM.

§

Data92 = 184

Type “data92” matches script code via cell data hash, and runs the script code in v92 CKB VM.

§

Data93 = 186

Type “data93” matches script code via cell data hash, and runs the script code in v93 CKB VM.

§

Data94 = 188

Type “data94” matches script code via cell data hash, and runs the script code in v94 CKB VM.

§

Data95 = 190

Type “data95” matches script code via cell data hash, and runs the script code in v95 CKB VM.

§

Data96 = 192

Type “data96” matches script code via cell data hash, and runs the script code in v96 CKB VM.

§

Data97 = 194

Type “data97” matches script code via cell data hash, and runs the script code in v97 CKB VM.

§

Data98 = 196

Type “data98” matches script code via cell data hash, and runs the script code in v98 CKB VM.

§

Data99 = 198

Type “data99” matches script code via cell data hash, and runs the script code in v99 CKB VM.

§

Data100 = 200

Type “data100” matches script code via cell data hash, and runs the script code in v100 CKB VM.

§

Data101 = 202

Type “data101” matches script code via cell data hash, and runs the script code in v101 CKB VM.

§

Data102 = 204

Type “data102” matches script code via cell data hash, and runs the script code in v102 CKB VM.

§

Data103 = 206

Type “data103” matches script code via cell data hash, and runs the script code in v103 CKB VM.

§

Data104 = 208

Type “data104” matches script code via cell data hash, and runs the script code in v104 CKB VM.

§

Data105 = 210

Type “data105” matches script code via cell data hash, and runs the script code in v105 CKB VM.

§

Data106 = 212

Type “data106” matches script code via cell data hash, and runs the script code in v106 CKB VM.

§

Data107 = 214

Type “data107” matches script code via cell data hash, and runs the script code in v107 CKB VM.

§

Data108 = 216

Type “data108” matches script code via cell data hash, and runs the script code in v108 CKB VM.

§

Data109 = 218

Type “data109” matches script code via cell data hash, and runs the script code in v109 CKB VM.

§

Data110 = 220

Type “data110” matches script code via cell data hash, and runs the script code in v110 CKB VM.

§

Data111 = 222

Type “data111” matches script code via cell data hash, and runs the script code in v111 CKB VM.

§

Data112 = 224

Type “data112” matches script code via cell data hash, and runs the script code in v112 CKB VM.

§

Data113 = 226

Type “data113” matches script code via cell data hash, and runs the script code in v113 CKB VM.

§

Data114 = 228

Type “data114” matches script code via cell data hash, and runs the script code in v114 CKB VM.

§

Data115 = 230

Type “data115” matches script code via cell data hash, and runs the script code in v115 CKB VM.

§

Data116 = 232

Type “data116” matches script code via cell data hash, and runs the script code in v116 CKB VM.

§

Data117 = 234

Type “data117” matches script code via cell data hash, and runs the script code in v117 CKB VM.

§

Data118 = 236

Type “data118” matches script code via cell data hash, and runs the script code in v118 CKB VM.

§

Data119 = 238

Type “data119” matches script code via cell data hash, and runs the script code in v119 CKB VM.

§

Data120 = 240

Type “data120” matches script code via cell data hash, and runs the script code in v120 CKB VM.

§

Data121 = 242

Type “data121” matches script code via cell data hash, and runs the script code in v121 CKB VM.

§

Data122 = 244

Type “data122” matches script code via cell data hash, and runs the script code in v122 CKB VM.

§

Data123 = 246

Type “data123” matches script code via cell data hash, and runs the script code in v123 CKB VM.

§

Data124 = 248

Type “data124” matches script code via cell data hash, and runs the script code in v124 CKB VM.

§

Data125 = 250

Type “data125” matches script code via cell data hash, and runs the script code in v125 CKB VM.

§

Data126 = 252

Type “data126” matches script code via cell data hash, and runs the script code in v126 CKB VM.

§

Data127 = 254

Type “data127” matches script code via cell data hash, and runs the script code in v127 CKB VM.

Trait Implementations§

Source§

impl Clone for ScriptHashType

Source§

fn clone(&self) -> ScriptHashType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScriptHashType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ScriptHashType

Source§

fn default() -> ScriptHashType

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ScriptHashType

Source§

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 Display for ScriptHashType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<ScriptHashType> for ScriptHashType

Source§

fn from(json: ScriptHashType) -> Self

Converts to this type from the input type.
Source§

impl From<ScriptHashType> for ScriptHashType

Source§

fn from(core: ScriptHashType) -> ScriptHashType

Converts to this type from the input type.
Source§

impl Hash for ScriptHashType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl JsonSchema for ScriptHashType

Source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for ScriptHashType

Source§

fn eq(&self, other: &ScriptHashType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ScriptHashType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for ScriptHashType

Source§

impl Eq for ScriptHashType

Source§

impl StructuralPartialEq for ScriptHashType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,