Collection schema
- Explore
- View source
- Playground
Loading ....
- YAML
- JSON
ethdebug/format/pointer/collection
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "schema:ethdebug/format/pointer/collection"
title: ethdebug/format/pointer/collection
description: |
A representation of a collection of pointers to data in the EVM
Any collection may have a `name`. A collection's name scopes the regions
inside it. This lets a consumer tell apart regions that have the same
name, such as the regions of two uses of one template. A named list also
scopes each of its elements apart, by the index of the element, so that
a consumer can group the regions of one element.
Thus each region in the result of a pointer has a path of scopes: the
names of the named collections that contain the region, outermost first,
with the element index after the name of each named list. The region's
own name is not part of its path. A collection without a name adds
nothing to the path.
Collection names affect only this result. Expressions do not see them:
`~read`, `.offset`, `.length` and `.slot` refer to regions by region name
only, and a collection name is never a region name. The scopes do not
change which region a region name refers to. A consumer that ignores
collection names gets the same regions, with the same names.
The `yields` of a reference renames regions only. It does not rename
the collections inside the template.
$defs:
Name:
title: Collection name
description: |
A name that scopes the regions inside this collection in the result
of the pointer. See **ethdebug/format/pointer/collection**.
$ref: "schema:ethdebug/format/pointer/identifier"
type: object
allOf:
- oneOf:
- required: [group]
- required: [list]
- required: [if]
- required: [define]
- required: [template]
- required: [templates]
- if:
required: [group]
then:
$ref: "schema:ethdebug/format/pointer/collection/group"
- if:
required: [list]
then:
$ref: "schema:ethdebug/format/pointer/collection/list"
- if:
required: [if]
then:
$ref: "schema:ethdebug/format/pointer/collection/conditional"
- if:
required: [define]
then:
$ref: "schema:ethdebug/format/pointer/collection/scope"
- if:
required: [template]
then:
$ref: "schema:ethdebug/format/pointer/collection/reference"
- if:
required: [templates]
then:
$ref: "schema:ethdebug/format/pointer/collection/templates"
ethdebug/format/pointer/collection
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "schema:ethdebug/format/pointer/collection",
"title": "ethdebug/format/pointer/collection",
"description": "A representation of a collection of pointers to data in the EVM\n\nAny collection may have a `name`. A collection's name scopes the regions\ninside it. This lets a consumer tell apart regions that have the same\nname, such as the regions of two uses of one template. A named list also\nscopes each of its elements apart, by the index of the element, so that\na consumer can group the regions of one element.\n\nThus each region in the result of a pointer has a path of scopes: the\nnames of the named collections that contain the region, outermost first,\nwith the element index after the name of each named list. The region's\nown name is not part of its path. A collection without a name adds\nnothing to the path.\n\nCollection names affect only this result. Expressions do not see them:\n`~read`, `.offset`, `.length` and `.slot` refer to regions by region name\nonly, and a collection name is never a region name. The scopes do not\nchange which region a region name refers to. A consumer that ignores\ncollection names gets the same regions, with the same names.\n\nThe `yields` of a reference renames regions only. It does not rename\nthe collections inside the template.\n",
"$defs": {
"Name": {
"title": "Collection name",
"description": "A name that scopes the regions inside this collection in the result\nof the pointer. See **ethdebug/format/pointer/collection**.\n",
"$ref": "schema:ethdebug/format/pointer/identifier"
}
},
"type": "object",
"allOf": [
{
"oneOf": [
{
"required": [
"group"
]
},
{
"required": [
"list"
]
},
{
"required": [
"if"
]
},
{
"required": [
"define"
]
},
{
"required": [
"template"
]
},
{
"required": [
"templates"
]
}
]
},
{
"if": {
"required": [
"group"
]
},
"then": {
"$ref": "schema:ethdebug/format/pointer/collection/group"
}
},
{
"if": {
"required": [
"list"
]
},
"then": {
"$ref": "schema:ethdebug/format/pointer/collection/list"
}
},
{
"if": {
"required": [
"if"
]
},
"then": {
"$ref": "schema:ethdebug/format/pointer/collection/conditional"
}
},
{
"if": {
"required": [
"define"
]
},
"then": {
"$ref": "schema:ethdebug/format/pointer/collection/scope"
}
},
{
"if": {
"required": [
"template"
]
},
"then": {
"$ref": "schema:ethdebug/format/pointer/collection/reference"
}
},
{
"if": {
"required": [
"templates"
]
},
"then": {
"$ref": "schema:ethdebug/format/pointer/collection/templates"
}
}
]
}
Loading playground...