Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec(BACK-8009): refine slices specification #83

Merged
merged 1 commit into from
Dec 10, 2024
Merged
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
8 changes: 4 additions & 4 deletions specs/erc-7730.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ This specification uses a limited [json path](https://www.rfc-editor.org/rfc/rfc
Limitation to the json path specification are the following:
* Paths MUST use the dot notation, including for slice and array selectors (i.e. an element of an array should be selected through `array_name.[index]`)
* Only name, index and slices selectors are supported.
* Slices selectors MUST NOT contain the optional step.
* Slices selectors MUST NOT contain the optional step. Start index is inclusive, end index is exclusive. Start or end index can be omitted to indicate the beginning or end of the array.

In addition, additional *roots* are introduced to support description of paths over multiple files in a single common notation. The root node identifier indicates which document or data location this path references, according to the following table:

Expand All @@ -214,8 +214,8 @@ For paths referring to structured data fields, if a field has a variable length
References to values in the serialized structured data
* `#.params.amountIn` or `params.amountIn` refers to parameter `amountIn` in top-level structure `params` as defined in the ABI
* `#.data.path.[0].path.[-1].to` or `data.path.[0].path.[-1].to` refers to the field `to` taken from last member of `path` array, itself taken from first member of enclosing `path` array, itself part of top level `data` structure.
* `#.params.path.[0:19]` refers to the first 20 bytes of the `path` byte array
* `#.params.path.[-20:-1]` refers to the last 20 bytes of the `path` byte array
* `#.params.path.[:20]` or `#.params.path.[0:20]` refers to the first 20 bytes of the `path` byte array
* `#.params.path.[-20:]` refers to the last 20 bytes of the `path` byte array
* `#.details.[]` refers to the array with the Permit Details of a PermitBatch message

References to values in the format specification file
Expand Down Expand Up @@ -819,7 +819,7 @@ A slice on an array type means that the associated [field format specification](
"label": "Maximum Amount to Send",
"format": "tokenAmount",
"params": {
"tokenPath": "params.path.[0:19]"
"tokenPath": "params.path.[0:20]"
}
}
]
Expand Down