Stamp
ethdebug/format/data/stamp names the schema an object conforms to
and the version of the specification that defines that schema. An
object carries its stamp in an ethdebug field.
Each of the three root schemas, ethdebug/format/program,
ethdebug/format/info and ethdebug/format/info/resources,
includes ethdebug/format/data/stamp under the key ethdebug. The
stamp has this shape:
{
"ethdebug": {
"schema": "ethdebug/format/program",
"version": "<the current version>"
}
}
schema is the name of the schema the object conforms to; each root
schema pins this to its own name. The schema's $id is schema:
followed by this name. version is the version of the specification
that defines schema.
- Explore
- View source
- Playground
- YAML
- JSON
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "schema:ethdebug/format/data/stamp"
title: ethdebug/format/data/stamp
description: |
Names the schema an object conforms to and the version of the
specification that defines that schema.
`schema` is the name of the schema, for example
`ethdebug/format/program`; the `$id` of that schema is `schema:`
followed by this name. `version` is the version of the specification
that defines it, as a semver string.
type: object
properties:
schema:
type: string
title: Schema identifier
description: |
The name of the schema this object conforms to, for example
`ethdebug/format/program`. The schema's `$id` is `schema:`
followed by this name.
version:
type: string
title: Specification version
description: |
The version of the specification that defines
`schema`, as a semver string without build metadata.
pattern: "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?$"
required:
- schema
- version
additionalProperties: false
examples:
- schema: "ethdebug/format/program"
version: "0.1.0-draft.1"
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "schema:ethdebug/format/data/stamp",
"title": "ethdebug/format/data/stamp",
"description": "Names the schema an object conforms to and the version of the\nspecification that defines that schema.\n\n`schema` is the name of the schema, for example\n`ethdebug/format/program`; the `$id` of that schema is `schema:`\nfollowed by this name. `version` is the version of the specification\nthat defines it, as a semver string.\n",
"type": "object",
"properties": {
"schema": {
"type": "string",
"title": "Schema identifier",
"description": "The name of the schema this object conforms to, for example\n`ethdebug/format/program`. The schema's `$id` is `schema:`\nfollowed by this name.\n"
},
"version": {
"type": "string",
"title": "Specification version",
"description": "The version of the specification that defines\n`schema`, as a semver string without build metadata.\n",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?$"
}
},
"required": [
"schema",
"version"
],
"additionalProperties": false,
"examples": [
{
"schema": "ethdebug/format/program",
"version": "0.1.0-draft.1"
}
]
}
Where the stamp appears
An ethdebug/format/info document and an
ethdebug/format/info/resources object must carry the stamp.
Both schemas list ethdebug in required.
A program inside an info document (at programs[i]) should not
carry the stamp. The stamp of the info document covers it.
A program emitted outside an info document should carry the stamp.
For example, in solc's standard JSON output, evm.bytecode.ethdebug
and evm.deployedBytecode.ethdebug are programs that sit beside the
top-level ethdebug wrapper, whose resources member is the resources
object. Each of these programs should carry its own stamp.
All objects of one compilation must name the same version.