-
Notifications
You must be signed in to change notification settings - Fork 54
/
omni.go
1088 lines (928 loc) · 56.5 KB
/
omni.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package bindings
import (
"errors"
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = errors.New
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
_ = abi.ConvertType
)
// OmniMetaData contains all meta data concerning the Omni contract.
var OmniMetaData = &bind.MetaData{
ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"initialSupply\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"balanceOf\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decimals\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreaseAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"eip712Domain\",\"inputs\":[],\"outputs\":[{\"name\":\"fields\",\"type\":\"bytes1\",\"internalType\":\"bytes1\"},{\"name\":\"name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"verifyingContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"extensions\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increaseAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"name\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonces\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permit\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"deadline\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"symbol\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalSupply\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transfer\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EIP712DomainChanged\",\"inputs\":[],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]",
Bin: "0x6101606040523480156200001257600080fd5b5060405162001687380380620016878339810160408190526200003591620002ee565b6040518060400160405280600c81526020016b4f6d6e69204e6574776f726b60a01b81525080604051806040016040528060018152602001603160f81b8152506040518060400160405280600c81526020016b4f6d6e69204e6574776f726b60a01b815250604051806040016040528060048152602001634f4d4e4960e01b8152508160039081620000c89190620003d3565b506004620000d78282620003d3565b50620000e991508390506005620001a6565b61012052620000fa816006620001a6565b61014052815160208084019190912060e052815190820120610100524660a0526200018860e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506200019e8183620001df565b505062000537565b6000602083511015620001c657620001be83620002a6565b9050620001d9565b81620001d38482620003d3565b5060ff90505b92915050565b6001600160a01b0382166200023b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064015b60405180910390fd5b80600260008282546200024f91906200049f565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600080829050601f81511115620002d4578260405163305a27a960e01b8152600401620002329190620004c1565b8051620002e18262000512565b179392505050565b505050565b600080604083850312156200030257600080fd5b825160208401519092506001600160a01b03811681146200032257600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200035857607f821691505b6020821081036200037957634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002e9576000816000526020600020601f850160051c81016020861015620003aa5750805b601f850160051c820191505b81811015620003cb57828155600101620003b6565b505050505050565b81516001600160401b03811115620003ef57620003ef6200032d565b620004078162000400845462000343565b846200037f565b602080601f8311600181146200043f5760008415620004265750858301515b600019600386901b1c1916600185901b178555620003cb565b600085815260208120601f198616915b8281101562000470578886015182559484019460019091019084016200044f565b50858210156200048f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620001d957634e487b7160e01b600052601160045260246000fd5b60006020808352835180602085015260005b81811015620004f157858101830151858201604001528201620004d3565b506000604082860101526040601f19601f8301168501019250505092915050565b80516020808301519190811015620003795760001960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516110f562000592600039600061038f0152600061036401526000610a27015260006109ff0152600061095a01526000610984015260006109ae01526110f56000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a457c2d711610066578063a457c2d7146101e9578063a9059cbb146101fc578063d505accf1461020f578063dd62ed3e1461022457600080fd5b806370a082311461018a5780637ecebe00146101b357806384b0196e146101c657806395d89b41146101e157600080fd5b806323b872dd116100d357806323b872dd1461014d578063313ce567146101605780633644e5151461016f578063395093511461017757600080fd5b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b610102610237565b60405161010f9190610e5e565b60405180910390f35b61012b610126366004610e94565b6102c9565b604051901515815260200161010f565b6002545b60405190815260200161010f565b61012b61015b366004610ebe565b6102e3565b6040516012815260200161010f565b61013f610307565b61012b610185366004610e94565b610316565b61013f610198366004610efa565b6001600160a01b031660009081526020819052604090205490565b61013f6101c1366004610efa565b610338565b6101ce610356565b60405161010f9796959493929190610f15565b6101026103df565b61012b6101f7366004610e94565b6103ee565b61012b61020a366004610e94565b61046e565b61022261021d366004610fae565b61047c565b005b61013f610232366004611021565b6105e0565b60606003805461024690611054565b80601f016020809104026020016040519081016040528092919081815260200182805461027290611054565b80156102bf5780601f10610294576101008083540402835291602001916102bf565b820191906000526020600020905b8154815290600101906020018083116102a257829003601f168201915b5050505050905090565b6000336102d781858561060b565b60019150505b92915050565b6000336102f185828561072f565b6102fc8585856107a9565b506001949350505050565b600061031161094d565b905090565b6000336102d781858561032983836105e0565b6103339190611088565b61060b565b6001600160a01b0381166000908152600760205260408120546102dd565b60006060808280808361038a7f00000000000000000000000000000000000000000000000000000000000000006005610a78565b6103b57f00000000000000000000000000000000000000000000000000000000000000006006610a78565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60606004805461024690611054565b600033816103fc82866105e0565b9050838110156104615760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102fc828686840361060b565b6000336102d78185856107a9565b834211156104cc5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610458565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886104fb8c610b23565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061055682610b4b565b9050600061056682878787610b78565b9050896001600160a01b0316816001600160a01b0316146105c95760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610458565b6105d48a8a8a61060b565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661066d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610458565b6001600160a01b0382166106ce5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610458565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061073b84846105e0565b905060001981146107a357818110156107965760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610458565b6107a3848484840361060b565b50505050565b6001600160a01b03831661080d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610458565b6001600160a01b03821661086f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610458565b6001600160a01b038316600090815260208190526040902054818110156108e75760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610458565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36107a3565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156109a657507f000000000000000000000000000000000000000000000000000000000000000046145b156109d057507f000000000000000000000000000000000000000000000000000000000000000090565b610311604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b606060ff8314610a9257610a8b83610ba0565b90506102dd565b818054610a9e90611054565b80601f0160208091040260200160405190810160405280929190818152602001828054610aca90611054565b8015610b175780601f10610aec57610100808354040283529160200191610b17565b820191906000526020600020905b815481529060010190602001808311610afa57829003601f168201915b505050505090506102dd565b6001600160a01b03811660009081526007602052604090208054600181018255905b50919050565b60006102dd610b5861094d565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000610b8987878787610bdf565b91509150610b9681610ca3565b5095945050505050565b60606000610bad83610df0565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610c165750600090506003610c9a565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610c6a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610c9357600060019250925050610c9a565b9150600090505b94509492505050565b6000816004811115610cb757610cb76110a9565b03610cbf5750565b6001816004811115610cd357610cd36110a9565b03610d205760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610458565b6002816004811115610d3457610d346110a9565b03610d815760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610458565b6003816004811115610d9557610d956110a9565b03610ded5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610458565b50565b600060ff8216601f8111156102dd57604051632cd44ac360e21b815260040160405180910390fd5b6000815180845260005b81811015610e3e57602081850181015186830182015201610e22565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610e716020830184610e18565b9392505050565b80356001600160a01b0381168114610e8f57600080fd5b919050565b60008060408385031215610ea757600080fd5b610eb083610e78565b946020939093013593505050565b600080600060608486031215610ed357600080fd5b610edc84610e78565b9250610eea60208501610e78565b9150604084013590509250925092565b600060208284031215610f0c57600080fd5b610e7182610e78565b60ff60f81b881681526000602060e06020840152610f3660e084018a610e18565b8381036040850152610f48818a610e18565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b81811015610f9c57835183529284019291840191600101610f80565b50909c9b505050505050505050505050565b600080600080600080600060e0888a031215610fc957600080fd5b610fd288610e78565b9650610fe060208901610e78565b95506040880135945060608801359350608088013560ff8116811461100457600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561103457600080fd5b61103d83610e78565b915061104b60208401610e78565b90509250929050565b600181811c9082168061106857607f821691505b602082108103610b4557634e487b7160e01b600052602260045260246000fd5b808201808211156102dd57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea26469706673582212206e72095321c3bd31d3651229fc3894db77f2498725e8b01c87315d0e375dd41864736f6c63430008180033",
}
// OmniABI is the input ABI used to generate the binding from.
// Deprecated: Use OmniMetaData.ABI instead.
var OmniABI = OmniMetaData.ABI
// OmniBin is the compiled bytecode used for deploying new contracts.
// Deprecated: Use OmniMetaData.Bin instead.
var OmniBin = OmniMetaData.Bin
// DeployOmni deploys a new Ethereum contract, binding an instance of Omni to it.
func DeployOmni(auth *bind.TransactOpts, backend bind.ContractBackend, initialSupply *big.Int, recipient common.Address) (common.Address, *types.Transaction, *Omni, error) {
parsed, err := OmniMetaData.GetAbi()
if err != nil {
return common.Address{}, nil, nil, err
}
if parsed == nil {
return common.Address{}, nil, nil, errors.New("GetABI returned nil")
}
address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(OmniBin), backend, initialSupply, recipient)
if err != nil {
return common.Address{}, nil, nil, err
}
return address, tx, &Omni{OmniCaller: OmniCaller{contract: contract}, OmniTransactor: OmniTransactor{contract: contract}, OmniFilterer: OmniFilterer{contract: contract}}, nil
}
// Omni is an auto generated Go binding around an Ethereum contract.
type Omni struct {
OmniCaller // Read-only binding to the contract
OmniTransactor // Write-only binding to the contract
OmniFilterer // Log filterer for contract events
}
// OmniCaller is an auto generated read-only Go binding around an Ethereum contract.
type OmniCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// OmniTransactor is an auto generated write-only Go binding around an Ethereum contract.
type OmniTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// OmniFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type OmniFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// OmniSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type OmniSession struct {
Contract *Omni // Generic contract binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// OmniCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type OmniCallerSession struct {
Contract *OmniCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// OmniTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type OmniTransactorSession struct {
Contract *OmniTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// OmniRaw is an auto generated low-level Go binding around an Ethereum contract.
type OmniRaw struct {
Contract *Omni // Generic contract binding to access the raw methods on
}
// OmniCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type OmniCallerRaw struct {
Contract *OmniCaller // Generic read-only contract binding to access the raw methods on
}
// OmniTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type OmniTransactorRaw struct {
Contract *OmniTransactor // Generic write-only contract binding to access the raw methods on
}
// NewOmni creates a new instance of Omni, bound to a specific deployed contract.
func NewOmni(address common.Address, backend bind.ContractBackend) (*Omni, error) {
contract, err := bindOmni(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Omni{OmniCaller: OmniCaller{contract: contract}, OmniTransactor: OmniTransactor{contract: contract}, OmniFilterer: OmniFilterer{contract: contract}}, nil
}
// NewOmniCaller creates a new read-only instance of Omni, bound to a specific deployed contract.
func NewOmniCaller(address common.Address, caller bind.ContractCaller) (*OmniCaller, error) {
contract, err := bindOmni(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &OmniCaller{contract: contract}, nil
}
// NewOmniTransactor creates a new write-only instance of Omni, bound to a specific deployed contract.
func NewOmniTransactor(address common.Address, transactor bind.ContractTransactor) (*OmniTransactor, error) {
contract, err := bindOmni(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &OmniTransactor{contract: contract}, nil
}
// NewOmniFilterer creates a new log filterer instance of Omni, bound to a specific deployed contract.
func NewOmniFilterer(address common.Address, filterer bind.ContractFilterer) (*OmniFilterer, error) {
contract, err := bindOmni(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &OmniFilterer{contract: contract}, nil
}
// bindOmni binds a generic wrapper to an already deployed contract.
func bindOmni(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := OmniMetaData.GetAbi()
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_Omni *OmniRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Omni.Contract.OmniCaller.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_Omni *OmniRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Omni.Contract.OmniTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Omni *OmniRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Omni.Contract.OmniTransactor.contract.Transact(opts, method, params...)
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_Omni *OmniCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Omni.Contract.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_Omni *OmniTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Omni.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Omni *OmniTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Omni.Contract.contract.Transact(opts, method, params...)
}
// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515.
//
// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32)
func (_Omni *OmniCaller) DOMAINSEPARATOR(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
err := _Omni.contract.Call(opts, &out, "DOMAIN_SEPARATOR")
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515.
//
// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32)
func (_Omni *OmniSession) DOMAINSEPARATOR() ([32]byte, error) {
return _Omni.Contract.DOMAINSEPARATOR(&_Omni.CallOpts)
}
// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515.
//
// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32)
func (_Omni *OmniCallerSession) DOMAINSEPARATOR() ([32]byte, error) {
return _Omni.Contract.DOMAINSEPARATOR(&_Omni.CallOpts)
}
// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
//
// Solidity: function allowance(address owner, address spender) view returns(uint256)
func (_Omni *OmniCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) {
var out []interface{}
err := _Omni.contract.Call(opts, &out, "allowance", owner, spender)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
//
// Solidity: function allowance(address owner, address spender) view returns(uint256)
func (_Omni *OmniSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
return _Omni.Contract.Allowance(&_Omni.CallOpts, owner, spender)
}
// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
//
// Solidity: function allowance(address owner, address spender) view returns(uint256)
func (_Omni *OmniCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
return _Omni.Contract.Allowance(&_Omni.CallOpts, owner, spender)
}
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
//
// Solidity: function balanceOf(address account) view returns(uint256)
func (_Omni *OmniCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) {
var out []interface{}
err := _Omni.contract.Call(opts, &out, "balanceOf", account)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
//
// Solidity: function balanceOf(address account) view returns(uint256)
func (_Omni *OmniSession) BalanceOf(account common.Address) (*big.Int, error) {
return _Omni.Contract.BalanceOf(&_Omni.CallOpts, account)
}
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
//
// Solidity: function balanceOf(address account) view returns(uint256)
func (_Omni *OmniCallerSession) BalanceOf(account common.Address) (*big.Int, error) {
return _Omni.Contract.BalanceOf(&_Omni.CallOpts, account)
}
// Decimals is a free data retrieval call binding the contract method 0x313ce567.
//
// Solidity: function decimals() view returns(uint8)
func (_Omni *OmniCaller) Decimals(opts *bind.CallOpts) (uint8, error) {
var out []interface{}
err := _Omni.contract.Call(opts, &out, "decimals")
if err != nil {
return *new(uint8), err
}
out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
return out0, err
}
// Decimals is a free data retrieval call binding the contract method 0x313ce567.
//
// Solidity: function decimals() view returns(uint8)
func (_Omni *OmniSession) Decimals() (uint8, error) {
return _Omni.Contract.Decimals(&_Omni.CallOpts)
}
// Decimals is a free data retrieval call binding the contract method 0x313ce567.
//
// Solidity: function decimals() view returns(uint8)
func (_Omni *OmniCallerSession) Decimals() (uint8, error) {
return _Omni.Contract.Decimals(&_Omni.CallOpts)
}
// Eip712Domain is a free data retrieval call binding the contract method 0x84b0196e.
//
// Solidity: function eip712Domain() view returns(bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)
func (_Omni *OmniCaller) Eip712Domain(opts *bind.CallOpts) (struct {
Fields [1]byte
Name string
Version string
ChainId *big.Int
VerifyingContract common.Address
Salt [32]byte
Extensions []*big.Int
}, error) {
var out []interface{}
err := _Omni.contract.Call(opts, &out, "eip712Domain")
outstruct := new(struct {
Fields [1]byte
Name string
Version string
ChainId *big.Int
VerifyingContract common.Address
Salt [32]byte
Extensions []*big.Int
})
if err != nil {
return *outstruct, err
}
outstruct.Fields = *abi.ConvertType(out[0], new([1]byte)).(*[1]byte)
outstruct.Name = *abi.ConvertType(out[1], new(string)).(*string)
outstruct.Version = *abi.ConvertType(out[2], new(string)).(*string)
outstruct.ChainId = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int)
outstruct.VerifyingContract = *abi.ConvertType(out[4], new(common.Address)).(*common.Address)
outstruct.Salt = *abi.ConvertType(out[5], new([32]byte)).(*[32]byte)
outstruct.Extensions = *abi.ConvertType(out[6], new([]*big.Int)).(*[]*big.Int)
return *outstruct, err
}
// Eip712Domain is a free data retrieval call binding the contract method 0x84b0196e.
//
// Solidity: function eip712Domain() view returns(bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)
func (_Omni *OmniSession) Eip712Domain() (struct {
Fields [1]byte
Name string
Version string
ChainId *big.Int
VerifyingContract common.Address
Salt [32]byte
Extensions []*big.Int
}, error) {
return _Omni.Contract.Eip712Domain(&_Omni.CallOpts)
}
// Eip712Domain is a free data retrieval call binding the contract method 0x84b0196e.
//
// Solidity: function eip712Domain() view returns(bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)
func (_Omni *OmniCallerSession) Eip712Domain() (struct {
Fields [1]byte
Name string
Version string
ChainId *big.Int
VerifyingContract common.Address
Salt [32]byte
Extensions []*big.Int
}, error) {
return _Omni.Contract.Eip712Domain(&_Omni.CallOpts)
}
// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
// Solidity: function name() view returns(string)
func (_Omni *OmniCaller) Name(opts *bind.CallOpts) (string, error) {
var out []interface{}
err := _Omni.contract.Call(opts, &out, "name")
if err != nil {
return *new(string), err
}
out0 := *abi.ConvertType(out[0], new(string)).(*string)
return out0, err
}
// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
// Solidity: function name() view returns(string)
func (_Omni *OmniSession) Name() (string, error) {
return _Omni.Contract.Name(&_Omni.CallOpts)
}
// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
// Solidity: function name() view returns(string)
func (_Omni *OmniCallerSession) Name() (string, error) {
return _Omni.Contract.Name(&_Omni.CallOpts)
}
// Nonces is a free data retrieval call binding the contract method 0x7ecebe00.
//
// Solidity: function nonces(address owner) view returns(uint256)
func (_Omni *OmniCaller) Nonces(opts *bind.CallOpts, owner common.Address) (*big.Int, error) {
var out []interface{}
err := _Omni.contract.Call(opts, &out, "nonces", owner)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// Nonces is a free data retrieval call binding the contract method 0x7ecebe00.
//
// Solidity: function nonces(address owner) view returns(uint256)
func (_Omni *OmniSession) Nonces(owner common.Address) (*big.Int, error) {
return _Omni.Contract.Nonces(&_Omni.CallOpts, owner)
}
// Nonces is a free data retrieval call binding the contract method 0x7ecebe00.
//
// Solidity: function nonces(address owner) view returns(uint256)
func (_Omni *OmniCallerSession) Nonces(owner common.Address) (*big.Int, error) {
return _Omni.Contract.Nonces(&_Omni.CallOpts, owner)
}
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
//
// Solidity: function symbol() view returns(string)
func (_Omni *OmniCaller) Symbol(opts *bind.CallOpts) (string, error) {
var out []interface{}
err := _Omni.contract.Call(opts, &out, "symbol")
if err != nil {
return *new(string), err
}
out0 := *abi.ConvertType(out[0], new(string)).(*string)
return out0, err
}
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
//
// Solidity: function symbol() view returns(string)
func (_Omni *OmniSession) Symbol() (string, error) {
return _Omni.Contract.Symbol(&_Omni.CallOpts)
}
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
//
// Solidity: function symbol() view returns(string)
func (_Omni *OmniCallerSession) Symbol() (string, error) {
return _Omni.Contract.Symbol(&_Omni.CallOpts)
}
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
//
// Solidity: function totalSupply() view returns(uint256)
func (_Omni *OmniCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Omni.contract.Call(opts, &out, "totalSupply")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
//
// Solidity: function totalSupply() view returns(uint256)
func (_Omni *OmniSession) TotalSupply() (*big.Int, error) {
return _Omni.Contract.TotalSupply(&_Omni.CallOpts)
}
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
//
// Solidity: function totalSupply() view returns(uint256)
func (_Omni *OmniCallerSession) TotalSupply() (*big.Int, error) {
return _Omni.Contract.TotalSupply(&_Omni.CallOpts)
}
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
//
// Solidity: function approve(address spender, uint256 amount) returns(bool)
func (_Omni *OmniTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) {
return _Omni.contract.Transact(opts, "approve", spender, amount)
}
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
//
// Solidity: function approve(address spender, uint256 amount) returns(bool)
func (_Omni *OmniSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) {
return _Omni.Contract.Approve(&_Omni.TransactOpts, spender, amount)
}
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
//
// Solidity: function approve(address spender, uint256 amount) returns(bool)
func (_Omni *OmniTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) {
return _Omni.Contract.Approve(&_Omni.TransactOpts, spender, amount)
}
// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.
//
// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)
func (_Omni *OmniTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) {
return _Omni.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue)
}
// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.
//
// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)
func (_Omni *OmniSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) {
return _Omni.Contract.DecreaseAllowance(&_Omni.TransactOpts, spender, subtractedValue)
}
// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.
//
// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)
func (_Omni *OmniTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) {
return _Omni.Contract.DecreaseAllowance(&_Omni.TransactOpts, spender, subtractedValue)
}
// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.
//
// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)
func (_Omni *OmniTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) {
return _Omni.contract.Transact(opts, "increaseAllowance", spender, addedValue)
}
// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.
//
// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)
func (_Omni *OmniSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) {
return _Omni.Contract.IncreaseAllowance(&_Omni.TransactOpts, spender, addedValue)
}
// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.
//
// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)
func (_Omni *OmniTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) {
return _Omni.Contract.IncreaseAllowance(&_Omni.TransactOpts, spender, addedValue)
}
// Permit is a paid mutator transaction binding the contract method 0xd505accf.
//
// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns()
func (_Omni *OmniTransactor) Permit(opts *bind.TransactOpts, owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) {
return _Omni.contract.Transact(opts, "permit", owner, spender, value, deadline, v, r, s)
}
// Permit is a paid mutator transaction binding the contract method 0xd505accf.
//
// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns()
func (_Omni *OmniSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) {
return _Omni.Contract.Permit(&_Omni.TransactOpts, owner, spender, value, deadline, v, r, s)
}
// Permit is a paid mutator transaction binding the contract method 0xd505accf.
//
// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns()
func (_Omni *OmniTransactorSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) {
return _Omni.Contract.Permit(&_Omni.TransactOpts, owner, spender, value, deadline, v, r, s)
}
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
//
// Solidity: function transfer(address to, uint256 amount) returns(bool)
func (_Omni *OmniTransactor) Transfer(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) {
return _Omni.contract.Transact(opts, "transfer", to, amount)
}
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
//
// Solidity: function transfer(address to, uint256 amount) returns(bool)
func (_Omni *OmniSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) {
return _Omni.Contract.Transfer(&_Omni.TransactOpts, to, amount)
}
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
//
// Solidity: function transfer(address to, uint256 amount) returns(bool)
func (_Omni *OmniTransactorSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) {
return _Omni.Contract.Transfer(&_Omni.TransactOpts, to, amount)
}
// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
//
// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool)
func (_Omni *OmniTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) {
return _Omni.contract.Transact(opts, "transferFrom", from, to, amount)
}
// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
//
// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool)
func (_Omni *OmniSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) {
return _Omni.Contract.TransferFrom(&_Omni.TransactOpts, from, to, amount)
}
// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
//
// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool)
func (_Omni *OmniTransactorSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) {
return _Omni.Contract.TransferFrom(&_Omni.TransactOpts, from, to, amount)
}
// OmniApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the Omni contract.
type OmniApprovalIterator struct {
Event *OmniApproval // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *OmniApprovalIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(OmniApproval)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(OmniApproval)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *OmniApprovalIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *OmniApprovalIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// OmniApproval represents a Approval event raised by the Omni contract.
type OmniApproval struct {
Owner common.Address
Spender common.Address
Value *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
//
// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
func (_Omni *OmniFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*OmniApprovalIterator, error) {
var ownerRule []interface{}
for _, ownerItem := range owner {
ownerRule = append(ownerRule, ownerItem)
}
var spenderRule []interface{}
for _, spenderItem := range spender {
spenderRule = append(spenderRule, spenderItem)
}
logs, sub, err := _Omni.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule)
if err != nil {
return nil, err
}
return &OmniApprovalIterator{contract: _Omni.contract, event: "Approval", logs: logs, sub: sub}, nil
}
// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
//
// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
func (_Omni *OmniFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *OmniApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) {
var ownerRule []interface{}
for _, ownerItem := range owner {
ownerRule = append(ownerRule, ownerItem)
}
var spenderRule []interface{}
for _, spenderItem := range spender {
spenderRule = append(spenderRule, spenderItem)
}
logs, sub, err := _Omni.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(OmniApproval)
if err := _Omni.contract.UnpackLog(event, "Approval", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
//
// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
func (_Omni *OmniFilterer) ParseApproval(log types.Log) (*OmniApproval, error) {
event := new(OmniApproval)
if err := _Omni.contract.UnpackLog(event, "Approval", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// OmniEIP712DomainChangedIterator is returned from FilterEIP712DomainChanged and is used to iterate over the raw logs and unpacked data for EIP712DomainChanged events raised by the Omni contract.
type OmniEIP712DomainChangedIterator struct {
Event *OmniEIP712DomainChanged // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *OmniEIP712DomainChangedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(OmniEIP712DomainChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(OmniEIP712DomainChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *OmniEIP712DomainChangedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *OmniEIP712DomainChangedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// OmniEIP712DomainChanged represents a EIP712DomainChanged event raised by the Omni contract.
type OmniEIP712DomainChanged struct {
Raw types.Log // Blockchain specific contextual infos
}
// FilterEIP712DomainChanged is a free log retrieval operation binding the contract event 0x0a6387c9ea3628b88a633bb4f3b151770f70085117a15f9bf3787cda53f13d31.
//
// Solidity: event EIP712DomainChanged()
func (_Omni *OmniFilterer) FilterEIP712DomainChanged(opts *bind.FilterOpts) (*OmniEIP712DomainChangedIterator, error) {
logs, sub, err := _Omni.contract.FilterLogs(opts, "EIP712DomainChanged")
if err != nil {
return nil, err
}
return &OmniEIP712DomainChangedIterator{contract: _Omni.contract, event: "EIP712DomainChanged", logs: logs, sub: sub}, nil
}
// WatchEIP712DomainChanged is a free log subscription operation binding the contract event 0x0a6387c9ea3628b88a633bb4f3b151770f70085117a15f9bf3787cda53f13d31.
//
// Solidity: event EIP712DomainChanged()
func (_Omni *OmniFilterer) WatchEIP712DomainChanged(opts *bind.WatchOpts, sink chan<- *OmniEIP712DomainChanged) (event.Subscription, error) {
logs, sub, err := _Omni.contract.WatchLogs(opts, "EIP712DomainChanged")
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(OmniEIP712DomainChanged)
if err := _Omni.contract.UnpackLog(event, "EIP712DomainChanged", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseEIP712DomainChanged is a log parse operation binding the contract event 0x0a6387c9ea3628b88a633bb4f3b151770f70085117a15f9bf3787cda53f13d31.
//
// Solidity: event EIP712DomainChanged()
func (_Omni *OmniFilterer) ParseEIP712DomainChanged(log types.Log) (*OmniEIP712DomainChanged, error) {
event := new(OmniEIP712DomainChanged)
if err := _Omni.contract.UnpackLog(event, "EIP712DomainChanged", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// OmniTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Omni contract.
type OmniTransferIterator struct {
Event *OmniTransfer // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *OmniTransferIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(OmniTransfer)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(OmniTransfer)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *OmniTransferIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *OmniTransferIterator) Close() error {
it.sub.Unsubscribe()
return nil