Skip to main content

MetadataConstant

A constant defined in a metadata pallet.

docsstring[]required

Constant documentation. One item per line in the array.

Example: ["Call documentation line 1.","Call documentation line 2."]
indexint32required

Constant's index inside the metadata pallet.

Possible values: >= 0

Example: 7
namestringrequired

Constant name. Camel case.

Example: BountyDepositBase
typeIdint32

Id of the constant's type.

Possible values: >= 0

Example: 3
typeNamestringrequired

Name of the constant's type.

Example: TypeName
valueobject

Metadata constant value in JSON format. Schema depends on the definition within the runtime metadata.

Example: {"proofSize":"8388608","refTime":"1600000000000"}
valueHexHexStringrequired

Arbitrary hex-encoded bytes, 0x-prefixed.

Possible values: Value must match regular expression ^0x(?:[0-9a-f]{2})+$

Examples:
Example: 0xdeadbeef
MetadataConstant
{
"docs": [
"Call documentation line 1.",
"Call documentation line 2."
],
"index": 7,
"name": "BountyDepositBase",
"typeId": 3,
"typeName": "TypeName",
"value": {
"proofSize": "8388608",
"refTime": "1600000000000"
},
"valueHex": "0xdeadbeef"
}