/
plasma_mvp.go
1616 lines (1429 loc) · 67 KB
/
plasma_mvp.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 wrappers
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
)
// PlasmaMVPABI is the input ABI used to generate the binding from.
const PlasmaMVPABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"txIndexFactor\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balances\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"maxTxnsPerBLock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastCommittedBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"txExits\",\"outputs\":[{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"createdAt\",\"type\":\"uint256\"},{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"state\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blockIndexFactor\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"deposits\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"createdAt\",\"type\":\"uint256\"},{\"name\":\"ethBlockNum\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalWithdrawBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"depositExits\",\"outputs\":[{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"createdAt\",\"type\":\"uint256\"},{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"state\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"depositNonce\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"childChain\",\"outputs\":[{\"name\":\"root\",\"type\":\"bytes32\"},{\"name\":\"numTxns\",\"type\":\"uint256\"},{\"name\":\"createdAt\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"AddedToBalances\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"root\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"numTxns\",\"type\":\"uint256\"}],\"name\":\"BlockSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"depositor\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"depositNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"ethBlockNum\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"position\",\"type\":\"uint256[3]\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"confirmSignatures\",\"type\":\"bytes\"}],\"name\":\"StartedTransactionExit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"StartedDepositExit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"position\",\"type\":\"uint256[4]\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ChallengedExit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"position\",\"type\":\"uint256[4]\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FinalizedExit\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"name\":\"headers\",\"type\":\"bytes32[]\"},{\"name\":\"txnsPerBlock\",\"type\":\"uint256[]\"},{\"name\":\"blockNum\",\"type\":\"uint256\"}],\"name\":\"submitBlock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"startDepositExit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"txPos\",\"type\":\"uint256[3]\"},{\"name\":\"txBytes\",\"type\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\"},{\"name\":\"confirmSignatures\",\"type\":\"bytes\"}],\"name\":\"startTransactionExit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"exitingTxPos\",\"type\":\"uint256[4]\"},{\"name\":\"challengingTxPos\",\"type\":\"uint256[2]\"},{\"name\":\"txBytes\",\"type\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\"},{\"name\":\"confirmSignature\",\"type\":\"bytes\"}],\"name\":\"challengeExit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"finalizeDepositExits\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"finalizeTransactionExits\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"childChainBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]"
// PlasmaMVP is an auto generated Go binding around an Ethereum contract.
type PlasmaMVP struct {
PlasmaMVPCaller // Read-only binding to the contract
PlasmaMVPTransactor // Write-only binding to the contract
PlasmaMVPFilterer // Log filterer for contract events
}
// PlasmaMVPCaller is an auto generated read-only Go binding around an Ethereum contract.
type PlasmaMVPCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// PlasmaMVPTransactor is an auto generated write-only Go binding around an Ethereum contract.
type PlasmaMVPTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// PlasmaMVPFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type PlasmaMVPFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// PlasmaMVPSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type PlasmaMVPSession struct {
Contract *PlasmaMVP // 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
}
// PlasmaMVPCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type PlasmaMVPCallerSession struct {
Contract *PlasmaMVPCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// PlasmaMVPTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type PlasmaMVPTransactorSession struct {
Contract *PlasmaMVPTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// PlasmaMVPRaw is an auto generated low-level Go binding around an Ethereum contract.
type PlasmaMVPRaw struct {
Contract *PlasmaMVP // Generic contract binding to access the raw methods on
}
// PlasmaMVPCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type PlasmaMVPCallerRaw struct {
Contract *PlasmaMVPCaller // Generic read-only contract binding to access the raw methods on
}
// PlasmaMVPTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type PlasmaMVPTransactorRaw struct {
Contract *PlasmaMVPTransactor // Generic write-only contract binding to access the raw methods on
}
// NewPlasmaMVP creates a new instance of PlasmaMVP, bound to a specific deployed contract.
func NewPlasmaMVP(address common.Address, backend bind.ContractBackend) (*PlasmaMVP, error) {
contract, err := bindPlasmaMVP(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &PlasmaMVP{PlasmaMVPCaller: PlasmaMVPCaller{contract: contract}, PlasmaMVPTransactor: PlasmaMVPTransactor{contract: contract}, PlasmaMVPFilterer: PlasmaMVPFilterer{contract: contract}}, nil
}
// NewPlasmaMVPCaller creates a new read-only instance of PlasmaMVP, bound to a specific deployed contract.
func NewPlasmaMVPCaller(address common.Address, caller bind.ContractCaller) (*PlasmaMVPCaller, error) {
contract, err := bindPlasmaMVP(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &PlasmaMVPCaller{contract: contract}, nil
}
// NewPlasmaMVPTransactor creates a new write-only instance of PlasmaMVP, bound to a specific deployed contract.
func NewPlasmaMVPTransactor(address common.Address, transactor bind.ContractTransactor) (*PlasmaMVPTransactor, error) {
contract, err := bindPlasmaMVP(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &PlasmaMVPTransactor{contract: contract}, nil
}
// NewPlasmaMVPFilterer creates a new log filterer instance of PlasmaMVP, bound to a specific deployed contract.
func NewPlasmaMVPFilterer(address common.Address, filterer bind.ContractFilterer) (*PlasmaMVPFilterer, error) {
contract, err := bindPlasmaMVP(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &PlasmaMVPFilterer{contract: contract}, nil
}
// bindPlasmaMVP binds a generic wrapper to an already deployed contract.
func bindPlasmaMVP(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(PlasmaMVPABI))
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 (_PlasmaMVP *PlasmaMVPRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
return _PlasmaMVP.Contract.PlasmaMVPCaller.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 (_PlasmaMVP *PlasmaMVPRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _PlasmaMVP.Contract.PlasmaMVPTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_PlasmaMVP *PlasmaMVPRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _PlasmaMVP.Contract.PlasmaMVPTransactor.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 (_PlasmaMVP *PlasmaMVPCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
return _PlasmaMVP.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 (_PlasmaMVP *PlasmaMVPTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _PlasmaMVP.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_PlasmaMVP *PlasmaMVPTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _PlasmaMVP.Contract.contract.Transact(opts, method, params...)
}
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
//
// Solidity: function balanceOf(_address address) constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCaller) BalanceOf(opts *bind.CallOpts, _address common.Address) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _PlasmaMVP.contract.Call(opts, out, "balanceOf", _address)
return *ret0, err
}
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
//
// Solidity: function balanceOf(_address address) constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPSession) BalanceOf(_address common.Address) (*big.Int, error) {
return _PlasmaMVP.Contract.BalanceOf(&_PlasmaMVP.CallOpts, _address)
}
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
//
// Solidity: function balanceOf(_address address) constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCallerSession) BalanceOf(_address common.Address) (*big.Int, error) {
return _PlasmaMVP.Contract.BalanceOf(&_PlasmaMVP.CallOpts, _address)
}
// Balances is a free data retrieval call binding the contract method 0x27e235e3.
//
// Solidity: function balances( address) constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCaller) Balances(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _PlasmaMVP.contract.Call(opts, out, "balances", arg0)
return *ret0, err
}
// Balances is a free data retrieval call binding the contract method 0x27e235e3.
//
// Solidity: function balances( address) constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPSession) Balances(arg0 common.Address) (*big.Int, error) {
return _PlasmaMVP.Contract.Balances(&_PlasmaMVP.CallOpts, arg0)
}
// Balances is a free data retrieval call binding the contract method 0x27e235e3.
//
// Solidity: function balances( address) constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCallerSession) Balances(arg0 common.Address) (*big.Int, error) {
return _PlasmaMVP.Contract.Balances(&_PlasmaMVP.CallOpts, arg0)
}
// BlockIndexFactor is a free data retrieval call binding the contract method 0x89609149.
//
// Solidity: function blockIndexFactor() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCaller) BlockIndexFactor(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _PlasmaMVP.contract.Call(opts, out, "blockIndexFactor")
return *ret0, err
}
// BlockIndexFactor is a free data retrieval call binding the contract method 0x89609149.
//
// Solidity: function blockIndexFactor() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPSession) BlockIndexFactor() (*big.Int, error) {
return _PlasmaMVP.Contract.BlockIndexFactor(&_PlasmaMVP.CallOpts)
}
// BlockIndexFactor is a free data retrieval call binding the contract method 0x89609149.
//
// Solidity: function blockIndexFactor() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCallerSession) BlockIndexFactor() (*big.Int, error) {
return _PlasmaMVP.Contract.BlockIndexFactor(&_PlasmaMVP.CallOpts)
}
// ChildChain is a free data retrieval call binding the contract method 0xf95643b1.
//
// Solidity: function childChain( uint256) constant returns(root bytes32, numTxns uint256, createdAt uint256)
func (_PlasmaMVP *PlasmaMVPCaller) ChildChain(opts *bind.CallOpts, arg0 *big.Int) (struct {
Root [32]byte
NumTxns *big.Int
CreatedAt *big.Int
}, error) {
ret := new(struct {
Root [32]byte
NumTxns *big.Int
CreatedAt *big.Int
})
out := ret
err := _PlasmaMVP.contract.Call(opts, out, "childChain", arg0)
return *ret, err
}
// ChildChain is a free data retrieval call binding the contract method 0xf95643b1.
//
// Solidity: function childChain( uint256) constant returns(root bytes32, numTxns uint256, createdAt uint256)
func (_PlasmaMVP *PlasmaMVPSession) ChildChain(arg0 *big.Int) (struct {
Root [32]byte
NumTxns *big.Int
CreatedAt *big.Int
}, error) {
return _PlasmaMVP.Contract.ChildChain(&_PlasmaMVP.CallOpts, arg0)
}
// ChildChain is a free data retrieval call binding the contract method 0xf95643b1.
//
// Solidity: function childChain( uint256) constant returns(root bytes32, numTxns uint256, createdAt uint256)
func (_PlasmaMVP *PlasmaMVPCallerSession) ChildChain(arg0 *big.Int) (struct {
Root [32]byte
NumTxns *big.Int
CreatedAt *big.Int
}, error) {
return _PlasmaMVP.Contract.ChildChain(&_PlasmaMVP.CallOpts, arg0)
}
// ChildChainBalance is a free data retrieval call binding the contract method 0x385e2fd3.
//
// Solidity: function childChainBalance() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCaller) ChildChainBalance(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _PlasmaMVP.contract.Call(opts, out, "childChainBalance")
return *ret0, err
}
// ChildChainBalance is a free data retrieval call binding the contract method 0x385e2fd3.
//
// Solidity: function childChainBalance() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPSession) ChildChainBalance() (*big.Int, error) {
return _PlasmaMVP.Contract.ChildChainBalance(&_PlasmaMVP.CallOpts)
}
// ChildChainBalance is a free data retrieval call binding the contract method 0x385e2fd3.
//
// Solidity: function childChainBalance() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCallerSession) ChildChainBalance() (*big.Int, error) {
return _PlasmaMVP.Contract.ChildChainBalance(&_PlasmaMVP.CallOpts)
}
// DepositExits is a free data retrieval call binding the contract method 0xce84f906.
//
// Solidity: function depositExits( uint256) constant returns(amount uint256, createdAt uint256, owner address, state uint8)
func (_PlasmaMVP *PlasmaMVPCaller) DepositExits(opts *bind.CallOpts, arg0 *big.Int) (struct {
Amount *big.Int
CreatedAt *big.Int
Owner common.Address
State uint8
}, error) {
ret := new(struct {
Amount *big.Int
CreatedAt *big.Int
Owner common.Address
State uint8
})
out := ret
err := _PlasmaMVP.contract.Call(opts, out, "depositExits", arg0)
return *ret, err
}
// DepositExits is a free data retrieval call binding the contract method 0xce84f906.
//
// Solidity: function depositExits( uint256) constant returns(amount uint256, createdAt uint256, owner address, state uint8)
func (_PlasmaMVP *PlasmaMVPSession) DepositExits(arg0 *big.Int) (struct {
Amount *big.Int
CreatedAt *big.Int
Owner common.Address
State uint8
}, error) {
return _PlasmaMVP.Contract.DepositExits(&_PlasmaMVP.CallOpts, arg0)
}
// DepositExits is a free data retrieval call binding the contract method 0xce84f906.
//
// Solidity: function depositExits( uint256) constant returns(amount uint256, createdAt uint256, owner address, state uint8)
func (_PlasmaMVP *PlasmaMVPCallerSession) DepositExits(arg0 *big.Int) (struct {
Amount *big.Int
CreatedAt *big.Int
Owner common.Address
State uint8
}, error) {
return _PlasmaMVP.Contract.DepositExits(&_PlasmaMVP.CallOpts, arg0)
}
// DepositNonce is a free data retrieval call binding the contract method 0xde35f5cb.
//
// Solidity: function depositNonce() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCaller) DepositNonce(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _PlasmaMVP.contract.Call(opts, out, "depositNonce")
return *ret0, err
}
// DepositNonce is a free data retrieval call binding the contract method 0xde35f5cb.
//
// Solidity: function depositNonce() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPSession) DepositNonce() (*big.Int, error) {
return _PlasmaMVP.Contract.DepositNonce(&_PlasmaMVP.CallOpts)
}
// DepositNonce is a free data retrieval call binding the contract method 0xde35f5cb.
//
// Solidity: function depositNonce() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCallerSession) DepositNonce() (*big.Int, error) {
return _PlasmaMVP.Contract.DepositNonce(&_PlasmaMVP.CallOpts)
}
// Deposits is a free data retrieval call binding the contract method 0xb02c43d0.
//
// Solidity: function deposits( uint256) constant returns(owner address, amount uint256, createdAt uint256, ethBlockNum uint256)
func (_PlasmaMVP *PlasmaMVPCaller) Deposits(opts *bind.CallOpts, arg0 *big.Int) (struct {
Owner common.Address
Amount *big.Int
CreatedAt *big.Int
EthBlockNum *big.Int
}, error) {
ret := new(struct {
Owner common.Address
Amount *big.Int
CreatedAt *big.Int
EthBlockNum *big.Int
})
out := ret
err := _PlasmaMVP.contract.Call(opts, out, "deposits", arg0)
return *ret, err
}
// Deposits is a free data retrieval call binding the contract method 0xb02c43d0.
//
// Solidity: function deposits( uint256) constant returns(owner address, amount uint256, createdAt uint256, ethBlockNum uint256)
func (_PlasmaMVP *PlasmaMVPSession) Deposits(arg0 *big.Int) (struct {
Owner common.Address
Amount *big.Int
CreatedAt *big.Int
EthBlockNum *big.Int
}, error) {
return _PlasmaMVP.Contract.Deposits(&_PlasmaMVP.CallOpts, arg0)
}
// Deposits is a free data retrieval call binding the contract method 0xb02c43d0.
//
// Solidity: function deposits( uint256) constant returns(owner address, amount uint256, createdAt uint256, ethBlockNum uint256)
func (_PlasmaMVP *PlasmaMVPCallerSession) Deposits(arg0 *big.Int) (struct {
Owner common.Address
Amount *big.Int
CreatedAt *big.Int
EthBlockNum *big.Int
}, error) {
return _PlasmaMVP.Contract.Deposits(&_PlasmaMVP.CallOpts, arg0)
}
// LastCommittedBlock is a free data retrieval call binding the contract method 0x3acb097a.
//
// Solidity: function lastCommittedBlock() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCaller) LastCommittedBlock(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _PlasmaMVP.contract.Call(opts, out, "lastCommittedBlock")
return *ret0, err
}
// LastCommittedBlock is a free data retrieval call binding the contract method 0x3acb097a.
//
// Solidity: function lastCommittedBlock() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPSession) LastCommittedBlock() (*big.Int, error) {
return _PlasmaMVP.Contract.LastCommittedBlock(&_PlasmaMVP.CallOpts)
}
// LastCommittedBlock is a free data retrieval call binding the contract method 0x3acb097a.
//
// Solidity: function lastCommittedBlock() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCallerSession) LastCommittedBlock() (*big.Int, error) {
return _PlasmaMVP.Contract.LastCommittedBlock(&_PlasmaMVP.CallOpts)
}
// MaxTxnsPerBLock is a free data retrieval call binding the contract method 0x338b881c.
//
// Solidity: function maxTxnsPerBLock() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCaller) MaxTxnsPerBLock(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _PlasmaMVP.contract.Call(opts, out, "maxTxnsPerBLock")
return *ret0, err
}
// MaxTxnsPerBLock is a free data retrieval call binding the contract method 0x338b881c.
//
// Solidity: function maxTxnsPerBLock() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPSession) MaxTxnsPerBLock() (*big.Int, error) {
return _PlasmaMVP.Contract.MaxTxnsPerBLock(&_PlasmaMVP.CallOpts)
}
// MaxTxnsPerBLock is a free data retrieval call binding the contract method 0x338b881c.
//
// Solidity: function maxTxnsPerBLock() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCallerSession) MaxTxnsPerBLock() (*big.Int, error) {
return _PlasmaMVP.Contract.MaxTxnsPerBLock(&_PlasmaMVP.CallOpts)
}
// TotalWithdrawBalance is a free data retrieval call binding the contract method 0xc430c438.
//
// Solidity: function totalWithdrawBalance() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCaller) TotalWithdrawBalance(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _PlasmaMVP.contract.Call(opts, out, "totalWithdrawBalance")
return *ret0, err
}
// TotalWithdrawBalance is a free data retrieval call binding the contract method 0xc430c438.
//
// Solidity: function totalWithdrawBalance() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPSession) TotalWithdrawBalance() (*big.Int, error) {
return _PlasmaMVP.Contract.TotalWithdrawBalance(&_PlasmaMVP.CallOpts)
}
// TotalWithdrawBalance is a free data retrieval call binding the contract method 0xc430c438.
//
// Solidity: function totalWithdrawBalance() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCallerSession) TotalWithdrawBalance() (*big.Int, error) {
return _PlasmaMVP.Contract.TotalWithdrawBalance(&_PlasmaMVP.CallOpts)
}
// TxExits is a free data retrieval call binding the contract method 0x6d3d8b1a.
//
// Solidity: function txExits( uint256) constant returns(amount uint256, createdAt uint256, owner address, state uint8)
func (_PlasmaMVP *PlasmaMVPCaller) TxExits(opts *bind.CallOpts, arg0 *big.Int) (struct {
Amount *big.Int
CreatedAt *big.Int
Owner common.Address
State uint8
}, error) {
ret := new(struct {
Amount *big.Int
CreatedAt *big.Int
Owner common.Address
State uint8
})
out := ret
err := _PlasmaMVP.contract.Call(opts, out, "txExits", arg0)
return *ret, err
}
// TxExits is a free data retrieval call binding the contract method 0x6d3d8b1a.
//
// Solidity: function txExits( uint256) constant returns(amount uint256, createdAt uint256, owner address, state uint8)
func (_PlasmaMVP *PlasmaMVPSession) TxExits(arg0 *big.Int) (struct {
Amount *big.Int
CreatedAt *big.Int
Owner common.Address
State uint8
}, error) {
return _PlasmaMVP.Contract.TxExits(&_PlasmaMVP.CallOpts, arg0)
}
// TxExits is a free data retrieval call binding the contract method 0x6d3d8b1a.
//
// Solidity: function txExits( uint256) constant returns(amount uint256, createdAt uint256, owner address, state uint8)
func (_PlasmaMVP *PlasmaMVPCallerSession) TxExits(arg0 *big.Int) (struct {
Amount *big.Int
CreatedAt *big.Int
Owner common.Address
State uint8
}, error) {
return _PlasmaMVP.Contract.TxExits(&_PlasmaMVP.CallOpts, arg0)
}
// TxIndexFactor is a free data retrieval call binding the contract method 0x00d2980a.
//
// Solidity: function txIndexFactor() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCaller) TxIndexFactor(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _PlasmaMVP.contract.Call(opts, out, "txIndexFactor")
return *ret0, err
}
// TxIndexFactor is a free data retrieval call binding the contract method 0x00d2980a.
//
// Solidity: function txIndexFactor() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPSession) TxIndexFactor() (*big.Int, error) {
return _PlasmaMVP.Contract.TxIndexFactor(&_PlasmaMVP.CallOpts)
}
// TxIndexFactor is a free data retrieval call binding the contract method 0x00d2980a.
//
// Solidity: function txIndexFactor() constant returns(uint256)
func (_PlasmaMVP *PlasmaMVPCallerSession) TxIndexFactor() (*big.Int, error) {
return _PlasmaMVP.Contract.TxIndexFactor(&_PlasmaMVP.CallOpts)
}
// ChallengeExit is a paid mutator transaction binding the contract method 0xd344e8e4.
//
// Solidity: function challengeExit(exitingTxPos uint256[4], challengingTxPos uint256[2], txBytes bytes, proof bytes, confirmSignature bytes) returns()
func (_PlasmaMVP *PlasmaMVPTransactor) ChallengeExit(opts *bind.TransactOpts, exitingTxPos [4]*big.Int, challengingTxPos [2]*big.Int, txBytes []byte, proof []byte, confirmSignature []byte) (*types.Transaction, error) {
return _PlasmaMVP.contract.Transact(opts, "challengeExit", exitingTxPos, challengingTxPos, txBytes, proof, confirmSignature)
}
// ChallengeExit is a paid mutator transaction binding the contract method 0xd344e8e4.
//
// Solidity: function challengeExit(exitingTxPos uint256[4], challengingTxPos uint256[2], txBytes bytes, proof bytes, confirmSignature bytes) returns()
func (_PlasmaMVP *PlasmaMVPSession) ChallengeExit(exitingTxPos [4]*big.Int, challengingTxPos [2]*big.Int, txBytes []byte, proof []byte, confirmSignature []byte) (*types.Transaction, error) {
return _PlasmaMVP.Contract.ChallengeExit(&_PlasmaMVP.TransactOpts, exitingTxPos, challengingTxPos, txBytes, proof, confirmSignature)
}
// ChallengeExit is a paid mutator transaction binding the contract method 0xd344e8e4.
//
// Solidity: function challengeExit(exitingTxPos uint256[4], challengingTxPos uint256[2], txBytes bytes, proof bytes, confirmSignature bytes) returns()
func (_PlasmaMVP *PlasmaMVPTransactorSession) ChallengeExit(exitingTxPos [4]*big.Int, challengingTxPos [2]*big.Int, txBytes []byte, proof []byte, confirmSignature []byte) (*types.Transaction, error) {
return _PlasmaMVP.Contract.ChallengeExit(&_PlasmaMVP.TransactOpts, exitingTxPos, challengingTxPos, txBytes, proof, confirmSignature)
}
// Deposit is a paid mutator transaction binding the contract method 0xf340fa01.
//
// Solidity: function deposit(owner address) returns()
func (_PlasmaMVP *PlasmaMVPTransactor) Deposit(opts *bind.TransactOpts, owner common.Address) (*types.Transaction, error) {
return _PlasmaMVP.contract.Transact(opts, "deposit", owner)
}
// Deposit is a paid mutator transaction binding the contract method 0xf340fa01.
//
// Solidity: function deposit(owner address) returns()
func (_PlasmaMVP *PlasmaMVPSession) Deposit(owner common.Address) (*types.Transaction, error) {
return _PlasmaMVP.Contract.Deposit(&_PlasmaMVP.TransactOpts, owner)
}
// Deposit is a paid mutator transaction binding the contract method 0xf340fa01.
//
// Solidity: function deposit(owner address) returns()
func (_PlasmaMVP *PlasmaMVPTransactorSession) Deposit(owner common.Address) (*types.Transaction, error) {
return _PlasmaMVP.Contract.Deposit(&_PlasmaMVP.TransactOpts, owner)
}
// FinalizeDepositExits is a paid mutator transaction binding the contract method 0xfcf5f9eb.
//
// Solidity: function finalizeDepositExits() returns()
func (_PlasmaMVP *PlasmaMVPTransactor) FinalizeDepositExits(opts *bind.TransactOpts) (*types.Transaction, error) {
return _PlasmaMVP.contract.Transact(opts, "finalizeDepositExits")
}
// FinalizeDepositExits is a paid mutator transaction binding the contract method 0xfcf5f9eb.
//
// Solidity: function finalizeDepositExits() returns()
func (_PlasmaMVP *PlasmaMVPSession) FinalizeDepositExits() (*types.Transaction, error) {
return _PlasmaMVP.Contract.FinalizeDepositExits(&_PlasmaMVP.TransactOpts)
}
// FinalizeDepositExits is a paid mutator transaction binding the contract method 0xfcf5f9eb.
//
// Solidity: function finalizeDepositExits() returns()
func (_PlasmaMVP *PlasmaMVPTransactorSession) FinalizeDepositExits() (*types.Transaction, error) {
return _PlasmaMVP.Contract.FinalizeDepositExits(&_PlasmaMVP.TransactOpts)
}
// FinalizeTransactionExits is a paid mutator transaction binding the contract method 0x884fc7d6.
//
// Solidity: function finalizeTransactionExits() returns()
func (_PlasmaMVP *PlasmaMVPTransactor) FinalizeTransactionExits(opts *bind.TransactOpts) (*types.Transaction, error) {
return _PlasmaMVP.contract.Transact(opts, "finalizeTransactionExits")
}
// FinalizeTransactionExits is a paid mutator transaction binding the contract method 0x884fc7d6.
//
// Solidity: function finalizeTransactionExits() returns()
func (_PlasmaMVP *PlasmaMVPSession) FinalizeTransactionExits() (*types.Transaction, error) {
return _PlasmaMVP.Contract.FinalizeTransactionExits(&_PlasmaMVP.TransactOpts)
}
// FinalizeTransactionExits is a paid mutator transaction binding the contract method 0x884fc7d6.
//
// Solidity: function finalizeTransactionExits() returns()
func (_PlasmaMVP *PlasmaMVPTransactorSession) FinalizeTransactionExits() (*types.Transaction, error) {
return _PlasmaMVP.Contract.FinalizeTransactionExits(&_PlasmaMVP.TransactOpts)
}
// StartDepositExit is a paid mutator transaction binding the contract method 0xf5239f64.
//
// Solidity: function startDepositExit(nonce uint256) returns()
func (_PlasmaMVP *PlasmaMVPTransactor) StartDepositExit(opts *bind.TransactOpts, nonce *big.Int) (*types.Transaction, error) {
return _PlasmaMVP.contract.Transact(opts, "startDepositExit", nonce)
}
// StartDepositExit is a paid mutator transaction binding the contract method 0xf5239f64.
//
// Solidity: function startDepositExit(nonce uint256) returns()
func (_PlasmaMVP *PlasmaMVPSession) StartDepositExit(nonce *big.Int) (*types.Transaction, error) {
return _PlasmaMVP.Contract.StartDepositExit(&_PlasmaMVP.TransactOpts, nonce)
}
// StartDepositExit is a paid mutator transaction binding the contract method 0xf5239f64.
//
// Solidity: function startDepositExit(nonce uint256) returns()
func (_PlasmaMVP *PlasmaMVPTransactorSession) StartDepositExit(nonce *big.Int) (*types.Transaction, error) {
return _PlasmaMVP.Contract.StartDepositExit(&_PlasmaMVP.TransactOpts, nonce)
}
// StartTransactionExit is a paid mutator transaction binding the contract method 0x6621cb3f.
//
// Solidity: function startTransactionExit(txPos uint256[3], txBytes bytes, proof bytes, confirmSignatures bytes) returns()
func (_PlasmaMVP *PlasmaMVPTransactor) StartTransactionExit(opts *bind.TransactOpts, txPos [3]*big.Int, txBytes []byte, proof []byte, confirmSignatures []byte) (*types.Transaction, error) {
return _PlasmaMVP.contract.Transact(opts, "startTransactionExit", txPos, txBytes, proof, confirmSignatures)
}
// StartTransactionExit is a paid mutator transaction binding the contract method 0x6621cb3f.
//
// Solidity: function startTransactionExit(txPos uint256[3], txBytes bytes, proof bytes, confirmSignatures bytes) returns()
func (_PlasmaMVP *PlasmaMVPSession) StartTransactionExit(txPos [3]*big.Int, txBytes []byte, proof []byte, confirmSignatures []byte) (*types.Transaction, error) {
return _PlasmaMVP.Contract.StartTransactionExit(&_PlasmaMVP.TransactOpts, txPos, txBytes, proof, confirmSignatures)
}
// StartTransactionExit is a paid mutator transaction binding the contract method 0x6621cb3f.
//
// Solidity: function startTransactionExit(txPos uint256[3], txBytes bytes, proof bytes, confirmSignatures bytes) returns()
func (_PlasmaMVP *PlasmaMVPTransactorSession) StartTransactionExit(txPos [3]*big.Int, txBytes []byte, proof []byte, confirmSignatures []byte) (*types.Transaction, error) {
return _PlasmaMVP.Contract.StartTransactionExit(&_PlasmaMVP.TransactOpts, txPos, txBytes, proof, confirmSignatures)
}
// SubmitBlock is a paid mutator transaction binding the contract method 0xa0e52e7c.
//
// Solidity: function submitBlock(headers bytes32[], txnsPerBlock uint256[], blockNum uint256) returns()
func (_PlasmaMVP *PlasmaMVPTransactor) SubmitBlock(opts *bind.TransactOpts, headers [][32]byte, txnsPerBlock []*big.Int, blockNum *big.Int) (*types.Transaction, error) {
return _PlasmaMVP.contract.Transact(opts, "submitBlock", headers, txnsPerBlock, blockNum)
}
// SubmitBlock is a paid mutator transaction binding the contract method 0xa0e52e7c.
//
// Solidity: function submitBlock(headers bytes32[], txnsPerBlock uint256[], blockNum uint256) returns()
func (_PlasmaMVP *PlasmaMVPSession) SubmitBlock(headers [][32]byte, txnsPerBlock []*big.Int, blockNum *big.Int) (*types.Transaction, error) {
return _PlasmaMVP.Contract.SubmitBlock(&_PlasmaMVP.TransactOpts, headers, txnsPerBlock, blockNum)
}
// SubmitBlock is a paid mutator transaction binding the contract method 0xa0e52e7c.
//
// Solidity: function submitBlock(headers bytes32[], txnsPerBlock uint256[], blockNum uint256) returns()
func (_PlasmaMVP *PlasmaMVPTransactorSession) SubmitBlock(headers [][32]byte, txnsPerBlock []*big.Int, blockNum *big.Int) (*types.Transaction, error) {
return _PlasmaMVP.Contract.SubmitBlock(&_PlasmaMVP.TransactOpts, headers, txnsPerBlock, blockNum)
}
// Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b.
//
// Solidity: function withdraw() returns(uint256)
func (_PlasmaMVP *PlasmaMVPTransactor) Withdraw(opts *bind.TransactOpts) (*types.Transaction, error) {
return _PlasmaMVP.contract.Transact(opts, "withdraw")
}
// Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b.
//
// Solidity: function withdraw() returns(uint256)
func (_PlasmaMVP *PlasmaMVPSession) Withdraw() (*types.Transaction, error) {
return _PlasmaMVP.Contract.Withdraw(&_PlasmaMVP.TransactOpts)
}
// Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b.
//
// Solidity: function withdraw() returns(uint256)
func (_PlasmaMVP *PlasmaMVPTransactorSession) Withdraw() (*types.Transaction, error) {
return _PlasmaMVP.Contract.Withdraw(&_PlasmaMVP.TransactOpts)
}
// PlasmaMVPAddedToBalancesIterator is returned from FilterAddedToBalances and is used to iterate over the raw logs and unpacked data for AddedToBalances events raised by the PlasmaMVP contract.
type PlasmaMVPAddedToBalancesIterator struct {
Event *PlasmaMVPAddedToBalances // 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 *PlasmaMVPAddedToBalancesIterator) 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(PlasmaMVPAddedToBalances)
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(PlasmaMVPAddedToBalances)
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 *PlasmaMVPAddedToBalancesIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *PlasmaMVPAddedToBalancesIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// PlasmaMVPAddedToBalances represents a AddedToBalances event raised by the PlasmaMVP contract.
type PlasmaMVPAddedToBalances struct {
Owner common.Address
Amount *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterAddedToBalances is a free log retrieval operation binding the contract event 0xf8552a24c7d58fd05114f6fc9db7b3a354db64d5fc758184af1696ccd8f158f3.
//
// Solidity: e AddedToBalances(owner address, amount uint256)
func (_PlasmaMVP *PlasmaMVPFilterer) FilterAddedToBalances(opts *bind.FilterOpts) (*PlasmaMVPAddedToBalancesIterator, error) {
logs, sub, err := _PlasmaMVP.contract.FilterLogs(opts, "AddedToBalances")
if err != nil {
return nil, err
}
return &PlasmaMVPAddedToBalancesIterator{contract: _PlasmaMVP.contract, event: "AddedToBalances", logs: logs, sub: sub}, nil
}
// WatchAddedToBalances is a free log subscription operation binding the contract event 0xf8552a24c7d58fd05114f6fc9db7b3a354db64d5fc758184af1696ccd8f158f3.
//
// Solidity: e AddedToBalances(owner address, amount uint256)
func (_PlasmaMVP *PlasmaMVPFilterer) WatchAddedToBalances(opts *bind.WatchOpts, sink chan<- *PlasmaMVPAddedToBalances) (event.Subscription, error) {
logs, sub, err := _PlasmaMVP.contract.WatchLogs(opts, "AddedToBalances")
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(PlasmaMVPAddedToBalances)
if err := _PlasmaMVP.contract.UnpackLog(event, "AddedToBalances", 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
}
// PlasmaMVPBlockSubmittedIterator is returned from FilterBlockSubmitted and is used to iterate over the raw logs and unpacked data for BlockSubmitted events raised by the PlasmaMVP contract.
type PlasmaMVPBlockSubmittedIterator struct {
Event *PlasmaMVPBlockSubmitted // 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 *PlasmaMVPBlockSubmittedIterator) 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(PlasmaMVPBlockSubmitted)
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(PlasmaMVPBlockSubmitted)
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 *PlasmaMVPBlockSubmittedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *PlasmaMVPBlockSubmittedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// PlasmaMVPBlockSubmitted represents a BlockSubmitted event raised by the PlasmaMVP contract.
type PlasmaMVPBlockSubmitted struct {
Root [32]byte
BlockNumber *big.Int
NumTxns *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterBlockSubmitted is a free log retrieval operation binding the contract event 0xc70b6ab6cd7c3bfe1b3c45565f9251d67255acb70d4c03d17947faeb8bfd88e2.
//
// Solidity: e BlockSubmitted(root bytes32, blockNumber uint256, numTxns uint256)
func (_PlasmaMVP *PlasmaMVPFilterer) FilterBlockSubmitted(opts *bind.FilterOpts) (*PlasmaMVPBlockSubmittedIterator, error) {
logs, sub, err := _PlasmaMVP.contract.FilterLogs(opts, "BlockSubmitted")
if err != nil {
return nil, err
}
return &PlasmaMVPBlockSubmittedIterator{contract: _PlasmaMVP.contract, event: "BlockSubmitted", logs: logs, sub: sub}, nil
}
// WatchBlockSubmitted is a free log subscription operation binding the contract event 0xc70b6ab6cd7c3bfe1b3c45565f9251d67255acb70d4c03d17947faeb8bfd88e2.
//
// Solidity: e BlockSubmitted(root bytes32, blockNumber uint256, numTxns uint256)
func (_PlasmaMVP *PlasmaMVPFilterer) WatchBlockSubmitted(opts *bind.WatchOpts, sink chan<- *PlasmaMVPBlockSubmitted) (event.Subscription, error) {
logs, sub, err := _PlasmaMVP.contract.WatchLogs(opts, "BlockSubmitted")
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(PlasmaMVPBlockSubmitted)
if err := _PlasmaMVP.contract.UnpackLog(event, "BlockSubmitted", 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
}
// PlasmaMVPChallengedExitIterator is returned from FilterChallengedExit and is used to iterate over the raw logs and unpacked data for ChallengedExit events raised by the PlasmaMVP contract.
type PlasmaMVPChallengedExitIterator struct {
Event *PlasmaMVPChallengedExit // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data