ScalarDefinition

@Serializable
data class ScalarDefinition(val type: String, val kind: Int, val name: String? = null, val required: Boolean? = false) : IGenericDefinition

Definition of a scalar in a Wrap ABI. A scalar is a primitive data type that represents a single value.

Throws

if the type provided is not valid.

Constructors

Link copied to clipboard
constructor(type: String, kind: Int, name: String? = null, required: Boolean? = false)

Properties

Link copied to clipboard
open override val kind: Int

Kind of the definition.

Link copied to clipboard
open override val name: String? = null

Optional name of the scalar.

Link copied to clipboard
open override val required: Boolean? = false

Boolean indicating whether the scalar is required or not.

Link copied to clipboard
open override val type: String

Type of the scalar. Must be one of "UInt", "UInt8", "UInt16", "UInt32", "Int", "Int8", "Int16", "Int32", "String", "Boolean", "Bytes", "BigInt", "BigNumber", or "JSON".