Skip to content

Commit 6508f33

Browse files
Support enum basic type in TypedData (#1382)
1 parent da1aa2f commit 6508f33

File tree

3 files changed

+256
-71
lines changed

3 files changed

+256
-71
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"types": {
3+
"StarknetDomain": [
4+
{ "name": "name", "type": "shortstring" },
5+
{ "name": "version", "type": "shortstring" },
6+
{ "name": "chainId", "type": "shortstring" },
7+
{ "name": "revision", "type": "shortstring" }
8+
],
9+
"Example": [{ "name": "someEnum", "type": "enum", "contains": "MyEnum" }],
10+
"MyEnum": [
11+
{ "name": "Variant 1", "type": "()" },
12+
{ "name": "Variant 2", "type": "(u128,u128*)" },
13+
{ "name": "Variant 3", "type": "(u128)" }
14+
]
15+
},
16+
"primaryType": "Example",
17+
"domain": {
18+
"name": "StarkNet Mail",
19+
"version": "1",
20+
"chainId": "1",
21+
"revision": "1"
22+
},
23+
"message": {
24+
"someEnum": {
25+
"Variant 2": [2, [0, 1]]
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)