Commit ca31709
committed
feat: support constants and map references in v2 schema fields
Align v2 linter with updated ERC-7730 schema that widens many fields to accept
constant references ($.metadata.constants.*) and map references alongside literal
values.
- Add InputMapReference model and update Pydantic input models for display,
context and metadata fields (token, callee, selector, label, owner, etc.)
- Thread strict_maps flag through the resolution pipeline: lint mode validates
map references but drops them for resolution, calldata/convert modes error
- Validate map references: check map path exists in metadata.maps, check keyPath
is a valid container/data/descriptor path
- Reject structured data paths (#.) in keyPath for context/metadata sections
- Add @.chainId to container path grammar per spec
- Handle empty resolved params dict after map reference drop
Made-with: Cursor1 parent 0f5088b commit ca31709
14 files changed
Lines changed: 454 additions & 186 deletions
File tree
- src/erc7730
- convert
- calldata
- ledger/eip712
- resolved/v2
- lint/v2
- model
- input/v2
- paths
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
136 | 135 | | |
137 | 136 | | |
138 | 137 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
463 | | - | |
| 462 | + | |
464 | 463 | | |
465 | 464 | | |
466 | 465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
199 | | - | |
| 200 | + | |
| 201 | + | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
204 | | - | |
| 206 | + | |
205 | 207 | | |
206 | | - | |
207 | 208 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 209 | + | |
212 | 210 | | |
213 | | - | |
214 | | - | |
| 211 | + | |
215 | 212 | | |
216 | 213 | | |
217 | | - | |
| 214 | + | |
| 215 | + | |
218 | 216 | | |
219 | 217 | | |
220 | | - | |
221 | | - | |
| 218 | + | |
222 | 219 | | |
223 | 220 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | 221 | | |
0 commit comments