This repository has been archived by the owner on Dec 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ditCoordinator.go
2689 lines (2362 loc) · 157 KB
/
ditCoordinator.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 ditCoordinator
import (
"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 (
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = abi.U256
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
)
// KNWTokenContractABI is the input ABI used to generate the binding from.
const KNWTokenContractABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"amountOfIDs\",\"outputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]"
// KNWTokenContractFuncSigs maps the 4-byte function signature to its string representation.
var KNWTokenContractFuncSigs = map[string]string{
"ffe03eba": "amountOfIDs()",
}
// KNWTokenContract is an auto generated Go binding around an Ethereum contract.
type KNWTokenContract struct {
KNWTokenContractCaller // Read-only binding to the contract
KNWTokenContractTransactor // Write-only binding to the contract
KNWTokenContractFilterer // Log filterer for contract events
}
// KNWTokenContractCaller is an auto generated read-only Go binding around an Ethereum contract.
type KNWTokenContractCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// KNWTokenContractTransactor is an auto generated write-only Go binding around an Ethereum contract.
type KNWTokenContractTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// KNWTokenContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type KNWTokenContractFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// KNWTokenContractSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type KNWTokenContractSession struct {
Contract *KNWTokenContract // 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
}
// KNWTokenContractCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type KNWTokenContractCallerSession struct {
Contract *KNWTokenContractCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// KNWTokenContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type KNWTokenContractTransactorSession struct {
Contract *KNWTokenContractTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// KNWTokenContractRaw is an auto generated low-level Go binding around an Ethereum contract.
type KNWTokenContractRaw struct {
Contract *KNWTokenContract // Generic contract binding to access the raw methods on
}
// KNWTokenContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type KNWTokenContractCallerRaw struct {
Contract *KNWTokenContractCaller // Generic read-only contract binding to access the raw methods on
}
// KNWTokenContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type KNWTokenContractTransactorRaw struct {
Contract *KNWTokenContractTransactor // Generic write-only contract binding to access the raw methods on
}
// NewKNWTokenContract creates a new instance of KNWTokenContract, bound to a specific deployed contract.
func NewKNWTokenContract(address common.Address, backend bind.ContractBackend) (*KNWTokenContract, error) {
contract, err := bindKNWTokenContract(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &KNWTokenContract{KNWTokenContractCaller: KNWTokenContractCaller{contract: contract}, KNWTokenContractTransactor: KNWTokenContractTransactor{contract: contract}, KNWTokenContractFilterer: KNWTokenContractFilterer{contract: contract}}, nil
}
// NewKNWTokenContractCaller creates a new read-only instance of KNWTokenContract, bound to a specific deployed contract.
func NewKNWTokenContractCaller(address common.Address, caller bind.ContractCaller) (*KNWTokenContractCaller, error) {
contract, err := bindKNWTokenContract(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &KNWTokenContractCaller{contract: contract}, nil
}
// NewKNWTokenContractTransactor creates a new write-only instance of KNWTokenContract, bound to a specific deployed contract.
func NewKNWTokenContractTransactor(address common.Address, transactor bind.ContractTransactor) (*KNWTokenContractTransactor, error) {
contract, err := bindKNWTokenContract(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &KNWTokenContractTransactor{contract: contract}, nil
}
// NewKNWTokenContractFilterer creates a new log filterer instance of KNWTokenContract, bound to a specific deployed contract.
func NewKNWTokenContractFilterer(address common.Address, filterer bind.ContractFilterer) (*KNWTokenContractFilterer, error) {
contract, err := bindKNWTokenContract(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &KNWTokenContractFilterer{contract: contract}, nil
}
// bindKNWTokenContract binds a generic wrapper to an already deployed contract.
func bindKNWTokenContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(KNWTokenContractABI))
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 (_KNWTokenContract *KNWTokenContractRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
return _KNWTokenContract.Contract.KNWTokenContractCaller.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 (_KNWTokenContract *KNWTokenContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _KNWTokenContract.Contract.KNWTokenContractTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_KNWTokenContract *KNWTokenContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _KNWTokenContract.Contract.KNWTokenContractTransactor.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 (_KNWTokenContract *KNWTokenContractCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
return _KNWTokenContract.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 (_KNWTokenContract *KNWTokenContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _KNWTokenContract.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_KNWTokenContract *KNWTokenContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _KNWTokenContract.Contract.contract.Transact(opts, method, params...)
}
// AmountOfIDs is a free data retrieval call binding the contract method 0xffe03eba.
//
// Solidity: function amountOfIDs() constant returns(uint256 amount)
func (_KNWTokenContract *KNWTokenContractCaller) AmountOfIDs(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _KNWTokenContract.contract.Call(opts, out, "amountOfIDs")
return *ret0, err
}
// AmountOfIDs is a free data retrieval call binding the contract method 0xffe03eba.
//
// Solidity: function amountOfIDs() constant returns(uint256 amount)
func (_KNWTokenContract *KNWTokenContractSession) AmountOfIDs() (*big.Int, error) {
return _KNWTokenContract.Contract.AmountOfIDs(&_KNWTokenContract.CallOpts)
}
// AmountOfIDs is a free data retrieval call binding the contract method 0xffe03eba.
//
// Solidity: function amountOfIDs() constant returns(uint256 amount)
func (_KNWTokenContract *KNWTokenContractCallerSession) AmountOfIDs() (*big.Int, error) {
return _KNWTokenContract.Contract.AmountOfIDs(&_KNWTokenContract.CallOpts)
}
// KNWVotingContractABI is the input ABI used to generate the binding from.
const KNWVotingContractABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_voteID\",\"type\":\"uint256\"},{\"name\":\"_voteOption\",\"type\":\"uint256\"},{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"finalizeVote\",\"outputs\":[{\"name\":\"reward\",\"type\":\"uint256\"},{\"name\":\"winningSide\",\"type\":\"bool\"},{\"name\":\"amountOfKNW\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newRepository\",\"type\":\"bytes32\"},{\"name\":\"_majority\",\"type\":\"uint256\"}],\"name\":\"addNewRepository\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"endVote\",\"outputs\":[{\"name\":\"votePassed\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_voteID\",\"type\":\"uint256\"},{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_voteOption\",\"type\":\"uint256\"},{\"name\":\"_salt\",\"type\":\"uint256\"}],\"name\":\"openVote\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_voteID\",\"type\":\"uint256\"},{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_secretHash\",\"type\":\"bytes32\"},{\"name\":\"_numberOfKNW\",\"type\":\"uint256\"}],\"name\":\"commitVote\",\"outputs\":[{\"name\":\"amountOfVotes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_knowledgeID\",\"type\":\"uint256\"},{\"name\":\"_voteDuration\",\"type\":\"uint256\"},{\"name\":\"_proposersStake\",\"type\":\"uint256\"},{\"name\":\"_numberOfKNW\",\"type\":\"uint256\"}],\"name\":\"startVote\",\"outputs\":[{\"name\":\"voteID\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
// KNWVotingContractFuncSigs maps the 4-byte function signature to its string representation.
var KNWVotingContractFuncSigs = map[string]string{
"828c1653": "addNewRepository(bytes32,uint256)",
"d4e0ac95": "commitVote(uint256,address,bytes32,uint256)",
"865df0ad": "endVote(uint256)",
"36bf4c91": "finalizeVote(uint256,uint256,address)",
"cdd6ceb9": "openVote(uint256,address,uint256,uint256)",
"e5023ff2": "startVote(bytes32,address,uint256,uint256,uint256,uint256)",
}
// KNWVotingContract is an auto generated Go binding around an Ethereum contract.
type KNWVotingContract struct {
KNWVotingContractCaller // Read-only binding to the contract
KNWVotingContractTransactor // Write-only binding to the contract
KNWVotingContractFilterer // Log filterer for contract events
}
// KNWVotingContractCaller is an auto generated read-only Go binding around an Ethereum contract.
type KNWVotingContractCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// KNWVotingContractTransactor is an auto generated write-only Go binding around an Ethereum contract.
type KNWVotingContractTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// KNWVotingContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type KNWVotingContractFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// KNWVotingContractSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type KNWVotingContractSession struct {
Contract *KNWVotingContract // 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
}
// KNWVotingContractCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type KNWVotingContractCallerSession struct {
Contract *KNWVotingContractCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// KNWVotingContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type KNWVotingContractTransactorSession struct {
Contract *KNWVotingContractTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// KNWVotingContractRaw is an auto generated low-level Go binding around an Ethereum contract.
type KNWVotingContractRaw struct {
Contract *KNWVotingContract // Generic contract binding to access the raw methods on
}
// KNWVotingContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type KNWVotingContractCallerRaw struct {
Contract *KNWVotingContractCaller // Generic read-only contract binding to access the raw methods on
}
// KNWVotingContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type KNWVotingContractTransactorRaw struct {
Contract *KNWVotingContractTransactor // Generic write-only contract binding to access the raw methods on
}
// NewKNWVotingContract creates a new instance of KNWVotingContract, bound to a specific deployed contract.
func NewKNWVotingContract(address common.Address, backend bind.ContractBackend) (*KNWVotingContract, error) {
contract, err := bindKNWVotingContract(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &KNWVotingContract{KNWVotingContractCaller: KNWVotingContractCaller{contract: contract}, KNWVotingContractTransactor: KNWVotingContractTransactor{contract: contract}, KNWVotingContractFilterer: KNWVotingContractFilterer{contract: contract}}, nil
}
// NewKNWVotingContractCaller creates a new read-only instance of KNWVotingContract, bound to a specific deployed contract.
func NewKNWVotingContractCaller(address common.Address, caller bind.ContractCaller) (*KNWVotingContractCaller, error) {
contract, err := bindKNWVotingContract(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &KNWVotingContractCaller{contract: contract}, nil
}
// NewKNWVotingContractTransactor creates a new write-only instance of KNWVotingContract, bound to a specific deployed contract.
func NewKNWVotingContractTransactor(address common.Address, transactor bind.ContractTransactor) (*KNWVotingContractTransactor, error) {
contract, err := bindKNWVotingContract(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &KNWVotingContractTransactor{contract: contract}, nil
}
// NewKNWVotingContractFilterer creates a new log filterer instance of KNWVotingContract, bound to a specific deployed contract.
func NewKNWVotingContractFilterer(address common.Address, filterer bind.ContractFilterer) (*KNWVotingContractFilterer, error) {
contract, err := bindKNWVotingContract(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &KNWVotingContractFilterer{contract: contract}, nil
}
// bindKNWVotingContract binds a generic wrapper to an already deployed contract.
func bindKNWVotingContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(KNWVotingContractABI))
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 (_KNWVotingContract *KNWVotingContractRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
return _KNWVotingContract.Contract.KNWVotingContractCaller.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 (_KNWVotingContract *KNWVotingContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _KNWVotingContract.Contract.KNWVotingContractTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_KNWVotingContract *KNWVotingContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _KNWVotingContract.Contract.KNWVotingContractTransactor.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 (_KNWVotingContract *KNWVotingContractCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
return _KNWVotingContract.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 (_KNWVotingContract *KNWVotingContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _KNWVotingContract.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_KNWVotingContract *KNWVotingContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _KNWVotingContract.Contract.contract.Transact(opts, method, params...)
}
// AddNewRepository is a paid mutator transaction binding the contract method 0x828c1653.
//
// Solidity: function addNewRepository(bytes32 _newRepository, uint256 _majority) returns(bool success)
func (_KNWVotingContract *KNWVotingContractTransactor) AddNewRepository(opts *bind.TransactOpts, _newRepository [32]byte, _majority *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.contract.Transact(opts, "addNewRepository", _newRepository, _majority)
}
// AddNewRepository is a paid mutator transaction binding the contract method 0x828c1653.
//
// Solidity: function addNewRepository(bytes32 _newRepository, uint256 _majority) returns(bool success)
func (_KNWVotingContract *KNWVotingContractSession) AddNewRepository(_newRepository [32]byte, _majority *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.Contract.AddNewRepository(&_KNWVotingContract.TransactOpts, _newRepository, _majority)
}
// AddNewRepository is a paid mutator transaction binding the contract method 0x828c1653.
//
// Solidity: function addNewRepository(bytes32 _newRepository, uint256 _majority) returns(bool success)
func (_KNWVotingContract *KNWVotingContractTransactorSession) AddNewRepository(_newRepository [32]byte, _majority *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.Contract.AddNewRepository(&_KNWVotingContract.TransactOpts, _newRepository, _majority)
}
// CommitVote is a paid mutator transaction binding the contract method 0xd4e0ac95.
//
// Solidity: function commitVote(uint256 _voteID, address _address, bytes32 _secretHash, uint256 _numberOfKNW) returns(uint256 amountOfVotes)
func (_KNWVotingContract *KNWVotingContractTransactor) CommitVote(opts *bind.TransactOpts, _voteID *big.Int, _address common.Address, _secretHash [32]byte, _numberOfKNW *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.contract.Transact(opts, "commitVote", _voteID, _address, _secretHash, _numberOfKNW)
}
// CommitVote is a paid mutator transaction binding the contract method 0xd4e0ac95.
//
// Solidity: function commitVote(uint256 _voteID, address _address, bytes32 _secretHash, uint256 _numberOfKNW) returns(uint256 amountOfVotes)
func (_KNWVotingContract *KNWVotingContractSession) CommitVote(_voteID *big.Int, _address common.Address, _secretHash [32]byte, _numberOfKNW *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.Contract.CommitVote(&_KNWVotingContract.TransactOpts, _voteID, _address, _secretHash, _numberOfKNW)
}
// CommitVote is a paid mutator transaction binding the contract method 0xd4e0ac95.
//
// Solidity: function commitVote(uint256 _voteID, address _address, bytes32 _secretHash, uint256 _numberOfKNW) returns(uint256 amountOfVotes)
func (_KNWVotingContract *KNWVotingContractTransactorSession) CommitVote(_voteID *big.Int, _address common.Address, _secretHash [32]byte, _numberOfKNW *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.Contract.CommitVote(&_KNWVotingContract.TransactOpts, _voteID, _address, _secretHash, _numberOfKNW)
}
// EndVote is a paid mutator transaction binding the contract method 0x865df0ad.
//
// Solidity: function endVote(uint256 _voteID) returns(bool votePassed)
func (_KNWVotingContract *KNWVotingContractTransactor) EndVote(opts *bind.TransactOpts, _voteID *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.contract.Transact(opts, "endVote", _voteID)
}
// EndVote is a paid mutator transaction binding the contract method 0x865df0ad.
//
// Solidity: function endVote(uint256 _voteID) returns(bool votePassed)
func (_KNWVotingContract *KNWVotingContractSession) EndVote(_voteID *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.Contract.EndVote(&_KNWVotingContract.TransactOpts, _voteID)
}
// EndVote is a paid mutator transaction binding the contract method 0x865df0ad.
//
// Solidity: function endVote(uint256 _voteID) returns(bool votePassed)
func (_KNWVotingContract *KNWVotingContractTransactorSession) EndVote(_voteID *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.Contract.EndVote(&_KNWVotingContract.TransactOpts, _voteID)
}
// FinalizeVote is a paid mutator transaction binding the contract method 0x36bf4c91.
//
// Solidity: function finalizeVote(uint256 _voteID, uint256 _voteOption, address _address) returns(uint256 reward, bool winningSide, uint256 amountOfKNW)
func (_KNWVotingContract *KNWVotingContractTransactor) FinalizeVote(opts *bind.TransactOpts, _voteID *big.Int, _voteOption *big.Int, _address common.Address) (*types.Transaction, error) {
return _KNWVotingContract.contract.Transact(opts, "finalizeVote", _voteID, _voteOption, _address)
}
// FinalizeVote is a paid mutator transaction binding the contract method 0x36bf4c91.
//
// Solidity: function finalizeVote(uint256 _voteID, uint256 _voteOption, address _address) returns(uint256 reward, bool winningSide, uint256 amountOfKNW)
func (_KNWVotingContract *KNWVotingContractSession) FinalizeVote(_voteID *big.Int, _voteOption *big.Int, _address common.Address) (*types.Transaction, error) {
return _KNWVotingContract.Contract.FinalizeVote(&_KNWVotingContract.TransactOpts, _voteID, _voteOption, _address)
}
// FinalizeVote is a paid mutator transaction binding the contract method 0x36bf4c91.
//
// Solidity: function finalizeVote(uint256 _voteID, uint256 _voteOption, address _address) returns(uint256 reward, bool winningSide, uint256 amountOfKNW)
func (_KNWVotingContract *KNWVotingContractTransactorSession) FinalizeVote(_voteID *big.Int, _voteOption *big.Int, _address common.Address) (*types.Transaction, error) {
return _KNWVotingContract.Contract.FinalizeVote(&_KNWVotingContract.TransactOpts, _voteID, _voteOption, _address)
}
// OpenVote is a paid mutator transaction binding the contract method 0xcdd6ceb9.
//
// Solidity: function openVote(uint256 _voteID, address _address, uint256 _voteOption, uint256 _salt) returns(bool success)
func (_KNWVotingContract *KNWVotingContractTransactor) OpenVote(opts *bind.TransactOpts, _voteID *big.Int, _address common.Address, _voteOption *big.Int, _salt *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.contract.Transact(opts, "openVote", _voteID, _address, _voteOption, _salt)
}
// OpenVote is a paid mutator transaction binding the contract method 0xcdd6ceb9.
//
// Solidity: function openVote(uint256 _voteID, address _address, uint256 _voteOption, uint256 _salt) returns(bool success)
func (_KNWVotingContract *KNWVotingContractSession) OpenVote(_voteID *big.Int, _address common.Address, _voteOption *big.Int, _salt *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.Contract.OpenVote(&_KNWVotingContract.TransactOpts, _voteID, _address, _voteOption, _salt)
}
// OpenVote is a paid mutator transaction binding the contract method 0xcdd6ceb9.
//
// Solidity: function openVote(uint256 _voteID, address _address, uint256 _voteOption, uint256 _salt) returns(bool success)
func (_KNWVotingContract *KNWVotingContractTransactorSession) OpenVote(_voteID *big.Int, _address common.Address, _voteOption *big.Int, _salt *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.Contract.OpenVote(&_KNWVotingContract.TransactOpts, _voteID, _address, _voteOption, _salt)
}
// StartVote is a paid mutator transaction binding the contract method 0xe5023ff2.
//
// Solidity: function startVote(bytes32 _repository, address _address, uint256 _knowledgeID, uint256 _voteDuration, uint256 _proposersStake, uint256 _numberOfKNW) returns(uint256 voteID)
func (_KNWVotingContract *KNWVotingContractTransactor) StartVote(opts *bind.TransactOpts, _repository [32]byte, _address common.Address, _knowledgeID *big.Int, _voteDuration *big.Int, _proposersStake *big.Int, _numberOfKNW *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.contract.Transact(opts, "startVote", _repository, _address, _knowledgeID, _voteDuration, _proposersStake, _numberOfKNW)
}
// StartVote is a paid mutator transaction binding the contract method 0xe5023ff2.
//
// Solidity: function startVote(bytes32 _repository, address _address, uint256 _knowledgeID, uint256 _voteDuration, uint256 _proposersStake, uint256 _numberOfKNW) returns(uint256 voteID)
func (_KNWVotingContract *KNWVotingContractSession) StartVote(_repository [32]byte, _address common.Address, _knowledgeID *big.Int, _voteDuration *big.Int, _proposersStake *big.Int, _numberOfKNW *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.Contract.StartVote(&_KNWVotingContract.TransactOpts, _repository, _address, _knowledgeID, _voteDuration, _proposersStake, _numberOfKNW)
}
// StartVote is a paid mutator transaction binding the contract method 0xe5023ff2.
//
// Solidity: function startVote(bytes32 _repository, address _address, uint256 _knowledgeID, uint256 _voteDuration, uint256 _proposersStake, uint256 _numberOfKNW) returns(uint256 voteID)
func (_KNWVotingContract *KNWVotingContractTransactorSession) StartVote(_repository [32]byte, _address common.Address, _knowledgeID *big.Int, _voteDuration *big.Int, _proposersStake *big.Int, _numberOfKNW *big.Int) (*types.Transaction, error) {
return _KNWVotingContract.Contract.StartVote(&_KNWVotingContract.TransactOpts, _repository, _address, _knowledgeID, _voteDuration, _proposersStake, _numberOfKNW)
}
// SafeMathABI is the input ABI used to generate the binding from.
const SafeMathABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"a\",\"type\":\"uint256\"}],\"name\":\"sqrt\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}]"
// SafeMathFuncSigs maps the 4-byte function signature to its string representation.
var SafeMathFuncSigs = map[string]string{
"677342ce": "sqrt(uint256)",
}
// SafeMathBin is the compiled bytecode used for deploying new contracts.
var SafeMathBin = "0x610129610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063677342ce146038575b600080fd5b605260048036036020811015604c57600080fd5b50356064565b60408051918252519081900360200190f35b60008160715750600060ef565b81826001011160bf576040805162461bcd60e51b8152602060048201526015602482015274119b185dd959081a5b9c1d5d08199bdc881cdc5c9d605a1b604482015290519081900360640190fd5b60026001830104825b8082101560eb57508060028180868160dc57fe5b04018160e457fe5b04915060c8565b5090505b91905056fea265627a7a72305820953020e84b9f63c03b694ac9fe34b1131c3ea11c415e206ee9a52f32f26c3bd364736f6c634300050a0032"
// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it.
func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) {
parsed, err := abi.JSON(strings.NewReader(SafeMathABI))
if err != nil {
return common.Address{}, nil, nil, err
}
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend)
if err != nil {
return common.Address{}, nil, nil, err
}
return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil
}
// SafeMath is an auto generated Go binding around an Ethereum contract.
type SafeMath struct {
SafeMathCaller // Read-only binding to the contract
SafeMathTransactor // Write-only binding to the contract
SafeMathFilterer // Log filterer for contract events
}
// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract.
type SafeMathCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract.
type SafeMathTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type SafeMathFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// SafeMathSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type SafeMathSession struct {
Contract *SafeMath // 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
}
// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type SafeMathCallerSession struct {
Contract *SafeMathCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type SafeMathTransactorSession struct {
Contract *SafeMathTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract.
type SafeMathRaw struct {
Contract *SafeMath // Generic contract binding to access the raw methods on
}
// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type SafeMathCallerRaw struct {
Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on
}
// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type SafeMathTransactorRaw struct {
Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on
}
// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract.
func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) {
contract, err := bindSafeMath(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil
}
// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract.
func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) {
contract, err := bindSafeMath(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &SafeMathCaller{contract: contract}, nil
}
// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract.
func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) {
contract, err := bindSafeMath(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &SafeMathTransactor{contract: contract}, nil
}
// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract.
func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) {
contract, err := bindSafeMath(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &SafeMathFilterer{contract: contract}, nil
}
// bindSafeMath binds a generic wrapper to an already deployed contract.
func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(SafeMathABI))
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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _SafeMath.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _SafeMath.Contract.contract.Transact(opts, method, params...)
}
// Sqrt is a free data retrieval call binding the contract method 0x677342ce.
//
// Solidity: function sqrt(uint256 a) constant returns(uint256)
func (_SafeMath *SafeMathCaller) Sqrt(opts *bind.CallOpts, a *big.Int) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _SafeMath.contract.Call(opts, out, "sqrt", a)
return *ret0, err
}
// Sqrt is a free data retrieval call binding the contract method 0x677342ce.
//
// Solidity: function sqrt(uint256 a) constant returns(uint256)
func (_SafeMath *SafeMathSession) Sqrt(a *big.Int) (*big.Int, error) {
return _SafeMath.Contract.Sqrt(&_SafeMath.CallOpts, a)
}
// Sqrt is a free data retrieval call binding the contract method 0x677342ce.
//
// Solidity: function sqrt(uint256 a) constant returns(uint256)
func (_SafeMath *SafeMathCallerSession) Sqrt(a *big.Int) (*big.Int, error) {
return _SafeMath.Contract.Sqrt(&_SafeMath.CallOpts, a)
}
// DitCoordinatorABI is the input ABI used to generate the binding from.
const DitCoordinatorABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"getKNWVoteIDFromProposalID\",\"outputs\":[{\"name\":\"KNWVoteID\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"}],\"name\":\"getCurrentProposalID\",\"outputs\":[{\"name\":\"currentProposalID\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_voteOption\",\"type\":\"uint256\"},{\"name\":\"_voteSalt\",\"type\":\"uint256\"}],\"name\":\"openVoteOnProposal\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"isKYCValidator\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_VOTE_DURATION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"repositories\",\"outputs\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"currentProposalID\",\"type\":\"uint256\"},{\"name\":\"votingMajority\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newManager\",\"type\":\"address\"}],\"name\":\"replaceManager\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"finalizeVote\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"revokeKYC\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"},{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposalsOfRepository\",\"outputs\":[{\"name\":\"description\",\"type\":\"string\"},{\"name\":\"identifier\",\"type\":\"string\"},{\"name\":\"KNWVoteID\",\"type\":\"uint256\"},{\"name\":\"knowledgeID\",\"type\":\"uint256\"},{\"name\":\"proposer\",\"type\":\"address\"},{\"name\":\"isFinalized\",\"type\":\"bool\"},{\"name\":\"proposalAccepted\",\"type\":\"bool\"},{\"name\":\"individualStake\",\"type\":\"uint256\"},{\"name\":\"totalStake\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_VOTE_DURATION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"}],\"name\":\"getVotingMajority\",\"outputs\":[{\"name\":\"votingMajority\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"manager\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"getIndividualStake\",\"outputs\":[{\"name\":\"individualStake\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_description\",\"type\":\"string\"},{\"name\":\"_identifier\",\"type\":\"string\"},{\"name\":\"_knowledgeID\",\"type\":\"uint256\"},{\"name\":\"_numberOfKNW\",\"type\":\"uint256\"},{\"name\":\"_voteDuration\",\"type\":\"uint256\"}],\"name\":\"proposeCommit\",\"outputs\":[{\"name\":\"proposalID\",\"type\":\"uint256\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"string\"},{\"name\":\"_knowledgeIDs\",\"type\":\"uint256[]\"},{\"name\":\"_votingMajority\",\"type\":\"uint256\"}],\"name\":\"initRepository\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"removeKYCValidator\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"proposalHasPassed\",\"outputs\":[{\"name\":\"hasPassed\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"KNWTokenAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextDitCoordinator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_voteHash\",\"type\":\"bytes32\"},{\"name\":\"_numberOfKNW\",\"type\":\"uint256\"}],\"name\":\"voteOnProposal\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"},{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allowedKnowledgeIDs\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BURNING_METHOD\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"passedKYC\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"addKYCValidator\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastDitCoordinator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"}],\"name\":\"getKnowledgeIDs\",\"outputs\":[{\"name\":\"knowledgeIDs\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"}],\"name\":\"repositoryIsInitialized\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"upgradeContract\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"KNWVotingAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"passKYC\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MINTING_METHOD\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"string\"}],\"name\":\"migrateRepository\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_KNWTokenAddress\",\"type\":\"address\"},{\"name\":\"_KNWVotingAddress\",\"type\":\"address\"},{\"name\":\"_lastDitCoordinator\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"who\",\"type\":\"address\"}],\"name\":\"InitializeRepository\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"knowledgeID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"numberOfKNW\",\"type\":\"uint256\"}],\"name\":\"ProposeCommit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"knowledgeID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"stake\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"numberOfKNW\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"numberOfVotes\",\"type\":\"uint256\"}],\"name\":\"CommitVote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"knowledgeID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"accept\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"numberOfVotes\",\"type\":\"uint256\"}],\"name\":\"OpenVote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"knowledgeID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"votedRight\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"numberOfKNW\",\"type\":\"uint256\"}],\"name\":\"FinalizeVote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"knowledgeID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"accepted\",\"type\":\"bool\"}],\"name\":\"FinalizeProposal\",\"type\":\"event\"}]"
// DitCoordinatorFuncSigs maps the 4-byte function signature to its string representation.
var DitCoordinatorFuncSigs = map[string]string{
"c814af1f": "BURNING_METHOD()",
"985dbfc5": "KNWTokenAddress()",
"eb49fe94": "KNWVotingAddress()",
"1ecbb9de": "MAX_VOTE_DURATION()",
"effb21e1": "MINTING_METHOD()",
"3eedfc10": "MIN_VOTE_DURATION()",
"d0c397ef": "addKYCValidator(address)",
"b3070331": "allowedKnowledgeIDs(bytes32,uint256)",
"2e71d0fb": "finalizeVote(bytes32,uint256)",
"0bdc90e8": "getCurrentProposalID(bytes32)",
"552edc9d": "getIndividualStake(bytes32,uint256)",
"06ee4596": "getKNWVoteIDFromProposalID(bytes32,uint256)",
"df1bd2cd": "getKnowledgeIDs(bytes32)",
"3fcc148d": "getVotingMajority(bytes32)",
"6c63b91e": "initRepository(string,uint256[],uint256)",
"1341f25c": "isKYCValidator(address)",
"d7ad0eae": "lastDitCoordinator()",
"481c6a75": "manager()",
"f60055cb": "migrateRepository(string)",
"99821d9b": "nextDitCoordinator()",
"0ee62ec0": "openVoteOnProposal(bytes32,uint256,uint256,uint256)",
"eb931024": "passKYC(address)",
"ccd9aa68": "passedKYC(address)",
"87c9203d": "proposalHasPassed(bytes32,uint256)",
"3e029f63": "proposalsOfRepository(bytes32,uint256)",
"627b90b3": "proposeCommit(bytes32,string,string,uint256,uint256,uint256)",
"73b0dddd": "removeKYCValidator(address)",
"23447982": "replaceManager(address)",
"1f51fd71": "repositories(bytes32)",
"ea6c6d0f": "repositoryIsInitialized(bytes32)",
"39ba645b": "revokeKYC(address)",
"eb2c0223": "upgradeContract(address)",
"ab4b593e": "voteOnProposal(bytes32,uint256,bytes32,uint256)",
}
// DitCoordinatorBin is the compiled bytecode used for deploying new contracts.
var DitCoordinatorBin = "0x608060405234801561001057600080fd5b5060405162002c6238038062002c628339818101604052606081101561003557600080fd5b50805160208201516040909201519091906001600160a01b0382161580159061006657506001600160a01b03831615155b6100bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018062002c35602d913960400191505060405180910390fd5b600080546001600160a01b039384166001600160a01b031991821617808355600580548316918616919091179055600180549585169582169590951780865560068054831691861691909117905560028054939094169281169290921790925533808352600b6020526040909220805460ff191690931790925560048054909216179055612ae580620001506000396000f3fe6080604052600436106101ee5760003560e01c806373b0dddd1161010d578063d0c397ef116100a0578063eb2c02231161006f578063eb2c0223146109e9578063eb49fe9414610a1c578063eb93102414610a31578063effb21e1146108b5578063f60055cb14610a64576101ee565b8063d0c397ef146108fd578063d7ad0eae14610930578063df1bd2cd14610945578063ea6c6d0f146109bf576101ee565b8063ab4b593e116100dc578063ab4b593e14610856578063b307033114610885578063c814af1f146108b5578063ccd9aa68146108ca576101ee565b806373b0dddd146107c957806387c9203d146107fc578063985dbfc51461082c57806399821d9b14610841576101ee565b806339ba645b11610185578063481c6a7511610154578063481c6a75146105cc578063552edc9d146105fd578063627b90b31461062d5780636c63b91e146106fe576101ee565b806339ba645b1461040a5780633e029f631461043d5780633eedfc101461058d5780633fcc148d146105a2576101ee565b80631ecbb9de116101c15780631ecbb9de146102e25780631f51fd71146102f757806323447982146103a75780632e71d0fb146103da576101ee565b806306ee4596146101f35780630bdc90e8146102355780630ee62ec01461025f5780631341f25c146102af575b600080fd5b3480156101ff57600080fd5b506102236004803603604081101561021657600080fd5b5080359060200135610adf565b60408051918252519081900360200190f35b34801561024157600080fd5b506102236004803603602081101561025857600080fd5b5035610aff565b34801561026b57600080fd5b5061029b6004803603608081101561028257600080fd5b5080359060208101359060408101359060600135610b14565b604080519115158252519081900360200190f35b3480156102bb57600080fd5b5061029b600480360360208110156102d257600080fd5b50356001600160a01b0316610c60565b3480156102ee57600080fd5b50610223610c75565b34801561030357600080fd5b506103216004803603602081101561031a57600080fd5b5035610c7c565b6040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b8381101561036a578181015183820152602001610352565b50505050905090810190601f1680156103975780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b3480156103b357600080fd5b5061029b600480360360208110156103ca57600080fd5b50356001600160a01b0316610d29565b3480156103e657600080fd5b5061029b600480360360408110156103fd57600080fd5b5080359060200135610d7b565b34801561041657600080fd5b5061029b6004803603602081101561042d57600080fd5b50356001600160a01b03166111aa565b34801561044957600080fd5b5061046d6004803603604081101561046057600080fd5b50803590602001356111ef565b60408051908101889052606081018790526001600160a01b038616608082015284151560a082015283151560c082015260e0810183905261010081018290526101208082528a5190820152895181906020808301916101408401918e019080838360005b838110156104e95781810151838201526020016104d1565b50505050905090810190601f1680156105165780820380516001836020036101000a031916815260200191505b5083810382528b5181528b516020918201918d019080838360005b83811015610549578181015183820152602001610531565b50505050905090810190601f1680156105765780820380516001836020036101000a031916815260200191505b509b50505050505050505050505060405180910390f35b34801561059957600080fd5b50610223611374565b3480156105ae57600080fd5b50610223600480360360208110156105c557600080fd5b5035611379565b3480156105d857600080fd5b506105e161138e565b604080516001600160a01b039092168252519081900360200190f35b34801561060957600080fd5b506102236004803603604081101561062057600080fd5b508035906020013561139d565b610223600480360360c081101561064357600080fd5b81359190810190604081016020820135600160201b81111561066457600080fd5b82018360208201111561067657600080fd5b803590602001918460018302840111600160201b8311171561069757600080fd5b919390929091602081019035600160201b8111156106b457600080fd5b8201836020820111156106c657600080fd5b803590602001918460018302840111600160201b831117156106e757600080fd5b9193509150803590602081013590604001356113bd565b34801561070a57600080fd5b5061029b6004803603606081101561072157600080fd5b810190602081018135600160201b81111561073b57600080fd5b82018360208201111561074d57600080fd5b803590602001918460018302840111600160201b8311171561076e57600080fd5b919390929091602081019035600160201b81111561078b57600080fd5b82018360208201111561079d57600080fd5b803590602001918460208302840111600160201b831117156107be57600080fd5b919350915035611866565b3480156107d557600080fd5b5061029b600480360360208110156107ec57600080fd5b50356001600160a01b0316611ce5565b34801561080857600080fd5b5061029b6004803603604081101561081f57600080fd5b5080359060200135611d2a565b34801561083857600080fd5b506105e1611dcd565b34801561084d57600080fd5b506105e1611ddc565b61029b6004803603608081101561086c57600080fd5b5080359060208101359060408101359060600135611deb565b34801561089157600080fd5b5061029b600480360360408110156108a857600080fd5b508035906020013561206e565b3480156108c157600080fd5b5061022361208e565b3480156108d657600080fd5b5061029b600480360360208110156108ed57600080fd5b50356001600160a01b0316612093565b34801561090957600080fd5b5061029b6004803603602081101561092057600080fd5b50356001600160a01b03166120a8565b34801561093c57600080fd5b506105e16120f1565b34801561095157600080fd5b5061096f6004803603602081101561096857600080fd5b5035612100565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156109ab578181015183820152602001610993565b505050509050019250505060405180910390f35b3480156109cb57600080fd5b5061029b600480360360208110156109e257600080fd5b5035612165565b3480156109f557600080fd5b5061029b60048036036020811015610a0c57600080fd5b50356001600160a01b031661217c565b348015610a2857600080fd5b506105e16121ce565b348015610a3d57600080fd5b5061029b60048036036020811015610a5457600080fd5b50356001600160a01b03166121dd565b348015610a7057600080fd5b5061029b60048036036020811015610a8757600080fd5b810190602081018135600160201b811115610aa157600080fd5b820183602082011115610ab357600080fd5b803590602001918460018302840111600160201b83111715610ad457600080fd5b509092509050612226565b600091825260096020908152604080842092845291905290206002015490565b60009081526007602052604090206002015490565b336000818152600a602052604081205490919060ff16610b3357600080fd5b6005546000878152600960209081526040808320898452825280832060020154815163cdd6ceb960e01b81526004810191909152336024820152604481018990526064810188905290516001600160a01b039094169363cdd6ceb993608480840194938390030190829087803b158015610bac57600080fd5b505af1158015610bc0573d6000803e3d6000fd5b505050506040513d6020811015610bd657600080fd5b5050600086815260096020908152604080832088845282528083203380855260078201845293829020600281018990556003909101549054825191825260018914938201939093528082019290925251879189917f1a245c311cb3eef22175d9c7c5458569e91d9a5956430216eaf8de7c1b7387609181900360600190a450600195945050505050565b600b6020526000908152604090205460ff1681565b62093a8081565b60076020908152600091825260409182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452909291839190830182828015610d135780601f10610ce857610100808354040283529160200191610d13565b820191906000526020600020905b815481529060010190602001808311610cf657829003601f168201915b5050505050908060020154908060030154905083565b6004546000906001600160a01b03163314610d4357600080fd5b6001600160a01b038216610d5657600080fd5b50600480546001600160a01b0383166001600160a01b03199091161790556001919050565b336000818152600a602052604081205490919060ff16610d9a57600080fd5b6000848152600960209081526040808320868452825280832033845260070190915290206003015460ff1615610e015760405162461bcd60e51b81526004018080602001828103825260278152602001806128d76027913960400191505060405180910390fd5b60008481526009602090815260408083208684528252808320338452600701909152902054151580610e57575060008481526009602090815260408083208684529091529020600401546001600160a01b031633145b610e925760405162461bcd60e51b815260040180806020018281038252603a815260200180612953603a913960400191505060405180910390fd5b6000848152600960209081526040808320868452909152902060040154600160a01b900460ff16610fde576005546000858152600960209081526040808320878452825280832060020154815163865df0ad60e01b8152600481019190915290516001600160a01b039094169363865df0ad93602480840194938390030190829087803b158015610f2257600080fd5b505af1158015610f36573d6000803e3d6000fd5b505050506040513d6020811015610f4c57600080fd5b50516000858152600960209081526040808320878452825291829020600481018054600160a01b60ff60a81b19909116600160a81b96151587021760ff60a01b19161790819055600390910154835190815260ff94909104939093161515908301528051859287927f7bb26c044d8d0bb569982fbbecdc73c4d75f05aa82ae7575f55d136d6d9c4bc192918290030190a35b60055460008581526009602090815260408083208784528252808320600280820154338087526007909301909452828520015482516336bf4c9160e01b8152600481019490945260248401526044830152519192839283926001600160a01b03909216916336bf4c9191606480830192606092919082900301818787803b15801561106857600080fd5b505af115801561107c573d6000803e3d6000fd5b505050506040513d606081101561109257600080fd5b5080516020820151604090920151909450909250905082156110dd57604051339084156108fc029085906000818181858888f193505050501580156110db573d6000803e3d6000fd5b505b600087815260096020908152604080832089845290915290206006015461110a908463ffffffff61270716565b60008881526009602090815260408083208a84528083528184206006810195909555338085526007860184528285206003908101805460ff19166001179055948c905290835292909301548351908152851515918101919091528083018490529151909188918a917f45b8e8084f290362eff12aa8825548cacdd5ce5bbd00dbcaeed1bec7cc8dbcd5919081900360600190a45060019695505050505050565b336000818152600b602052604081205490919060ff166111c957600080fd5b50506001600160a01b03166000908152600a60205260409020805460ff19169055600190565b600960209081526000928352604080842082529183529181902080548251601f60026000196101006001861615020190931692909204918201859004850281018501909352808352909283919083018282801561128d5780601f106112625761010080835404028352916020019161128d565b820191906000526020600020905b81548152906001019060200180831161127057829003601f168201915b505050505090806001018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561132b5780601f106113005761010080835404028352916020019161132b565b820191906000526020600020905b81548152906001019060200180831161130e57829003601f168201915b5050506002840154600385015460048601546005870154600690970154959692959194506001600160a01b038116935060ff600160a01b8204811693600160a81b909204169189565b603c81565b60009081526007602052604090206003015490565b6004546001600160a01b031681565b600091825260096020908152604080842092845291905290206005015490565b336000818152600a602052604081205490919060ff166113dc57600080fd5b6000341161141b5760405162461bcd60e51b8152600401808060200182810382526028815260200180612a896028913960400191505060405180910390fd5b603c831015801561142f575062093a808311155b611478576040805162461bcd60e51b8152602060048201526015602482015274159bdd1948191d5c985d1a5bdb881a5b9d985b1a59605a1b604482015290519081900360640190fd5b871580159061148657508515155b6114c15760405162461bcd60e51b815260040180806020018281038252602f8152602001806128a8602f913960400191505060405180910390fd5b6003546001600160a01b0316156115095760405162461bcd60e51b81526004018080602001828103825260228152602001806129316022913960400191505060405180910390fd5b60008a815260086020908152604080832088845290915290205460ff16611577576040805162461bcd60e51b815260206004820152601b60248201527f4b6e6f776c65646765204944206973206e6f7420636f72726563740000000000604482015290519081900360640190fd5b60008a81526007602052604081206002015461159a90600163ffffffff61274e16565b60008c8152600760209081526040918290206002018390558151610140601f8e018390049092028101820190925261012082018c8152929350909182918d908d9081908501838280828437600092019190915250505090825250604080516020601f8c018190048102820181019092528a815291810191908b908b9081908401838280828437600081840152601f19601f820116905080830192505050505050508152602001600560009054906101000a90046001600160a01b03166001600160a01b031663e5023ff28e338b8a348d6040518763ffffffff1660e01b815260040180878152602001866001600160a01b03166001600160a01b031681526020018581526020018481526020018381526020018281526020019650505050505050602060405180830381600087803b1580156116d557600080fd5b505af11580156116e9573d6000803e3d6000fd5b505050506040513d60208110156116ff57600080fd5b50518152602081810189905233604080840191909152600060608401819052608084018190523460a0850181905260c0909401939093528e835260098252808320858452825290912082518051919261175d92849290910190612799565b5060208281015180516117769260018501920190612799565b5060408281015160028084019190915560608401516003840155608084015160048401805460a087015160c08801511515600160a81b0260ff60a81b19911515600160a01b0260ff60a01b196001600160a01b039096166001600160a01b03199094169390931794909416919091171691909117905560e084015160058401556101009093015160069092019190915560008d815260076020908152908290209092015481518981529283018890528151339391928f927f603f65981d2b692fdcecdd4b4c97ebe242a11b1feb833e2c556a6a3bc27e4314929081900390910190a49a9950505050505050505050565b336000818152600a602052604081205490919060ff1661188557600080fd5b856118c15760405162461bcd60e51b81526004018080602001828103825260248152602001806129f36024913960400191505060405180910390fd5b60008787604051602001808383808284378083019250505092505050604051602081830303815290604052805190602001209050600760008281526020019081526020016000206003015460001461194a5760405162461bcd60e51b8152600401808060200182810382526027815260200180612a386027913960400191505060405180910390fd5b60328410156119a0576040805162461bcd60e51b815260206004820152601f60248201527f566f74696e67206d616a6f726974792068617320746f206265203e3d20353000604482015290519081900360640190fd5b846119dc5760405162461bcd60e51b8152600401808060200182810382526021815260200180612a176021913960400191505060405180910390fd5b6003546001600160a01b031615611a245760405162461bcd60e51b81526004018080602001828103825260228152602001806129316022913960400191505060405180910390fd5b600654604080516001620fe0a360e11b0319815290516000926001600160a01b03169163ffe03eba916004808301926020929190829003018186803b158015611a6c57600080fd5b505afa158015611a80573d6000803e3d6000fd5b505050506040513d6020811015611a9657600080fd5b5051905060005b86811015611b4f5781888883818110611ab257fe5b9050602002013510611b02576040805162461bcd60e51b8152602060048201526014602482015273125b9d985b1a590812db9bdddb195919d948125160621b604482015290519081900360640190fd5b60008381526008602052604081206001918a8a85818110611b1f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101611a9d565b5060405180608001604052808a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050908252506040805160208a810282810182019093528a82529283019290918b918b91829185019084908082843760009201829052509385525050506020808301829052604092830189905285825260078152919020825180519192611bfa92849290910190612799565b506020828101518051611c139260018501920190612817565b506040828101516002830155606090920151600390910155600554815163828c165360e01b8152600481018590526024810188905291516001600160a01b039091169163828c16539160448083019260209291908290030181600087803b158015611c7d57600080fd5b505af1158015611c91573d6000803e3d6000fd5b505050506040513d6020811015611ca757600080fd5b5050604051339083907fe81437d5f3c837aab5b46f923704dc104204a127033e0dd0e24e7ad8d2b3c7be90600090a350600198975050505050505050565b336000818152600b602052604081205490919060ff16611d0457600080fd5b50506001600160a01b03166000908152600b60205260409020805460ff19169055600190565b6000828152600960209081526040808320848452909152812060040154600160a01b900460ff16611da2576040805162461bcd60e51b815260206004820152601d60248201527f50726f706f73616c206861736e2774206265656e207265736f6c766564000000604482015290519081900360640190fd5b506000918252600960209081526040808420928452919052902060040154600160a81b900460ff1690565b6001546001600160a01b031681565b6003546001600160a01b031681565b336000818152600a602052604081205490919060ff16611e0a57600080fd5b60008681526009602090815260408083208884529091529020600501543414611e645760405162461bcd60e51b815260040180806020018281038252603981526020018061286f6039913960400191505060405180910390fd5b60008681526009602090815260408083208884529091529020600401546001600160a01b0316331415611ec85760405162461bcd60e51b81526004018080602001828103825260318152602001806129c26031913960400191505060405180910390fd5b6000868152600960209081526040808320888452909152902060060154611ef5903463ffffffff61274e16565b600087815260096020908152604080832089845282528083206006810194909455600554600290940154815163d4e0ac9560e01b815260048101919091523360248201526044810189905260648101889052905192936001600160a01b03169263d4e0ac959260848084019391929182900301818787803b158015611f7957600080fd5b505af1158015611f8d573d6000803e3d6000fd5b505050506040513d6020811015611fa357600080fd5b5051905080611fe35760405162461bcd60e51b81526004018080602001828103825260338152602001806128fe6033913960400191505060405180910390fd5b600087815260096020908152604080832089845280835281842033808652600782018552838620879055948b90529083526003015481519081523492810192909252818101879052606082018490525188918a917f2edd4beb5f5626bb825280acc138e2ffc3190dff1e0d8e4563febc24ed3425499181900360800190a45060019695505050505050565b600860209081526000928352604080842090915290825290205460ff1681565b600081565b600a6020526000908152604090205460ff1681565b336000818152600b602052604081205490919060ff166120c757600080fd5b50506001600160a01b03166000908152600b60205260409020805460ff1916600190811790915590565b6002546001600160a01b031681565b60008181526007602090815260409182902060010180548351818402810184019094528084526060939283018282801561215957602002820191906000526020600020905b815481526020019060010190808311612145575b50505050509050919050565b600090815260076020526040902060030154151590565b6004546000906001600160a01b0316331461219657600080fd5b6001600160a01b0382166121a957600080fd5b50600380546001600160a01b0383166001600160a01b03199091161790556001919050565b6000546001600160a01b031681565b336000818152600b602052604081205490919060ff166121fc57600080fd5b50506001600160a01b03166000908152600a60205260409020805460ff1916600190811790915590565b336000818152600a602052604081205490919060ff1661224557600080fd5b6002546001600160a01b031661225a57600080fd5b6002546001600160a01b0316836122a25760405162461bcd60e51b81526004018080602001828103825260248152602001806129f36024913960400191505060405180910390fd5b600085856040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012090506000826001600160a01b0316630bdc90e8836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561231c57600080fd5b505afa158015612330573d6000803e3d6000fd5b505050506040513d602081101561234657600080fd5b505160408051633fcc148d60e01b81526004810185905290519192506000916001600160a01b03861691633fcc148d916024808301926020929190829003018186803b15801561239557600080fd5b505afa1580156123a9573d6000803e3d6000fd5b505050506040513d60208110156123bf57600080fd5b50516040805163df1bd2cd60e01b81526004810186905290519192506060916001600160a01b0387169163df1bd2cd916024808301926000929190829003018186803b15801561240e57600080fd5b505afa158015612422573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561244b57600080fd5b810190808051600160201b81111561246257600080fd5b8201602081018481111561247557600080fd5b81518560208202830111600160201b8211171561249157600080fd5b5050600654604080516001620fe0a360e11b031981529051929650600095506001600160a01b03909116935063ffe03eba9250600480820192602092909190829003018186803b1580156124e457600080fd5b505afa1580156124f8573d6000803e3d6000fd5b505050506040513d602081101561250e57600080fd5b5051905060005b82518110156125cd578183828151811061252b57fe5b60200260200101511061257c576040805162461bcd60e51b8152602060048201526014602482015273125b9d985b1a590812db9bdddb195919d948125160621b604482015290519081900360640190fd5b600086815260086020526040812084516001929086908590811061259c57fe5b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101612515565b5060405180608001604052808b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509385525050506020808301869052604080840189905260609093018790528882526007815291902082518051919261264892849290910190612799565b5060208281015180516126619260018501920190612817565b506040828101516002830155606090920151600390910155600554815163828c165360e01b8152600481018890526024810186905291516001600160a01b039091169163828c16539160448083019260209291908290030181600087803b1580156126cb57600080fd5b505af11580156126df573d6000803e3d6000fd5b505050506040513d60208110156126f557600080fd5b5060019b9a5050505050505050505050565b6000828211156127485760405162461bcd60e51b815260040180806020018281038252603581526020018061298d6035913960400191505060405180910390fd5b50900390565b6000828201838110156127925760405162461bcd60e51b815260040180806020018281038252602a815260200180612a5f602a913960400191505060405180910390fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106127da57805160ff1916838001178555612807565b82800160010185558215612807579182015b828111156128075782518255916020019190600101906127ec565b50612813929150612851565b5090565b82805482825590600052602060002090810192821561280757916020028201828111156128075782518255916020019190600101906127ec565b61286b91905b808211156128135760008155600101612857565b9056fe56616c7565206f6620746865207472616e73616374696f6e20646f65736e2774206d6174636820746865207265717569726564207374616b65546f70696320616e64206964656e746966696572206f662070726f706f73616c2063616e277420626520656d70747945616368207061727469636970616e742063616e206f6e6c792066696e616c697a65206f6e6365566f74696e6720636f6e74726163742072657475726e656420616e20696e76616c696420616d6f756e74206f6620766f74657354686572652069732061206e6577657220636f6e7472616374206465706c6f7965644f6e6c79207061727469636970616e7473206f662074686520766f7465206172652061626c6520746f207265736f6c76652074686520766f746543616e27742073756274726163742061206e756d6265722066726f6d206120736d616c6c6572206f6e6520776974682075696e74735468652070726f706f736572206973206e6f7420616c6c6f77656420746f20766f746520696e20612070726f706f73616c5265706f7369746f72792064657363726970746f722063616e277420626520656d70747950726f76696465206174206c65617374206f6e65206b6e6f776c656467652049445265706f7369746f72792063616e206f6e6c7920626520696e697469616c697a6564206f6e6365526573756c742068617320746f20626520626967676572207468616e20626f74682073756d6d616e647356616c7565206f6620746865207472616e73616374696f6e2063616e206e6f74206265207a65726fa265627a7a7230582012735cf3401f41fb7a143f5033c8e080b7eaaa6a4620290701953f66fd5a333664736f6c634300050a00324b4e57566f74696e6720616e64204b4e57546f6b656e20616464726573732063616e277420626520656d707479"
// DeployDitCoordinator deploys a new Ethereum contract, binding an instance of DitCoordinator to it.
func DeployDitCoordinator(auth *bind.TransactOpts, backend bind.ContractBackend, _KNWTokenAddress common.Address, _KNWVotingAddress common.Address, _lastDitCoordinator common.Address) (common.Address, *types.Transaction, *DitCoordinator, error) {
parsed, err := abi.JSON(strings.NewReader(DitCoordinatorABI))
if err != nil {
return common.Address{}, nil, nil, err
}
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(DitCoordinatorBin), backend, _KNWTokenAddress, _KNWVotingAddress, _lastDitCoordinator)
if err != nil {
return common.Address{}, nil, nil, err
}
return address, tx, &DitCoordinator{DitCoordinatorCaller: DitCoordinatorCaller{contract: contract}, DitCoordinatorTransactor: DitCoordinatorTransactor{contract: contract}, DitCoordinatorFilterer: DitCoordinatorFilterer{contract: contract}}, nil
}
// DitCoordinator is an auto generated Go binding around an Ethereum contract.
type DitCoordinator struct {
DitCoordinatorCaller // Read-only binding to the contract
DitCoordinatorTransactor // Write-only binding to the contract
DitCoordinatorFilterer // Log filterer for contract events
}
// DitCoordinatorCaller is an auto generated read-only Go binding around an Ethereum contract.
type DitCoordinatorCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// DitCoordinatorTransactor is an auto generated write-only Go binding around an Ethereum contract.
type DitCoordinatorTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// DitCoordinatorFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type DitCoordinatorFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// DitCoordinatorSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type DitCoordinatorSession struct {
Contract *DitCoordinator // 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
}
// DitCoordinatorCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type DitCoordinatorCallerSession struct {
Contract *DitCoordinatorCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// DitCoordinatorTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type DitCoordinatorTransactorSession struct {
Contract *DitCoordinatorTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// DitCoordinatorRaw is an auto generated low-level Go binding around an Ethereum contract.
type DitCoordinatorRaw struct {
Contract *DitCoordinator // Generic contract binding to access the raw methods on
}
// DitCoordinatorCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type DitCoordinatorCallerRaw struct {
Contract *DitCoordinatorCaller // Generic read-only contract binding to access the raw methods on
}
// DitCoordinatorTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type DitCoordinatorTransactorRaw struct {
Contract *DitCoordinatorTransactor // Generic write-only contract binding to access the raw methods on
}
// NewDitCoordinator creates a new instance of DitCoordinator, bound to a specific deployed contract.
func NewDitCoordinator(address common.Address, backend bind.ContractBackend) (*DitCoordinator, error) {
contract, err := bindDitCoordinator(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &DitCoordinator{DitCoordinatorCaller: DitCoordinatorCaller{contract: contract}, DitCoordinatorTransactor: DitCoordinatorTransactor{contract: contract}, DitCoordinatorFilterer: DitCoordinatorFilterer{contract: contract}}, nil
}
// NewDitCoordinatorCaller creates a new read-only instance of DitCoordinator, bound to a specific deployed contract.
func NewDitCoordinatorCaller(address common.Address, caller bind.ContractCaller) (*DitCoordinatorCaller, error) {
contract, err := bindDitCoordinator(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &DitCoordinatorCaller{contract: contract}, nil
}
// NewDitCoordinatorTransactor creates a new write-only instance of DitCoordinator, bound to a specific deployed contract.
func NewDitCoordinatorTransactor(address common.Address, transactor bind.ContractTransactor) (*DitCoordinatorTransactor, error) {
contract, err := bindDitCoordinator(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &DitCoordinatorTransactor{contract: contract}, nil
}
// NewDitCoordinatorFilterer creates a new log filterer instance of DitCoordinator, bound to a specific deployed contract.
func NewDitCoordinatorFilterer(address common.Address, filterer bind.ContractFilterer) (*DitCoordinatorFilterer, error) {
contract, err := bindDitCoordinator(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &DitCoordinatorFilterer{contract: contract}, nil
}
// bindDitCoordinator binds a generic wrapper to an already deployed contract.
func bindDitCoordinator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(DitCoordinatorABI))
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 (_DitCoordinator *DitCoordinatorRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
return _DitCoordinator.Contract.DitCoordinatorCaller.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 (_DitCoordinator *DitCoordinatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _DitCoordinator.Contract.DitCoordinatorTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_DitCoordinator *DitCoordinatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _DitCoordinator.Contract.DitCoordinatorTransactor.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 (_DitCoordinator *DitCoordinatorCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
return _DitCoordinator.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 (_DitCoordinator *DitCoordinatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _DitCoordinator.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_DitCoordinator *DitCoordinatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _DitCoordinator.Contract.contract.Transact(opts, method, params...)
}
// BURNINGMETHOD is a free data retrieval call binding the contract method 0xc814af1f.
//
// Solidity: function BURNING_METHOD() constant returns(uint256)
func (_DitCoordinator *DitCoordinatorCaller) BURNINGMETHOD(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _DitCoordinator.contract.Call(opts, out, "BURNING_METHOD")
return *ret0, err
}
// BURNINGMETHOD is a free data retrieval call binding the contract method 0xc814af1f.
//
// Solidity: function BURNING_METHOD() constant returns(uint256)
func (_DitCoordinator *DitCoordinatorSession) BURNINGMETHOD() (*big.Int, error) {
return _DitCoordinator.Contract.BURNINGMETHOD(&_DitCoordinator.CallOpts)
}
// BURNINGMETHOD is a free data retrieval call binding the contract method 0xc814af1f.
//
// Solidity: function BURNING_METHOD() constant returns(uint256)
func (_DitCoordinator *DitCoordinatorCallerSession) BURNINGMETHOD() (*big.Int, error) {
return _DitCoordinator.Contract.BURNINGMETHOD(&_DitCoordinator.CallOpts)
}
// KNWTokenAddress is a free data retrieval call binding the contract method 0x985dbfc5.
//
// Solidity: function KNWTokenAddress() constant returns(address)
func (_DitCoordinator *DitCoordinatorCaller) KNWTokenAddress(opts *bind.CallOpts) (common.Address, error) {
var (
ret0 = new(common.Address)
)
out := ret0
err := _DitCoordinator.contract.Call(opts, out, "KNWTokenAddress")
return *ret0, err
}
// KNWTokenAddress is a free data retrieval call binding the contract method 0x985dbfc5.
//
// Solidity: function KNWTokenAddress() constant returns(address)
func (_DitCoordinator *DitCoordinatorSession) KNWTokenAddress() (common.Address, error) {
return _DitCoordinator.Contract.KNWTokenAddress(&_DitCoordinator.CallOpts)
}
// KNWTokenAddress is a free data retrieval call binding the contract method 0x985dbfc5.
//
// Solidity: function KNWTokenAddress() constant returns(address)
func (_DitCoordinator *DitCoordinatorCallerSession) KNWTokenAddress() (common.Address, error) {
return _DitCoordinator.Contract.KNWTokenAddress(&_DitCoordinator.CallOpts)
}
// KNWVotingAddress is a free data retrieval call binding the contract method 0xeb49fe94.
//
// Solidity: function KNWVotingAddress() constant returns(address)
func (_DitCoordinator *DitCoordinatorCaller) KNWVotingAddress(opts *bind.CallOpts) (common.Address, error) {
var (
ret0 = new(common.Address)
)
out := ret0
err := _DitCoordinator.contract.Call(opts, out, "KNWVotingAddress")
return *ret0, err
}
// KNWVotingAddress is a free data retrieval call binding the contract method 0xeb49fe94.
//
// Solidity: function KNWVotingAddress() constant returns(address)
func (_DitCoordinator *DitCoordinatorSession) KNWVotingAddress() (common.Address, error) {
return _DitCoordinator.Contract.KNWVotingAddress(&_DitCoordinator.CallOpts)
}
// KNWVotingAddress is a free data retrieval call binding the contract method 0xeb49fe94.
//
// Solidity: function KNWVotingAddress() constant returns(address)
func (_DitCoordinator *DitCoordinatorCallerSession) KNWVotingAddress() (common.Address, error) {
return _DitCoordinator.Contract.KNWVotingAddress(&_DitCoordinator.CallOpts)
}
// MAXVOTEDURATION is a free data retrieval call binding the contract method 0x1ecbb9de.
//
// Solidity: function MAX_VOTE_DURATION() constant returns(uint256)
func (_DitCoordinator *DitCoordinatorCaller) MAXVOTEDURATION(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _DitCoordinator.contract.Call(opts, out, "MAX_VOTE_DURATION")
return *ret0, err
}
// MAXVOTEDURATION is a free data retrieval call binding the contract method 0x1ecbb9de.
//
// Solidity: function MAX_VOTE_DURATION() constant returns(uint256)
func (_DitCoordinator *DitCoordinatorSession) MAXVOTEDURATION() (*big.Int, error) {
return _DitCoordinator.Contract.MAXVOTEDURATION(&_DitCoordinator.CallOpts)
}
// MAXVOTEDURATION is a free data retrieval call binding the contract method 0x1ecbb9de.
//
// Solidity: function MAX_VOTE_DURATION() constant returns(uint256)
func (_DitCoordinator *DitCoordinatorCallerSession) MAXVOTEDURATION() (*big.Int, error) {
return _DitCoordinator.Contract.MAXVOTEDURATION(&_DitCoordinator.CallOpts)
}
// MINTINGMETHOD is a free data retrieval call binding the contract method 0xeffb21e1.
//
// Solidity: function MINTING_METHOD() constant returns(uint256)
func (_DitCoordinator *DitCoordinatorCaller) MINTINGMETHOD(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _DitCoordinator.contract.Call(opts, out, "MINTING_METHOD")
return *ret0, err
}
// MINTINGMETHOD is a free data retrieval call binding the contract method 0xeffb21e1.
//
// Solidity: function MINTING_METHOD() constant returns(uint256)
func (_DitCoordinator *DitCoordinatorSession) MINTINGMETHOD() (*big.Int, error) {
return _DitCoordinator.Contract.MINTINGMETHOD(&_DitCoordinator.CallOpts)
}