array
- Explore
- View source
- Playground
Loading ....
- YAML
- JSON
ethdebug/format/type/complex/array
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "schema:ethdebug/format/type/complex/array"
title: ethdebug/format/type/complex/array
description: |
Schema for representing array types, both fixed-size and dynamically
sized. An array type specifies the element type it contains and,
optionally, a fixed element count.
type: object
properties:
class:
type: string
const: complex
kind:
type: string
const: array
contains:
description: |
The element type contained by this array, specified as an
**ethdebug/format/type/wrapper**.
$ref: "schema:ethdebug/format/type/wrapper"
count:
description: |
The fixed number of elements in this array. When omitted, the array
is dynamically sized.
$ref: "schema:ethdebug/format/data/value"
required:
- kind
- contains
examples:
# example: a dynamically-sized array of uint256
- kind: array
contains:
type:
kind: uint
bits: 256
# example: a fixed-size array of 10 addresses
- kind: array
count: 10
contains:
type:
kind: address
# example: a nested array with an unknown element type
- kind: array
contains:
type:
kind: array
contains:
type:
class: elementary
kind: super-uint # unsupported type
blits: -256
ethdebug/format/type/complex/array
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "schema:ethdebug/format/type/complex/array",
"title": "ethdebug/format/type/complex/array",
"description": "Schema for representing array types, both fixed-size and dynamically\nsized. An array type specifies the element type it contains and,\noptionally, a fixed element count.\n",
"type": "object",
"properties": {
"class": {
"type": "string",
"const": "complex"
},
"kind": {
"type": "string",
"const": "array"
},
"contains": {
"description": "The element type contained by this array, specified as an\n**ethdebug/format/type/wrapper**.\n",
"$ref": "schema:ethdebug/format/type/wrapper"
},
"count": {
"description": "The fixed number of elements in this array. When omitted, the array\nis dynamically sized.\n",
"$ref": "schema:ethdebug/format/data/value"
}
},
"required": [
"kind",
"contains"
],
"examples": [
{
"kind": "array",
"contains": {
"type": {
"kind": "uint",
"bits": 256
}
}
},
{
"kind": "array",
"count": 10,
"contains": {
"type": {
"kind": "address"
}
}
},
{
"kind": "array",
"contains": {
"type": {
"kind": "array",
"contains": {
"type": {
"class": "elementary",
"kind": "super-uint",
"blits": -256
}
}
}
}
}
]
}
Loading...