File tree Expand file tree Collapse file tree 3 files changed +33
-11
lines changed Expand file tree Collapse file tree 3 files changed +33
-11
lines changed Original file line number Diff line number Diff line change 147
147
"maxItems" : 100 ,
148
148
"items" : {
149
149
"type" : " string" ,
150
- "pattern" : " ^0x[a-fA-F0-9]{40}$" ,
151
- "minLength" : 42 ,
152
- "maxLength" : 42
150
+ "format" : " evmAddress"
153
151
},
154
152
"title" : " members" ,
155
153
"uniqueItems" : true
159
157
"maxItems" : 100 ,
160
158
"items" : {
161
159
"type" : " string" ,
162
- "pattern" : " ^0x[a-fA-F0-9]{40}$" ,
163
- "minLength" : 42 ,
164
- "maxLength" : 42
160
+ "format" : " evmAddress"
165
161
},
166
162
"title" : " admins" ,
167
163
"uniqueItems" : true
171
167
"maxItems" : 100 ,
172
168
"items" : {
173
169
"type" : " string" ,
174
- "pattern" : " ^0x[a-fA-F0-9]{40}$" ,
175
- "minLength" : 42 ,
176
- "maxLength" : 42
170
+ "format" : " evmAddress"
177
171
},
178
172
"title" : " moderators" ,
179
173
"uniqueItems" : true
264
258
},
265
259
"delegationContract" : {
266
260
"type" : " string" ,
267
- "format" : " address " ,
261
+ "format" : " evmAddress " ,
268
262
"title" : " Contract address" ,
269
263
"description" : " The address of your delegation contract" ,
270
264
"examples" : [" 0x3901D0fDe202aF1427216b79f5243f8A022d68cf" ]
379
373
"title" : " Contract address" ,
380
374
"examples" : [" e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984" ],
381
375
"anyOf" : [
382
- { "format" : " address " },
376
+ { "format" : " evmAddress " },
383
377
{ "format" : " starknetAddress" }
384
378
]
385
379
},
Original file line number Diff line number Diff line change @@ -99,6 +99,17 @@ ajv.addFormat('address', {
99
99
}
100
100
} ) ;
101
101
102
+ ajv . addFormat ( 'evmAddress' , {
103
+ validate : ( value : string ) => {
104
+ try {
105
+ getAddress ( value ) ;
106
+ return true ;
107
+ } catch ( e : any ) {
108
+ return false ;
109
+ }
110
+ }
111
+ } ) ;
112
+
102
113
ajv . addFormat ( 'starknetAddress' , {
103
114
validate : ( value : string ) => {
104
115
try {
Original file line number Diff line number Diff line change 35
35
"period" : 15552000 ,
36
36
"quorum" : 100
37
37
},
38
+ "treasuries" : [
39
+ {
40
+ "name" : " EVM treasury with checksummed address" ,
41
+ "address" : " 0xF296178d553C8Ec21A2fBD2c5dDa8CA9ac905A00" ,
42
+ "network" : " 1"
43
+ },
44
+ {
45
+ "name" : " EVM treasury with lowercase address" ,
46
+ "address" : " 0xf296178d553c8ec21a2fbd2c5dda8ca9ac905a00" ,
47
+ "network" : " 1"
48
+ },
49
+ {
50
+ "name" : " Starknet treasury" ,
51
+ "address" : " 0x05702362b68a350c1cae8f2a529d74fdbb502369ddcebfadac7e91da37636947" ,
52
+ "network" : " 1"
53
+ }
54
+ ],
38
55
"labels" : [
39
56
{
40
57
"id" : " 4b6a8c88" ,
You can’t perform that action at this time.
0 commit comments