-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkycContract.json
12446 lines (12446 loc) · 573 KB
/
kycContract.json
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
{
"contractName": "kycContract",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "accountAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "accountLockedBalance",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "accountKycStatus",
"type": "bool"
},
{
"indexed": false,
"internalType": "bool",
"name": "isContractAccount",
"type": "bool"
},
{
"indexed": false,
"internalType": "uint256",
"name": "accountTxCount",
"type": "uint256"
}
],
"name": "accountRemoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "newAccountAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newAccountLockedBalance",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "newAccountkycStatus",
"type": "bool"
},
{
"indexed": false,
"internalType": "bool",
"name": "isContractAccount",
"type": "bool"
},
{
"indexed": false,
"internalType": "uint256",
"name": "accountTxCount",
"type": "uint256"
}
],
"name": "accountUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "accountAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "unlockedValue",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "lockedBalance",
"type": "uint256"
}
],
"name": "balanceUnlocked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "newAccountAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newAccountLockedBalance",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "newAccountkycStatus",
"type": "bool"
},
{
"indexed": false,
"internalType": "bool",
"name": "isContractAccount",
"type": "bool"
}
],
"name": "newAccountListed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "senderAccountAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "recieptAccountAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "transferredValue",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "accountTxCount",
"type": "uint256"
}
],
"name": "transferSuccess",
"type": "event"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "backValue",
"type": "uint256"
}
],
"name": "transferBack",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "removeAccount",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "userView",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bool",
"name": "",
"type": "bool"
},
{
"internalType": "bool",
"name": "",
"type": "bool"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"name": "kycCheck",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "destination",
"type": "address"
},
{
"internalType": "uint256",
"name": "sendValue",
"type": "uint256"
}
],
"name": "secureTransfer",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountLockedBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"accountKycStatus\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isContractAccount\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountTxCount\",\"type\":\"uint256\"}],\"name\":\"accountRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccountAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAccountLockedBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"newAccountkycStatus\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isContractAccount\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountTxCount\",\"type\":\"uint256\"}],\"name\":\"accountUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unlockedValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lockedBalance\",\"type\":\"uint256\"}],\"name\":\"balanceUnlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccountAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAccountLockedBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"newAccountkycStatus\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isContractAccount\",\"type\":\"bool\"}],\"name\":\"newAccountListed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"senderAccountAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recieptAccountAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"transferredValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountTxCount\",\"type\":\"uint256\"}],\"name\":\"transferSuccess\",\"type\":\"event\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"kycCheck\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"removeAccount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sendValue\",\"type\":\"uint256\"}],\"name\":\"secureTransfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"backValue\",\"type\":\"uint256\"}],\"name\":\"transferBack\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"userView\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/kycContract.sol\":\"kycContract\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/kycContract.sol\":{\"keccak256\":\"0x62dfc7a002a4c1812173f4db8384fc874fc70fa13f1eb4c28e90fec7763cd107\",\"urls\":[\"bzz-raw://03c70f66fb48ef16c0ff35e65fb7665948a3d65102f123d13f9e793e80f50db9\",\"dweb:/ipfs/QmSRcqfW7th3mRLGFvRB3tWig7d35hZkt2x41FTSjnQiBa\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50611373806100206000396000f3fe60806040526004361061004a5760003560e01c80632517880c1461005657806375beca08146100d15780639b0763e8146100e8578063d8d1f38f14610151578063eae7236f146101ac575b61005433346101e7565b005b34801561006257600080fd5b5061006b61056e565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184151515158152602001831515151581526020018281526020019550505050505060405180910390f35b3480156100dd57600080fd5b506100e661070b565b005b3480156100f457600080fd5b506101376004803603602081101561010b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610acc565b604051808215151515815260200191505060405180910390f35b34801561015d57600080fd5b506101aa6004803603604081101561017457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b24565b005b3480156101b857600080fd5b506101e5600480360360208110156101cf57600080fd5b8101908080359060200190929190505050610fb2565b005b8173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614156103c5576040518060a001604052808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200160011515815260200160001515815260200160008152506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908315150217905550608082015181600301559050507f434e792fad67bb224bf290b1795ad1600fd000a2c981a3d62109cc6cd757beb1828260016000604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001831515151581526020018215151515815260200194505050505060405180910390a161056a565b6040518060a001604052808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200160011515815260200160011515815260200160008152506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908315150217905550608082015181600301559050507f434e792fad67bb224bf290b1795ad1600fd000a2c981a3d62109cc6cd757beb18282600180604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001831515151581526020018215151515815260200194505050505060405180910390a15b5050565b60008060008060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154945094509450945094509091929394565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154146107a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806112e2602f913960400191505060405180910390fd5b7f04f143a43d23d71d4bfcab77e2e7e4cc3d1e495bf9ee8a7243e2566635cfe2c7336000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184151515158152602001831515151581526020018281526020019550505050505060405180910390a160008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160006101000a81548160ff02191690831515021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160016101000a81548160ff02191690831515021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030181905550565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff169050919050565b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541015610bbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001806112b5602d913960400191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16639b0763e8836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610c3b57600080fd5b505afa158015610c4f573d6000803e3d6000fd5b505050506040513d6020811015610c6557600080fd5b8101908080519060200190929190505050610ce8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f5468652064657374696e6174696f6e206e6f742076657269666965642100000081525060200191505060405180910390fd5b6000823b90506000811115610ddd57600060608473ffffffffffffffffffffffffffffffffffffffff168460405180600001905060006040518083038185875af1925050503d8060008114610d59576040519150601f19603f3d011682016040523d82523d6000602084013e610d5e565b606091505b509150915081610dd6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f5472616e7366657220746f20636f6e7472616374206661696c6564210000000081525060200191505060405180910390fd5b5050610e25565b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610e23573d6000803e3d6000fd5b505b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055506000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600081548092919060010191905055507f421d897469e8811c8ed4a9ff062cab8e93aa8b98f17969366a8125defa905bf03384846000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a1505050565b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154101561104c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180611311602e913960400191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614156110cc573373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156110c6573d6000803e3d6000fd5b506111ae565b600060603373ffffffffffffffffffffffffffffffffffffffff168360405180600001905060006040518083038185875af1925050503d806000811461112e576040519150601f19603f3d011682016040523d82523d6000602084013e611133565b606091505b5091509150816111ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f5472616e73666572206261636b206661696c656421000000000000000000000081525060200191505060405180910390fd5b50505b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055507f28a4660e3acbb00aeacb9de4a40a49c2a7d453f72f7c66fd10f1e77ec0598fe833826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a15056fe5468652076616c756520666f722073656e64206973206d6f7265207468616e206c6f636b65642076616c756521596f75206e65656420746f20776974686472617720796f757220656e746972652062616c616e636520666972737421546865207265717565737465642076616c7565206973206d6f7265207468616e206c6f636b65642076616c756521a265627a7a723158208dbc05aa2cb4c638fc58d0168b38eb099a2986f9ec2d2ec9c10cd951010f986264736f6c63430005100032",
"deployedBytecode": "0x60806040526004361061004a5760003560e01c80632517880c1461005657806375beca08146100d15780639b0763e8146100e8578063d8d1f38f14610151578063eae7236f146101ac575b61005433346101e7565b005b34801561006257600080fd5b5061006b61056e565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184151515158152602001831515151581526020018281526020019550505050505060405180910390f35b3480156100dd57600080fd5b506100e661070b565b005b3480156100f457600080fd5b506101376004803603602081101561010b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610acc565b604051808215151515815260200191505060405180910390f35b34801561015d57600080fd5b506101aa6004803603604081101561017457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b24565b005b3480156101b857600080fd5b506101e5600480360360208110156101cf57600080fd5b8101908080359060200190929190505050610fb2565b005b8173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614156103c5576040518060a001604052808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200160011515815260200160001515815260200160008152506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908315150217905550608082015181600301559050507f434e792fad67bb224bf290b1795ad1600fd000a2c981a3d62109cc6cd757beb1828260016000604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001831515151581526020018215151515815260200194505050505060405180910390a161056a565b6040518060a001604052808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200160011515815260200160011515815260200160008152506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908315150217905550608082015181600301559050507f434e792fad67bb224bf290b1795ad1600fd000a2c981a3d62109cc6cd757beb18282600180604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001831515151581526020018215151515815260200194505050505060405180910390a15b5050565b60008060008060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154945094509450945094509091929394565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154146107a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806112e2602f913960400191505060405180910390fd5b7f04f143a43d23d71d4bfcab77e2e7e4cc3d1e495bf9ee8a7243e2566635cfe2c7336000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184151515158152602001831515151581526020018281526020019550505050505060405180910390a160008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160006101000a81548160ff02191690831515021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160016101000a81548160ff02191690831515021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030181905550565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff169050919050565b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541015610bbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001806112b5602d913960400191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16639b0763e8836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610c3b57600080fd5b505afa158015610c4f573d6000803e3d6000fd5b505050506040513d6020811015610c6557600080fd5b8101908080519060200190929190505050610ce8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f5468652064657374696e6174696f6e206e6f742076657269666965642100000081525060200191505060405180910390fd5b6000823b90506000811115610ddd57600060608473ffffffffffffffffffffffffffffffffffffffff168460405180600001905060006040518083038185875af1925050503d8060008114610d59576040519150601f19603f3d011682016040523d82523d6000602084013e610d5e565b606091505b509150915081610dd6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f5472616e7366657220746f20636f6e7472616374206661696c6564210000000081525060200191505060405180910390fd5b5050610e25565b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610e23573d6000803e3d6000fd5b505b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055506000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600081548092919060010191905055507f421d897469e8811c8ed4a9ff062cab8e93aa8b98f17969366a8125defa905bf03384846000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a1505050565b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154101561104c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180611311602e913960400191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614156110cc573373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156110c6573d6000803e3d6000fd5b506111ae565b600060603373ffffffffffffffffffffffffffffffffffffffff168360405180600001905060006040518083038185875af1925050503d806000811461112e576040519150601f19603f3d011682016040523d82523d6000602084013e611133565b606091505b5091509150816111ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f5472616e73666572206261636b206661696c656421000000000000000000000081525060200191505060405180910390fd5b50505b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055507f28a4660e3acbb00aeacb9de4a40a49c2a7d453f72f7c66fd10f1e77ec0598fe833826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a15056fe5468652076616c756520666f722073656e64206973206d6f7265207468616e206c6f636b65642076616c756521596f75206e65656420746f20776974686472617720796f757220656e746972652062616c616e636520666972737421546865207265717565737465642076616c7565206973206d6f7265207468616e206c6f636b65642076616c756521a265627a7a723158208dbc05aa2cb4c638fc58d0168b38eb099a2986f9ec2d2ec9c10cd951010f986264736f6c63430005100032",
"sourceMap": "64:4965:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;64:4965:0;;;;;;;",
"deployedSourceMap": "64:4965:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4979:35;4993:10;5004:9;4979:13;:35::i;:::-;64:4965;3495:366;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3495:366:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2658:829;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2658:829:0;;;:::i;:::-;;3869:120;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3869:120:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3869:120:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3997:934;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3997:934:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3997:934:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1962:688;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1962:688:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1962:688:0;;;;;;;;;;;;;;;;;:::i;:::-;;1444:510;1542:9;1529:22;;:9;:22;;;1526:419;;;1647:43;;;;;;;;1655:9;1647:43;;;;;;1665:11;1647:43;;;;1677:4;1647:43;;;;;;1682:5;1647:43;;;;;;1688:1;1647:43;;;1622:11;:22;1634:9;1622:22;;;;;;;;;;;;;;;:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1710:50;1727:9;1737:11;1749:4;1754:5;1710:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1526:419;;;1820:42;;;;;;;;1828:9;1820:42;;;;;;1838:11;1820:42;;;;1850:4;1820:42;;;;;;1855:4;1820:42;;;;;;1860:1;1820:42;;;1795:11;:22;1807:9;1795:22;;;;;;;;;;;;;;;:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1882:49;1899:9;1909:11;1921:4;1926;1882:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1526:419;1444:510;;:::o;3495:366::-;3537:7;3545:4;3550;3555;3560;3586:11;:23;3598:10;3586:23;;;;;;;;;;;;;;;:35;;;;;;;;;;;;3640:11;:23;3652:10;3640:23;;;;;;;;;;;;;;;:37;;;3696:11;:23;3708:10;3696:23;;;;;;;;;;;;;;;:33;;;;;;;;;;;;3748:11;:23;3760:10;3748:23;;;;;;;;;;;;;;;:34;;;;;;;;;;;;3801:11;:23;3813:10;3801:23;;;;;;;;;;;;;;;:31;;;3578:273;;;;;;;;;;3495:366;;;;;:::o;2658:829::-;2755:1;2714:11;:23;2726:10;2714:23;;;;;;;;;;;;;;;:37;;;:42;2705:125;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2846:315;2861:10;2902:11;:23;2914:10;2902:23;;;;;;;;;;;;;;;:37;;;2970:11;:23;2982:10;2970:23;;;;;;;;;;;;;;;:33;;;;;;;;;;;;3034:11;:23;3046:10;3034:23;;;;;;;;;;;;;;;:34;;;;;;;;;;;;3099:11;:23;3111:10;3099:23;;;;;;;;;;;;;;;:31;;;2846:315;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3290:42;3254:11;:23;3266:10;3254:23;;;;;;;;;;;;;;;:35;;;:78;;;;;;;;;;;;;;;;;;3377:5;3343:11;:23;3355:10;3343:23;;;;;;;;;;;;;;;:33;;;:39;;;;;;;;;;;;;;;;;;3428:5;3393:11;:23;3405:10;3393:23;;;;;;;;;;;;;;;:34;;;:40;;;;;;;;;;;;;;;;;;3476:1;3444:11;:23;3456:10;3444:23;;;;;;;;;;;;;;;:31;;:33;;;;2658:829::o;3869:120::-;3925:4;3950:11;:19;3962:6;3950:19;;;;;;;;;;;;;;;:29;;;;;;;;;;;;3943:36;;3869:120;;;:::o;3997:934::-;4128:9;4087:11;:23;4099:10;4087:23;;;;;;;;;;;;;;;:37;;;:50;;4079:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4224:4;:13;;;4238:11;4224:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4224:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4224:26:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4224:26:0;;;;;;;;;;;;;;;;4216:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4298:20;4388:11;4376:24;4357:43;;4447:1;4429:15;:19;4425:285;;;4468:12;4483:23;4510:11;:16;;4533:9;4510:37;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;4467:80:0;;;;4571:7;4562:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4425:285;;;;;4663:11;4647:38;;:49;4686:9;4647:49;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4647:49:0;4425:285;4763:9;4722:11;:23;4734:10;4722:23;;;;;;;;;;;;;;;:37;;;:50;;;;;;;;;;;4783:11;:23;4795:10;4783:23;;;;;;;;;;;;;;;:31;;;:33;;;;;;;;;;;;;4832:81;4848:10;4859:11;4871:9;4881:11;:23;4893:10;4881:23;;;;;;;;;;;;;;;:31;;;4832:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3997:934;;;:::o;1962:688::-;2072:9;2031:11;:23;2043:10;2031:23;;;;;;;;;;;;;;;:37;;;:50;;2022:146;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2198:10;2185:23;;:9;:23;;;2182:297;;;2246:10;2230:37;;:48;2268:9;2230:48;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2230:48:0;2182:297;;;2322:12;2335:23;2363:10;2362:17;;2386:9;2362:38;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;2321:79:0;;;;2427:7;2419:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2182:297;;;2536:9;2495:11;:23;2507:10;2495:23;;;;;;;;;;;;;;;:37;;;:50;;;;;;;;;;;2565:75;2581:10;2592:9;2602:11;:23;2614:10;2602:23;;;;;;;;;;;;;;;:37;;;2565:75;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1962:688;:::o",
"source": "// SPDX-License-Identifier: MIT`\r\n\r\npragma solidity ^0.5.12;\r\n\r\ncontract kycContract{\r\n\r\n struct account{\r\n\r\n address accountAddr;\r\n uint lockedBalance;\r\n bool kycStatus;\r\n bool isContract;\r\n uint txCount;\r\n\r\n }\r\n\r\n mapping(address => account) private accountList;\r\n\r\n event newAccountListed(address newAccountAddress,\r\n uint newAccountLockedBalance,\r\n bool newAccountkycStatus,\r\n bool isContractAccount);\r\n event balanceUnlocked(address accountAddress,\r\n uint unlockedValue,\r\n uint lockedBalance);\r\n event accountRemoved(address accountAddress,\r\n uint accountLockedBalance,\r\n bool accountKycStatus,\r\n bool isContractAccount,\r\n uint accountTxCount);\r\n event accountUpdated(address newAccountAddress,\r\n uint newAccountLockedBalance,\r\n bool newAccountkycStatus,\r\n bool isContractAccount,\r\n uint accountTxCount);\r\n event transferSuccess(address senderAccountAddress,\r\n address recieptAccountAddress,\r\n uint transferredValue,\r\n uint accountTxCount);\r\n\r\n function addNewAccount(address requester , uint valueToLock) private {\r\n\r\n if(tx.origin == requester){//To detect the requester is EOA or contract!\r\n \r\n accountList[requester] = account(requester,valueToLock,true,false,0);\r\n emit newAccountListed(requester,valueToLock,true,false);\r\n\r\n }else{\r\n\r\n accountList[requester] = account(requester,valueToLock,true,true,0);\r\n emit newAccountListed(requester,valueToLock,true,true);\r\n\r\n }\r\n\r\n }\r\n\r\n function transferBack(uint backValue) external {\r\n\r\n require( accountList[msg.sender].lockedBalance >= backValue ,\r\n \"The requested value is more than locked value!\"\r\n );\r\n\r\n if(tx.origin == msg.sender){\r\n\r\n address(uint160(msg.sender)).transfer(backValue);\r\n\r\n }else{\r\n\r\n (bool success,bytes memory returnData) = (msg.sender).call.value(backValue)(\"\");\r\n require(success , \"Transfer back failed!\");\r\n\r\n }\r\n\r\n accountList[msg.sender].lockedBalance -= backValue;\r\n emit balanceUnlocked(msg.sender,backValue,accountList[msg.sender].lockedBalance);\r\n\r\n }\r\n\r\n function removeAccount() external {\r\n\r\n require( accountList[msg.sender].lockedBalance == 0 ,\r\n \"You need to withdraw your entire balance first!\");\r\n emit accountRemoved(msg.sender,\r\n accountList[msg.sender].lockedBalance,\r\n accountList[msg.sender].kycStatus,\r\n accountList[msg.sender].isContract,\r\n accountList[msg.sender].txCount\r\n );\r\n\r\n //this.transferBack(msg.sender,accountList[msg.sender].lockedBalance);\r\n accountList[msg.sender].accountAddr=0x0000000000000000000000000000000000000000;\r\n accountList[msg.sender].kycStatus=false;\r\n accountList[msg.sender].isContract=false;\r\n accountList[msg.sender].txCount=0;\r\n\r\n }\r\n\r\n function userView() external view returns(address,uint,bool,bool,uint){\r\n\r\n return (accountList[msg.sender].accountAddr,\r\n accountList[msg.sender].lockedBalance,\r\n accountList[msg.sender].kycStatus,\r\n accountList[msg.sender].isContract,\r\n accountList[msg.sender].txCount\r\n );\r\n\r\n }\r\n\r\n function kycCheck(address target) external view returns(bool){\r\n\r\n return accountList[target].kycStatus;\r\n\r\n }\r\n\r\n function secureTransfer(address destination,uint sendValue) external {\r\n\r\n require(accountList[msg.sender].lockedBalance >= sendValue ,\r\n \"The value for send is more than locked value!\");\r\n require(this.kycCheck(destination) , \"The destination not verified!\");\r\n\r\n uint destinationSize;\r\n\r\n assembly {\r\n\r\n destinationSize := extcodesize(destination)\r\n\r\n }\r\n\r\n if( destinationSize > 0 ){\r\n\r\n (bool success , bytes memory returnData) = destination.call.value(sendValue)(\"\");\r\n require( success , \"Transfer to contract failed!\");\r\n\r\n }else{\r\n\r\n address(uint160(destination)).transfer(sendValue);\r\n\r\n }\r\n\r\n accountList[msg.sender].lockedBalance -= sendValue;\r\n accountList[msg.sender].txCount++;\r\n emit transferSuccess(msg.sender,destination,sendValue,accountList[msg.sender].txCount);\r\n \r\n }\r\n\r\n function() external payable{\r\n\r\n addNewAccount(msg.sender,msg.value);\r\n\r\n }\r\n\r\n}",
"sourcePath": "E:\\smartContract\\contracts\\kycContract.sol",
"ast": {
"absolutePath": "project:/contracts/kycContract.sol",
"exportedSymbols": {
"kycContract": [
422
]
},
"id": 423,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.5",
".12"
],
"nodeType": "PragmaDirective",
"src": "36:24:0"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 422,
"linearizedBaseContracts": [
422
],
"name": "kycContract",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "kycContract.account",
"id": 12,
"members": [
{
"constant": false,
"id": 3,
"name": "accountAddr",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "120:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "120:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5,
"name": "lockedBalance",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "150:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "150:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 7,
"name": "kycStatus",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "179:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "179:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 9,
"name": "isContract",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "204:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 8,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "204:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 11,
"name": "txCount",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "230:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "230:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "account",
"nodeType": "StructDefinition",
"scope": 422,
"src": "93:159:0",
"visibility": "public"
},
{
"constant": false,
"id": 16,
"name": "accountList",
"nodeType": "VariableDeclaration",
"scope": 422,
"src": "260:47:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_account_$12_storage_$",
"typeString": "mapping(address => struct kycContract.account)"
},
"typeName": {
"id": 15,
"keyType": {
"id": 13,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "268:7:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "260:27:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_account_$12_storage_$",
"typeString": "mapping(address => struct kycContract.account)"
},
"valueType": {
"contractScope": null,
"id": 14,
"name": "account",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 12,
"src": "279:7:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_account_$12_storage_ptr",
"typeString": "struct kycContract.account"
}
}
},
"value": null,
"visibility": "private"
},
{
"anonymous": false,
"documentation": null,
"id": 26,
"name": "newAccountListed",
"nodeType": "EventDefinition",
"parameters": {
"id": 25,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18,
"indexed": false,
"name": "newAccountAddress",
"nodeType": "VariableDeclaration",
"scope": 26,
"src": "339:25:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 17,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "339:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20,
"indexed": false,
"name": "newAccountLockedBalance",
"nodeType": "VariableDeclaration",
"scope": 26,
"src": "395:28:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 19,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "395:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 22,
"indexed": false,
"name": "newAccountkycStatus",
"nodeType": "VariableDeclaration",
"scope": 26,
"src": "454:24:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 21,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "454:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 24,
"indexed": false,
"name": "isContractAccount",
"nodeType": "VariableDeclaration",
"scope": 26,
"src": "509:22:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 23,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "509:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "338:194:0"
},
"src": "316:217:0"
},
{
"anonymous": false,
"documentation": null,
"id": 34,
"name": "balanceUnlocked",
"nodeType": "EventDefinition",
"parameters": {
"id": 33,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 28,
"indexed": false,
"name": "accountAddress",
"nodeType": "VariableDeclaration",
"scope": 34,
"src": "561:22:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 27,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "561:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 30,
"indexed": false,
"name": "unlockedValue",
"nodeType": "VariableDeclaration",
"scope": 34,
"src": "614:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 29,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "614:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 32,
"indexed": false,
"name": "lockedBalance",
"nodeType": "VariableDeclaration",
"scope": 34,
"src": "663:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 31,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "663:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "560:122:0"
},
"src": "539:144:0"
},
{
"anonymous": false,
"documentation": null,
"id": 46,
"name": "accountRemoved",
"nodeType": "EventDefinition",
"parameters": {
"id": 45,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 36,
"indexed": false,
"name": "accountAddress",
"nodeType": "VariableDeclaration",
"scope": 46,
"src": "710:22:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 35,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "710:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 38,
"indexed": false,
"name": "accountLockedBalance",
"nodeType": "VariableDeclaration",
"scope": 46,
"src": "763:25:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "763:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 40,
"indexed": false,
"name": "accountKycStatus",
"nodeType": "VariableDeclaration",
"scope": 46,
"src": "819:21:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 39,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "819:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 42,
"indexed": false,
"name": "isContractAccount",
"nodeType": "VariableDeclaration",
"scope": 46,
"src": "871:22:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 41,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "871:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 44,
"indexed": false,
"name": "accountTxCount",
"nodeType": "VariableDeclaration",
"scope": 46,
"src": "924:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 43,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "924:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "709:235:0"
},
"src": "689:256:0"
},
{
"anonymous": false,
"documentation": null,
"id": 58,
"name": "accountUpdated",
"nodeType": "EventDefinition",
"parameters": {
"id": 57,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 48,
"indexed": false,
"name": "newAccountAddress",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "972:25:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 47,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "972:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 50,
"indexed": false,
"name": "newAccountLockedBalance",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "1028:28:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 49,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1028:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 52,
"indexed": false,
"name": "newAccountkycStatus",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "1087:24:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 51,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1087:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 54,
"indexed": false,
"name": "isContractAccount",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "1142:22:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 53,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1142:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 56,
"indexed": false,
"name": "accountTxCount",
"nodeType": "VariableDeclaration",
"scope": 58,
"src": "1195:19:0",
"stateVariable": false,