-
Notifications
You must be signed in to change notification settings - Fork 109
/
expected_keepers.go
4306 lines (4035 loc) · 171 KB
/
expected_keepers.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 by moq; DO NOT EDIT.
// github.com/matryer/moq
package mock
import (
utils "github.com/axelarnetwork/axelar-core/utils"
evmtypes "github.com/axelarnetwork/axelar-core/x/evm/types"
github_com_axelarnetwork_axelar_core_x_multisig_exported "github.com/axelarnetwork/axelar-core/x/multisig/exported"
github_com_axelarnetwork_axelar_core_x_nexus_exported "github.com/axelarnetwork/axelar-core/x/nexus/exported"
reward "github.com/axelarnetwork/axelar-core/x/reward/exported"
snapshot "github.com/axelarnetwork/axelar-core/x/snapshot/exported"
exported "github.com/axelarnetwork/axelar-core/x/tss/exported"
tsstypes "github.com/axelarnetwork/axelar-core/x/tss/types"
vote "github.com/axelarnetwork/axelar-core/x/vote/exported"
"github.com/cosmos/cosmos-sdk/codec"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
"github.com/tendermint/tendermint/libs/log"
"sync"
)
// Ensure, that VoterMock does implement evmtypes.Voter.
// If this is not the case, regenerate this file with moq.
var _ evmtypes.Voter = &VoterMock{}
// VoterMock is a mock implementation of evmtypes.Voter.
//
// func TestSomethingThatUsesVoter(t *testing.T) {
//
// // make and configure a mocked evmtypes.Voter
// mockedVoter := &VoterMock{
// InitializePollFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, pollBuilder vote.PollBuilder) (vote.PollID, error) {
// panic("mock out the InitializePoll method")
// },
// }
//
// // use mockedVoter in code that requires evmtypes.Voter
// // and then make assertions.
//
// }
type VoterMock struct {
// InitializePollFunc mocks the InitializePoll method.
InitializePollFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, pollBuilder vote.PollBuilder) (vote.PollID, error)
// calls tracks calls to the methods.
calls struct {
// InitializePoll holds details about calls to the InitializePoll method.
InitializePoll []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// PollBuilder is the pollBuilder argument value.
PollBuilder vote.PollBuilder
}
}
lockInitializePoll sync.RWMutex
}
// InitializePoll calls InitializePollFunc.
func (mock *VoterMock) InitializePoll(ctx github_com_cosmos_cosmos_sdk_types.Context, pollBuilder vote.PollBuilder) (vote.PollID, error) {
if mock.InitializePollFunc == nil {
panic("VoterMock.InitializePollFunc: method is nil but Voter.InitializePoll was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
PollBuilder vote.PollBuilder
}{
Ctx: ctx,
PollBuilder: pollBuilder,
}
mock.lockInitializePoll.Lock()
mock.calls.InitializePoll = append(mock.calls.InitializePoll, callInfo)
mock.lockInitializePoll.Unlock()
return mock.InitializePollFunc(ctx, pollBuilder)
}
// InitializePollCalls gets all the calls that were made to InitializePoll.
// Check the length with:
// len(mockedVoter.InitializePollCalls())
func (mock *VoterMock) InitializePollCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
PollBuilder vote.PollBuilder
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
PollBuilder vote.PollBuilder
}
mock.lockInitializePoll.RLock()
calls = mock.calls.InitializePoll
mock.lockInitializePoll.RUnlock()
return calls
}
// Ensure, that SignerMock does implement evmtypes.Signer.
// If this is not the case, regenerate this file with moq.
var _ evmtypes.Signer = &SignerMock{}
// SignerMock is a mock implementation of evmtypes.Signer.
//
// func TestSomethingThatUsesSigner(t *testing.T) {
//
// // make and configure a mocked evmtypes.Signer
// mockedSigner := &SignerMock{
// GetKeyFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID exported.KeyID) (exported.Key, bool) {
// panic("mock out the GetKey method")
// },
// GetMultisigSignInfoFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (tsstypes.MultisigSignInfo, bool) {
// panic("mock out the GetMultisigSignInfo method")
// },
// GetSigFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (exported.Signature, exported.SigStatus) {
// panic("mock out the GetSig method")
// },
// }
//
// // use mockedSigner in code that requires evmtypes.Signer
// // and then make assertions.
//
// }
type SignerMock struct {
// GetKeyFunc mocks the GetKey method.
GetKeyFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID exported.KeyID) (exported.Key, bool)
// GetMultisigSignInfoFunc mocks the GetMultisigSignInfo method.
GetMultisigSignInfoFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (tsstypes.MultisigSignInfo, bool)
// GetSigFunc mocks the GetSig method.
GetSigFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (exported.Signature, exported.SigStatus)
// calls tracks calls to the methods.
calls struct {
// GetKey holds details about calls to the GetKey method.
GetKey []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// KeyID is the keyID argument value.
KeyID exported.KeyID
}
// GetMultisigSignInfo holds details about calls to the GetMultisigSignInfo method.
GetMultisigSignInfo []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// SigID is the sigID argument value.
SigID string
}
// GetSig holds details about calls to the GetSig method.
GetSig []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// SigID is the sigID argument value.
SigID string
}
}
lockGetKey sync.RWMutex
lockGetMultisigSignInfo sync.RWMutex
lockGetSig sync.RWMutex
}
// GetKey calls GetKeyFunc.
func (mock *SignerMock) GetKey(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID exported.KeyID) (exported.Key, bool) {
if mock.GetKeyFunc == nil {
panic("SignerMock.GetKeyFunc: method is nil but Signer.GetKey was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
KeyID exported.KeyID
}{
Ctx: ctx,
KeyID: keyID,
}
mock.lockGetKey.Lock()
mock.calls.GetKey = append(mock.calls.GetKey, callInfo)
mock.lockGetKey.Unlock()
return mock.GetKeyFunc(ctx, keyID)
}
// GetKeyCalls gets all the calls that were made to GetKey.
// Check the length with:
// len(mockedSigner.GetKeyCalls())
func (mock *SignerMock) GetKeyCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
KeyID exported.KeyID
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
KeyID exported.KeyID
}
mock.lockGetKey.RLock()
calls = mock.calls.GetKey
mock.lockGetKey.RUnlock()
return calls
}
// GetMultisigSignInfo calls GetMultisigSignInfoFunc.
func (mock *SignerMock) GetMultisigSignInfo(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (tsstypes.MultisigSignInfo, bool) {
if mock.GetMultisigSignInfoFunc == nil {
panic("SignerMock.GetMultisigSignInfoFunc: method is nil but Signer.GetMultisigSignInfo was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
SigID string
}{
Ctx: ctx,
SigID: sigID,
}
mock.lockGetMultisigSignInfo.Lock()
mock.calls.GetMultisigSignInfo = append(mock.calls.GetMultisigSignInfo, callInfo)
mock.lockGetMultisigSignInfo.Unlock()
return mock.GetMultisigSignInfoFunc(ctx, sigID)
}
// GetMultisigSignInfoCalls gets all the calls that were made to GetMultisigSignInfo.
// Check the length with:
// len(mockedSigner.GetMultisigSignInfoCalls())
func (mock *SignerMock) GetMultisigSignInfoCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
SigID string
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
SigID string
}
mock.lockGetMultisigSignInfo.RLock()
calls = mock.calls.GetMultisigSignInfo
mock.lockGetMultisigSignInfo.RUnlock()
return calls
}
// GetSig calls GetSigFunc.
func (mock *SignerMock) GetSig(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (exported.Signature, exported.SigStatus) {
if mock.GetSigFunc == nil {
panic("SignerMock.GetSigFunc: method is nil but Signer.GetSig was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
SigID string
}{
Ctx: ctx,
SigID: sigID,
}
mock.lockGetSig.Lock()
mock.calls.GetSig = append(mock.calls.GetSig, callInfo)
mock.lockGetSig.Unlock()
return mock.GetSigFunc(ctx, sigID)
}
// GetSigCalls gets all the calls that were made to GetSig.
// Check the length with:
// len(mockedSigner.GetSigCalls())
func (mock *SignerMock) GetSigCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
SigID string
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
SigID string
}
mock.lockGetSig.RLock()
calls = mock.calls.GetSig
mock.lockGetSig.RUnlock()
return calls
}
// Ensure, that NexusMock does implement evmtypes.Nexus.
// If this is not the case, regenerate this file with moq.
var _ evmtypes.Nexus = &NexusMock{}
// NexusMock is a mock implementation of evmtypes.Nexus.
//
// func TestSomethingThatUsesNexus(t *testing.T) {
//
// // make and configure a mocked evmtypes.Nexus
// mockedNexus := &NexusMock{
// AddTransferFeeFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, coin github_com_cosmos_cosmos_sdk_types.Coin) {
// panic("mock out the AddTransferFee method")
// },
// ArchivePendingTransferFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer) {
// panic("mock out the ArchivePendingTransfer method")
// },
// ComputeTransferFeeFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, destinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_cosmos_cosmos_sdk_types.Coin, error) {
// panic("mock out the ComputeTransferFee method")
// },
// EnqueueForTransferFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, amount github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error) {
// panic("mock out the EnqueueForTransfer method")
// },
// EnqueueTransferFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, senderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error) {
// panic("mock out the EnqueueTransfer method")
// },
// GetChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool) {
// panic("mock out the GetChain method")
// },
// GetChainByNativeAssetFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool) {
// panic("mock out the GetChainByNativeAsset method")
// },
// GetChainMaintainersFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) []github_com_cosmos_cosmos_sdk_types.ValAddress {
// panic("mock out the GetChainMaintainers method")
// },
// GetChainsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain {
// panic("mock out the GetChains method")
// },
// GetRecipientFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) (github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, bool) {
// panic("mock out the GetRecipient method")
// },
// GetTransfersForChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, state github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState) []github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer {
// panic("mock out the GetTransfersForChain method")
// },
// IsAssetRegisteredFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, denom string) bool {
// panic("mock out the IsAssetRegistered method")
// },
// IsChainActivatedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) bool {
// panic("mock out the IsChainActivated method")
// },
// LinkAddressesFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) error {
// panic("mock out the LinkAddresses method")
// },
// MarkChainMaintainerIncorrectVoteFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, incorrectVote bool) {
// panic("mock out the MarkChainMaintainerIncorrectVote method")
// },
// MarkChainMaintainerMissingVoteFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, missingVote bool) {
// panic("mock out the MarkChainMaintainerMissingVote method")
// },
// RegisterAssetFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_axelarnetwork_axelar_core_x_nexus_exported.Asset) error {
// panic("mock out the RegisterAsset method")
// },
// SetChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) {
// panic("mock out the SetChain method")
// },
// }
//
// // use mockedNexus in code that requires evmtypes.Nexus
// // and then make assertions.
//
// }
type NexusMock struct {
// AddTransferFeeFunc mocks the AddTransferFee method.
AddTransferFeeFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, coin github_com_cosmos_cosmos_sdk_types.Coin)
// ArchivePendingTransferFunc mocks the ArchivePendingTransfer method.
ArchivePendingTransferFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer)
// ComputeTransferFeeFunc mocks the ComputeTransferFee method.
ComputeTransferFeeFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, destinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_cosmos_cosmos_sdk_types.Coin, error)
// EnqueueForTransferFunc mocks the EnqueueForTransfer method.
EnqueueForTransferFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, amount github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error)
// EnqueueTransferFunc mocks the EnqueueTransfer method.
EnqueueTransferFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, senderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error)
// GetChainFunc mocks the GetChain method.
GetChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool)
// GetChainByNativeAssetFunc mocks the GetChainByNativeAsset method.
GetChainByNativeAssetFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool)
// GetChainMaintainersFunc mocks the GetChainMaintainers method.
GetChainMaintainersFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) []github_com_cosmos_cosmos_sdk_types.ValAddress
// GetChainsFunc mocks the GetChains method.
GetChainsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
// GetRecipientFunc mocks the GetRecipient method.
GetRecipientFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) (github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, bool)
// GetTransfersForChainFunc mocks the GetTransfersForChain method.
GetTransfersForChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, state github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState) []github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer
// IsAssetRegisteredFunc mocks the IsAssetRegistered method.
IsAssetRegisteredFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, denom string) bool
// IsChainActivatedFunc mocks the IsChainActivated method.
IsChainActivatedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) bool
// LinkAddressesFunc mocks the LinkAddresses method.
LinkAddressesFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) error
// MarkChainMaintainerIncorrectVoteFunc mocks the MarkChainMaintainerIncorrectVote method.
MarkChainMaintainerIncorrectVoteFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, incorrectVote bool)
// MarkChainMaintainerMissingVoteFunc mocks the MarkChainMaintainerMissingVote method.
MarkChainMaintainerMissingVoteFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, missingVote bool)
// RegisterAssetFunc mocks the RegisterAsset method.
RegisterAssetFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_axelarnetwork_axelar_core_x_nexus_exported.Asset) error
// SetChainFunc mocks the SetChain method.
SetChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain)
// calls tracks calls to the methods.
calls struct {
// AddTransferFee holds details about calls to the AddTransferFee method.
AddTransferFee []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Coin is the coin argument value.
Coin github_com_cosmos_cosmos_sdk_types.Coin
}
// ArchivePendingTransfer holds details about calls to the ArchivePendingTransfer method.
ArchivePendingTransfer []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Transfer is the transfer argument value.
Transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer
}
// ComputeTransferFee holds details about calls to the ComputeTransferFee method.
ComputeTransferFee []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// SourceChain is the sourceChain argument value.
SourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
// DestinationChain is the destinationChain argument value.
DestinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
// Asset is the asset argument value.
Asset github_com_cosmos_cosmos_sdk_types.Coin
}
// EnqueueForTransfer holds details about calls to the EnqueueForTransfer method.
EnqueueForTransfer []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Sender is the sender argument value.
Sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
// Amount is the amount argument value.
Amount github_com_cosmos_cosmos_sdk_types.Coin
}
// EnqueueTransfer holds details about calls to the EnqueueTransfer method.
EnqueueTransfer []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// SenderChain is the senderChain argument value.
SenderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
// Recipient is the recipient argument value.
Recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
// Asset is the asset argument value.
Asset github_com_cosmos_cosmos_sdk_types.Coin
}
// GetChain holds details about calls to the GetChain method.
GetChain []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Chain is the chain argument value.
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName
}
// GetChainByNativeAsset holds details about calls to the GetChainByNativeAsset method.
GetChainByNativeAsset []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Asset is the asset argument value.
Asset string
}
// GetChainMaintainers holds details about calls to the GetChainMaintainers method.
GetChainMaintainers []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Chain is the chain argument value.
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
}
// GetChains holds details about calls to the GetChains method.
GetChains []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
}
// GetRecipient holds details about calls to the GetRecipient method.
GetRecipient []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Sender is the sender argument value.
Sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
}
// GetTransfersForChain holds details about calls to the GetTransfersForChain method.
GetTransfersForChain []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Chain is the chain argument value.
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
// State is the state argument value.
State github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState
}
// IsAssetRegistered holds details about calls to the IsAssetRegistered method.
IsAssetRegistered []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Chain is the chain argument value.
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
// Denom is the denom argument value.
Denom string
}
// IsChainActivated holds details about calls to the IsChainActivated method.
IsChainActivated []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Chain is the chain argument value.
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
}
// LinkAddresses holds details about calls to the LinkAddresses method.
LinkAddresses []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Sender is the sender argument value.
Sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
// Recipient is the recipient argument value.
Recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
}
// MarkChainMaintainerIncorrectVote holds details about calls to the MarkChainMaintainerIncorrectVote method.
MarkChainMaintainerIncorrectVote []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Chain is the chain argument value.
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
// Address is the address argument value.
Address github_com_cosmos_cosmos_sdk_types.ValAddress
// IncorrectVote is the incorrectVote argument value.
IncorrectVote bool
}
// MarkChainMaintainerMissingVote holds details about calls to the MarkChainMaintainerMissingVote method.
MarkChainMaintainerMissingVote []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Chain is the chain argument value.
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
// Address is the address argument value.
Address github_com_cosmos_cosmos_sdk_types.ValAddress
// MissingVote is the missingVote argument value.
MissingVote bool
}
// RegisterAsset holds details about calls to the RegisterAsset method.
RegisterAsset []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Chain is the chain argument value.
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
// Asset is the asset argument value.
Asset github_com_axelarnetwork_axelar_core_x_nexus_exported.Asset
}
// SetChain holds details about calls to the SetChain method.
SetChain []struct {
// Ctx is the ctx argument value.
Ctx github_com_cosmos_cosmos_sdk_types.Context
// Chain is the chain argument value.
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
}
}
lockAddTransferFee sync.RWMutex
lockArchivePendingTransfer sync.RWMutex
lockComputeTransferFee sync.RWMutex
lockEnqueueForTransfer sync.RWMutex
lockEnqueueTransfer sync.RWMutex
lockGetChain sync.RWMutex
lockGetChainByNativeAsset sync.RWMutex
lockGetChainMaintainers sync.RWMutex
lockGetChains sync.RWMutex
lockGetRecipient sync.RWMutex
lockGetTransfersForChain sync.RWMutex
lockIsAssetRegistered sync.RWMutex
lockIsChainActivated sync.RWMutex
lockLinkAddresses sync.RWMutex
lockMarkChainMaintainerIncorrectVote sync.RWMutex
lockMarkChainMaintainerMissingVote sync.RWMutex
lockRegisterAsset sync.RWMutex
lockSetChain sync.RWMutex
}
// AddTransferFee calls AddTransferFeeFunc.
func (mock *NexusMock) AddTransferFee(ctx github_com_cosmos_cosmos_sdk_types.Context, coin github_com_cosmos_cosmos_sdk_types.Coin) {
if mock.AddTransferFeeFunc == nil {
panic("NexusMock.AddTransferFeeFunc: method is nil but Nexus.AddTransferFee was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Coin github_com_cosmos_cosmos_sdk_types.Coin
}{
Ctx: ctx,
Coin: coin,
}
mock.lockAddTransferFee.Lock()
mock.calls.AddTransferFee = append(mock.calls.AddTransferFee, callInfo)
mock.lockAddTransferFee.Unlock()
mock.AddTransferFeeFunc(ctx, coin)
}
// AddTransferFeeCalls gets all the calls that were made to AddTransferFee.
// Check the length with:
// len(mockedNexus.AddTransferFeeCalls())
func (mock *NexusMock) AddTransferFeeCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Coin github_com_cosmos_cosmos_sdk_types.Coin
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Coin github_com_cosmos_cosmos_sdk_types.Coin
}
mock.lockAddTransferFee.RLock()
calls = mock.calls.AddTransferFee
mock.lockAddTransferFee.RUnlock()
return calls
}
// ArchivePendingTransfer calls ArchivePendingTransferFunc.
func (mock *NexusMock) ArchivePendingTransfer(ctx github_com_cosmos_cosmos_sdk_types.Context, transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer) {
if mock.ArchivePendingTransferFunc == nil {
panic("NexusMock.ArchivePendingTransferFunc: method is nil but Nexus.ArchivePendingTransfer was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer
}{
Ctx: ctx,
Transfer: transfer,
}
mock.lockArchivePendingTransfer.Lock()
mock.calls.ArchivePendingTransfer = append(mock.calls.ArchivePendingTransfer, callInfo)
mock.lockArchivePendingTransfer.Unlock()
mock.ArchivePendingTransferFunc(ctx, transfer)
}
// ArchivePendingTransferCalls gets all the calls that were made to ArchivePendingTransfer.
// Check the length with:
// len(mockedNexus.ArchivePendingTransferCalls())
func (mock *NexusMock) ArchivePendingTransferCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer
}
mock.lockArchivePendingTransfer.RLock()
calls = mock.calls.ArchivePendingTransfer
mock.lockArchivePendingTransfer.RUnlock()
return calls
}
// ComputeTransferFee calls ComputeTransferFeeFunc.
func (mock *NexusMock) ComputeTransferFee(ctx github_com_cosmos_cosmos_sdk_types.Context, sourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, destinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_cosmos_cosmos_sdk_types.Coin, error) {
if mock.ComputeTransferFeeFunc == nil {
panic("NexusMock.ComputeTransferFeeFunc: method is nil but Nexus.ComputeTransferFee was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
SourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
DestinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
Asset github_com_cosmos_cosmos_sdk_types.Coin
}{
Ctx: ctx,
SourceChain: sourceChain,
DestinationChain: destinationChain,
Asset: asset,
}
mock.lockComputeTransferFee.Lock()
mock.calls.ComputeTransferFee = append(mock.calls.ComputeTransferFee, callInfo)
mock.lockComputeTransferFee.Unlock()
return mock.ComputeTransferFeeFunc(ctx, sourceChain, destinationChain, asset)
}
// ComputeTransferFeeCalls gets all the calls that were made to ComputeTransferFee.
// Check the length with:
// len(mockedNexus.ComputeTransferFeeCalls())
func (mock *NexusMock) ComputeTransferFeeCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
SourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
DestinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
Asset github_com_cosmos_cosmos_sdk_types.Coin
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
SourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
DestinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
Asset github_com_cosmos_cosmos_sdk_types.Coin
}
mock.lockComputeTransferFee.RLock()
calls = mock.calls.ComputeTransferFee
mock.lockComputeTransferFee.RUnlock()
return calls
}
// EnqueueForTransfer calls EnqueueForTransferFunc.
func (mock *NexusMock) EnqueueForTransfer(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, amount github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error) {
if mock.EnqueueForTransferFunc == nil {
panic("NexusMock.EnqueueForTransferFunc: method is nil but Nexus.EnqueueForTransfer was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
Amount github_com_cosmos_cosmos_sdk_types.Coin
}{
Ctx: ctx,
Sender: sender,
Amount: amount,
}
mock.lockEnqueueForTransfer.Lock()
mock.calls.EnqueueForTransfer = append(mock.calls.EnqueueForTransfer, callInfo)
mock.lockEnqueueForTransfer.Unlock()
return mock.EnqueueForTransferFunc(ctx, sender, amount)
}
// EnqueueForTransferCalls gets all the calls that were made to EnqueueForTransfer.
// Check the length with:
// len(mockedNexus.EnqueueForTransferCalls())
func (mock *NexusMock) EnqueueForTransferCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
Amount github_com_cosmos_cosmos_sdk_types.Coin
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
Amount github_com_cosmos_cosmos_sdk_types.Coin
}
mock.lockEnqueueForTransfer.RLock()
calls = mock.calls.EnqueueForTransfer
mock.lockEnqueueForTransfer.RUnlock()
return calls
}
// EnqueueTransfer calls EnqueueTransferFunc.
func (mock *NexusMock) EnqueueTransfer(ctx github_com_cosmos_cosmos_sdk_types.Context, senderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error) {
if mock.EnqueueTransferFunc == nil {
panic("NexusMock.EnqueueTransferFunc: method is nil but Nexus.EnqueueTransfer was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
SenderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
Recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
Asset github_com_cosmos_cosmos_sdk_types.Coin
}{
Ctx: ctx,
SenderChain: senderChain,
Recipient: recipient,
Asset: asset,
}
mock.lockEnqueueTransfer.Lock()
mock.calls.EnqueueTransfer = append(mock.calls.EnqueueTransfer, callInfo)
mock.lockEnqueueTransfer.Unlock()
return mock.EnqueueTransferFunc(ctx, senderChain, recipient, asset)
}
// EnqueueTransferCalls gets all the calls that were made to EnqueueTransfer.
// Check the length with:
// len(mockedNexus.EnqueueTransferCalls())
func (mock *NexusMock) EnqueueTransferCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
SenderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
Recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
Asset github_com_cosmos_cosmos_sdk_types.Coin
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
SenderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
Recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
Asset github_com_cosmos_cosmos_sdk_types.Coin
}
mock.lockEnqueueTransfer.RLock()
calls = mock.calls.EnqueueTransfer
mock.lockEnqueueTransfer.RUnlock()
return calls
}
// GetChain calls GetChainFunc.
func (mock *NexusMock) GetChain(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool) {
if mock.GetChainFunc == nil {
panic("NexusMock.GetChainFunc: method is nil but Nexus.GetChain was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName
}{
Ctx: ctx,
Chain: chain,
}
mock.lockGetChain.Lock()
mock.calls.GetChain = append(mock.calls.GetChain, callInfo)
mock.lockGetChain.Unlock()
return mock.GetChainFunc(ctx, chain)
}
// GetChainCalls gets all the calls that were made to GetChain.
// Check the length with:
// len(mockedNexus.GetChainCalls())
func (mock *NexusMock) GetChainCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName
}
mock.lockGetChain.RLock()
calls = mock.calls.GetChain
mock.lockGetChain.RUnlock()
return calls
}
// GetChainByNativeAsset calls GetChainByNativeAssetFunc.
func (mock *NexusMock) GetChainByNativeAsset(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool) {
if mock.GetChainByNativeAssetFunc == nil {
panic("NexusMock.GetChainByNativeAssetFunc: method is nil but Nexus.GetChainByNativeAsset was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Asset string
}{
Ctx: ctx,
Asset: asset,
}
mock.lockGetChainByNativeAsset.Lock()
mock.calls.GetChainByNativeAsset = append(mock.calls.GetChainByNativeAsset, callInfo)
mock.lockGetChainByNativeAsset.Unlock()
return mock.GetChainByNativeAssetFunc(ctx, asset)
}
// GetChainByNativeAssetCalls gets all the calls that were made to GetChainByNativeAsset.
// Check the length with:
// len(mockedNexus.GetChainByNativeAssetCalls())
func (mock *NexusMock) GetChainByNativeAssetCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Asset string
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Asset string
}
mock.lockGetChainByNativeAsset.RLock()
calls = mock.calls.GetChainByNativeAsset
mock.lockGetChainByNativeAsset.RUnlock()
return calls
}
// GetChainMaintainers calls GetChainMaintainersFunc.
func (mock *NexusMock) GetChainMaintainers(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) []github_com_cosmos_cosmos_sdk_types.ValAddress {
if mock.GetChainMaintainersFunc == nil {
panic("NexusMock.GetChainMaintainersFunc: method is nil but Nexus.GetChainMaintainers was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
}{
Ctx: ctx,
Chain: chain,
}
mock.lockGetChainMaintainers.Lock()
mock.calls.GetChainMaintainers = append(mock.calls.GetChainMaintainers, callInfo)
mock.lockGetChainMaintainers.Unlock()
return mock.GetChainMaintainersFunc(ctx, chain)
}
// GetChainMaintainersCalls gets all the calls that were made to GetChainMaintainers.
// Check the length with:
// len(mockedNexus.GetChainMaintainersCalls())
func (mock *NexusMock) GetChainMaintainersCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
}
mock.lockGetChainMaintainers.RLock()
calls = mock.calls.GetChainMaintainers
mock.lockGetChainMaintainers.RUnlock()
return calls
}
// GetChains calls GetChainsFunc.
func (mock *NexusMock) GetChains(ctx github_com_cosmos_cosmos_sdk_types.Context) []github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain {
if mock.GetChainsFunc == nil {
panic("NexusMock.GetChainsFunc: method is nil but Nexus.GetChains was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
}{
Ctx: ctx,
}
mock.lockGetChains.Lock()
mock.calls.GetChains = append(mock.calls.GetChains, callInfo)
mock.lockGetChains.Unlock()
return mock.GetChainsFunc(ctx)
}
// GetChainsCalls gets all the calls that were made to GetChains.
// Check the length with:
// len(mockedNexus.GetChainsCalls())
func (mock *NexusMock) GetChainsCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
}
mock.lockGetChains.RLock()
calls = mock.calls.GetChains
mock.lockGetChains.RUnlock()
return calls
}
// GetRecipient calls GetRecipientFunc.
func (mock *NexusMock) GetRecipient(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) (github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, bool) {
if mock.GetRecipientFunc == nil {
panic("NexusMock.GetRecipientFunc: method is nil but Nexus.GetRecipient was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
}{
Ctx: ctx,
Sender: sender,
}
mock.lockGetRecipient.Lock()
mock.calls.GetRecipient = append(mock.calls.GetRecipient, callInfo)
mock.lockGetRecipient.Unlock()
return mock.GetRecipientFunc(ctx, sender)
}
// GetRecipientCalls gets all the calls that were made to GetRecipient.
// Check the length with:
// len(mockedNexus.GetRecipientCalls())
func (mock *NexusMock) GetRecipientCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress
}
mock.lockGetRecipient.RLock()
calls = mock.calls.GetRecipient
mock.lockGetRecipient.RUnlock()
return calls
}
// GetTransfersForChain calls GetTransfersForChainFunc.
func (mock *NexusMock) GetTransfersForChain(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, state github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState) []github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer {
if mock.GetTransfersForChainFunc == nil {
panic("NexusMock.GetTransfersForChainFunc: method is nil but Nexus.GetTransfersForChain was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
State github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState
}{
Ctx: ctx,
Chain: chain,
State: state,
}
mock.lockGetTransfersForChain.Lock()
mock.calls.GetTransfersForChain = append(mock.calls.GetTransfersForChain, callInfo)
mock.lockGetTransfersForChain.Unlock()
return mock.GetTransfersForChainFunc(ctx, chain, state)
}
// GetTransfersForChainCalls gets all the calls that were made to GetTransfersForChain.
// Check the length with:
// len(mockedNexus.GetTransfersForChainCalls())
func (mock *NexusMock) GetTransfersForChainCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
State github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
State github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState
}
mock.lockGetTransfersForChain.RLock()
calls = mock.calls.GetTransfersForChain
mock.lockGetTransfersForChain.RUnlock()
return calls
}
// IsAssetRegistered calls IsAssetRegisteredFunc.
func (mock *NexusMock) IsAssetRegistered(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, denom string) bool {
if mock.IsAssetRegisteredFunc == nil {
panic("NexusMock.IsAssetRegisteredFunc: method is nil but Nexus.IsAssetRegistered was just called")
}
callInfo := struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
Denom string
}{
Ctx: ctx,
Chain: chain,
Denom: denom,
}
mock.lockIsAssetRegistered.Lock()
mock.calls.IsAssetRegistered = append(mock.calls.IsAssetRegistered, callInfo)
mock.lockIsAssetRegistered.Unlock()
return mock.IsAssetRegisteredFunc(ctx, chain, denom)
}
// IsAssetRegisteredCalls gets all the calls that were made to IsAssetRegistered.
// Check the length with:
// len(mockedNexus.IsAssetRegisteredCalls())
func (mock *NexusMock) IsAssetRegisteredCalls() []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
Denom string
} {
var calls []struct {
Ctx github_com_cosmos_cosmos_sdk_types.Context
Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
Denom string
}
mock.lockIsAssetRegistered.RLock()
calls = mock.calls.IsAssetRegistered
mock.lockIsAssetRegistered.RUnlock()