Skip to content

Commit 3a00485

Browse files
authored
Merge pull request #169 from fjl/patch-1
Improve definition of log filter topic JSON type
2 parents f731dbf + 3bf2cf7 commit 3a00485

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

src/schemas/filter.json

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,35 @@
5252
},
5353
"topics": {
5454
"title": "Topics",
55-
"$ref": "#/components/schemas/Topics"
55+
"$ref": "#/components/schemas/FilterTopics"
5656
}
5757
}
5858
},
59-
"Topic": {
60-
"title": "Topic",
61-
"$ref": "#/components/schemas/uint256"
62-
},
63-
"Topics": {
64-
"title": "Topics",
59+
"FilterTopics": {
60+
"title": "Filter Topics",
6561
"type": "array",
6662
"items": {
67-
"$ref": "#/components/schemas/Topic"
63+
"$ref": "#/components/schemas/FilterTopic"
6864
}
65+
},
66+
"FilterTopic": {
67+
"title": "Filter Topic List Entry",
68+
"oneOf": [
69+
{
70+
"title": "Any Topic Match",
71+
"type": "null"
72+
},
73+
{
74+
"title": "Single Topic Match",
75+
"$ref": "#/components/schemas/bytes32"
76+
},
77+
{
78+
"title": "Multiple Topic Match",
79+
"type": "array",
80+
"items": {
81+
"$ref": "#/components/schemas/bytes32"
82+
}
83+
}
84+
]
6985
}
7086
}

src/schemas/receipt.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
},
3838
"topics": {
3939
"title": "topics",
40-
"$ref": "#/components/schemas/Topics"
40+
"type": "array",
41+
"items": {
42+
"$ref": "#/components/schemas/bytes32"
43+
}
4144
}
4245
}
4346
},

0 commit comments

Comments
 (0)