Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion schemas/materials/compilation.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ properties:
have access to the full representation by some other means)

allOf:
- true
- {}

sources:
type: array
Expand Down
9 changes: 3 additions & 6 deletions schemas/pointer.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ description: |

type: object

if:
required: [location]
then:
$ref: "schema:ethdebug/format/pointer/region"
else:
$ref: "schema:ethdebug/format/pointer/collection"
oneOf:
- $ref: "schema:ethdebug/format/pointer/region"
- $ref: "schema:ethdebug/format/pointer/collection"

examples:
- # example: a single particular storage slot
Expand Down
38 changes: 6 additions & 32 deletions schemas/pointer/collection.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,9 @@ description: |
A representation of a collection of pointers to data in the EVM
type: object

allOf:
- oneOf:
- required: [group]
- required: [list]
- required: [if]
- required: [define]
- required: [template]

- 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"
oneOf:
- $ref: "schema:ethdebug/format/pointer/collection/group"
- $ref: "schema:ethdebug/format/pointer/collection/list"
- $ref: "schema:ethdebug/format/pointer/collection/conditional"
- $ref: "schema:ethdebug/format/pointer/collection/scope"
- $ref: "schema:ethdebug/format/pointer/collection/reference"
76 changes: 8 additions & 68 deletions schemas/pointer/region.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,74 +6,14 @@ description: |
A representation of a region of data in the EVM
type: object

properties:
location:
$ref: "#/$defs/Location"


allOf:
- if:
properties:
location:
const: stack

then:
$ref: "schema:ethdebug/format/pointer/region/stack"

- if:
properties:
location:
const: memory

then:
$ref: "schema:ethdebug/format/pointer/region/memory"

- if:
properties:
location:
const: storage
then:
$ref: "schema:ethdebug/format/pointer/region/storage"

- if:
properties:
location:
const: calldata
then:
$ref: "schema:ethdebug/format/pointer/region/calldata"

- if:
properties:
location:
const: returndata
then:
$ref: "schema:ethdebug/format/pointer/region/returndata"

- if:
properties:
location:
const: transient
then:
$ref: "schema:ethdebug/format/pointer/region/transient"

- if:
properties:
location:
const: code
then:
$ref: "schema:ethdebug/format/pointer/region/code"

$defs:
Location:
type: string
enum:
- stack
- memory
- storage
- calldata
- returndata
- transient
- code
oneOf:
- $ref: "schema:ethdebug/format/pointer/region/stack"
- $ref: "schema:ethdebug/format/pointer/region/memory"
- $ref: "schema:ethdebug/format/pointer/region/storage"
- $ref: "schema:ethdebug/format/pointer/region/calldata"
- $ref: "schema:ethdebug/format/pointer/region/returndata"
- $ref: "schema:ethdebug/format/pointer/region/transient"
- $ref: "schema:ethdebug/format/pointer/region/code"

unevaluatedProperties: false

Expand Down
14 changes: 13 additions & 1 deletion schemas/pointer/region/base.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,23 @@ properties:
$ref: "schema:ethdebug/format/pointer/identifier"

location:
type: string
$ref: "#/$defs/Location"

required:
- location

$defs:
Location:
type: string
enum:
- stack
- memory
- storage
- calldata
- returndata
- transient
- code

examples:
- name: "array-item"
location: memory