@@ -330,6 +330,194 @@ export class Round extends Entity {
330
330
}
331
331
}
332
332
333
+ export class Draw extends Entity {
334
+ constructor ( id : string ) {
335
+ super ( ) ;
336
+ this . set ( "id" , Value . fromString ( id ) ) ;
337
+ }
338
+
339
+ save ( ) : void {
340
+ let id = this . get ( "id" ) ;
341
+ assert ( id != null , "Cannot save Draw entity without an ID" ) ;
342
+ if ( id ) {
343
+ assert (
344
+ id . kind == ValueKind . STRING ,
345
+ `Entities of type Draw must have an ID of type String but the id '${ id . displayData ( ) } ' is of type ${ id . displayKind ( ) } `
346
+ ) ;
347
+ store . set ( "Draw" , id . toString ( ) , this ) ;
348
+ }
349
+ }
350
+
351
+ static loadInBlock ( id : string ) : Draw | null {
352
+ return changetype < Draw | null > ( store . get_in_block ( "Draw" , id ) ) ;
353
+ }
354
+
355
+ static load ( id : string ) : Draw | null {
356
+ return changetype < Draw | null > ( store . get ( "Draw" , id ) ) ;
357
+ }
358
+
359
+ get id ( ) : string {
360
+ let value = this . get ( "id" ) ;
361
+ if ( ! value || value . kind == ValueKind . NULL ) {
362
+ throw new Error ( "Cannot return null for a required field." ) ;
363
+ } else {
364
+ return value . toString ( ) ;
365
+ }
366
+ }
367
+
368
+ set id ( value : string ) {
369
+ this . set ( "id" , Value . fromString ( value ) ) ;
370
+ }
371
+
372
+ get address ( ) : Bytes {
373
+ let value = this . get ( "address" ) ;
374
+ if ( ! value || value . kind == ValueKind . NULL ) {
375
+ throw new Error ( "Cannot return null for a required field." ) ;
376
+ } else {
377
+ return value . toBytes ( ) ;
378
+ }
379
+ }
380
+
381
+ set address ( value : Bytes ) {
382
+ this . set ( "address" , Value . fromBytes ( value ) ) ;
383
+ }
384
+
385
+ get appeal ( ) : BigInt {
386
+ let value = this . get ( "appeal" ) ;
387
+ if ( ! value || value . kind == ValueKind . NULL ) {
388
+ throw new Error ( "Cannot return null for a required field." ) ;
389
+ } else {
390
+ return value . toBigInt ( ) ;
391
+ }
392
+ }
393
+
394
+ set appeal ( value : BigInt ) {
395
+ this . set ( "appeal" , Value . fromBigInt ( value ) ) ;
396
+ }
397
+
398
+ get disputeID ( ) : BigInt {
399
+ let value = this . get ( "disputeID" ) ;
400
+ if ( ! value || value . kind == ValueKind . NULL ) {
401
+ throw new Error ( "Cannot return null for a required field." ) ;
402
+ } else {
403
+ return value . toBigInt ( ) ;
404
+ }
405
+ }
406
+
407
+ set disputeID ( value : BigInt ) {
408
+ this . set ( "disputeID" , Value . fromBigInt ( value ) ) ;
409
+ }
410
+
411
+ get voteID ( ) : BigInt {
412
+ let value = this . get ( "voteID" ) ;
413
+ if ( ! value || value . kind == ValueKind . NULL ) {
414
+ throw new Error ( "Cannot return null for a required field." ) ;
415
+ } else {
416
+ return value . toBigInt ( ) ;
417
+ }
418
+ }
419
+
420
+ set voteID ( value : BigInt ) {
421
+ this . set ( "voteID" , Value . fromBigInt ( value ) ) ;
422
+ }
423
+ }
424
+
425
+ export class TokenAndETHShift extends Entity {
426
+ constructor ( id : string ) {
427
+ super ( ) ;
428
+ this . set ( "id" , Value . fromString ( id ) ) ;
429
+ }
430
+
431
+ save ( ) : void {
432
+ let id = this . get ( "id" ) ;
433
+ assert ( id != null , "Cannot save TokenAndETHShift entity without an ID" ) ;
434
+ if ( id ) {
435
+ assert (
436
+ id . kind == ValueKind . STRING ,
437
+ `Entities of type TokenAndETHShift must have an ID of type String but the id '${ id . displayData ( ) } ' is of type ${ id . displayKind ( ) } `
438
+ ) ;
439
+ store . set ( "TokenAndETHShift" , id . toString ( ) , this ) ;
440
+ }
441
+ }
442
+
443
+ static loadInBlock ( id : string ) : TokenAndETHShift | null {
444
+ return changetype < TokenAndETHShift | null > (
445
+ store . get_in_block ( "TokenAndETHShift" , id )
446
+ ) ;
447
+ }
448
+
449
+ static load ( id : string ) : TokenAndETHShift | null {
450
+ return changetype < TokenAndETHShift | null > (
451
+ store . get ( "TokenAndETHShift" , id )
452
+ ) ;
453
+ }
454
+
455
+ get id ( ) : string {
456
+ let value = this . get ( "id" ) ;
457
+ if ( ! value || value . kind == ValueKind . NULL ) {
458
+ throw new Error ( "Cannot return null for a required field." ) ;
459
+ } else {
460
+ return value . toString ( ) ;
461
+ }
462
+ }
463
+
464
+ set id ( value : string ) {
465
+ this . set ( "id" , Value . fromString ( value ) ) ;
466
+ }
467
+
468
+ get ETHAmount ( ) : BigInt {
469
+ let value = this . get ( "ETHAmount" ) ;
470
+ if ( ! value || value . kind == ValueKind . NULL ) {
471
+ throw new Error ( "Cannot return null for a required field." ) ;
472
+ } else {
473
+ return value . toBigInt ( ) ;
474
+ }
475
+ }
476
+
477
+ set ETHAmount ( value : BigInt ) {
478
+ this . set ( "ETHAmount" , Value . fromBigInt ( value ) ) ;
479
+ }
480
+
481
+ get address ( ) : Bytes {
482
+ let value = this . get ( "address" ) ;
483
+ if ( ! value || value . kind == ValueKind . NULL ) {
484
+ throw new Error ( "Cannot return null for a required field." ) ;
485
+ } else {
486
+ return value . toBytes ( ) ;
487
+ }
488
+ }
489
+
490
+ set address ( value : Bytes ) {
491
+ this . set ( "address" , Value . fromBytes ( value ) ) ;
492
+ }
493
+
494
+ get disputeID ( ) : BigInt {
495
+ let value = this . get ( "disputeID" ) ;
496
+ if ( ! value || value . kind == ValueKind . NULL ) {
497
+ throw new Error ( "Cannot return null for a required field." ) ;
498
+ } else {
499
+ return value . toBigInt ( ) ;
500
+ }
501
+ }
502
+
503
+ set disputeID ( value : BigInt ) {
504
+ this . set ( "disputeID" , Value . fromBigInt ( value ) ) ;
505
+ }
506
+
507
+ get tokenAmount ( ) : BigInt {
508
+ let value = this . get ( "tokenAmount" ) ;
509
+ if ( ! value || value . kind == ValueKind . NULL ) {
510
+ throw new Error ( "Cannot return null for a required field." ) ;
511
+ } else {
512
+ return value . toBigInt ( ) ;
513
+ }
514
+ }
515
+
516
+ set tokenAmount ( value : BigInt ) {
517
+ this . set ( "tokenAmount" , Value . fromBigInt ( value ) ) ;
518
+ }
519
+ }
520
+
333
521
export class EvidenceGroup extends Entity {
334
522
constructor ( id : Bytes ) {
335
523
super ( ) ;
0 commit comments