openzeppelin-rs 0.1.2

Typings for Openzeppelin's contracts in Rust using ethers.
Documentation
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
pub use i_bridge::*;
/// This module was auto-generated with ethers-rs Abigen.
/// More information at: <https://github.com/gakonst/ethers-rs>
#[allow(
    clippy::enum_variant_names,
    clippy::too_many_arguments,
    clippy::upper_case_acronyms,
    clippy::type_complexity,
    dead_code,
    non_camel_case_types,
)]
pub mod i_bridge {
    #[rustfmt::skip]
    const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"outbox\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"BridgeCallTriggered\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"InboxToggle\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"messageIndex\",\"type\":\"uint256\",\"components\":[],\"indexed\":true},{\"internalType\":\"bytes32\",\"name\":\"beforeInboxAcc\",\"type\":\"bytes32\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\",\"components\":[],\"indexed\":false},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\",\"components\":[],\"indexed\":false},{\"internalType\":\"bytes32\",\"name\":\"messageDataHash\",\"type\":\"bytes32\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"baseFeeL1\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"MessageDelivered\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"outbox\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"OutboxToggle\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newSequencerInbox\",\"type\":\"address\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"SequencerInboxUpdated\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"activeOutbox\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"allowedDelayedInboxList\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"allowedDelayedInboxes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"allowedOutboxList\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"outbox\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"allowedOutboxes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"delayedInboxAccs\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"delayedMessageCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"messageDataHash\",\"type\":\"bytes32\",\"components\":[]}],\"stateMutability\":\"payable\",\"type\":\"function\",\"name\":\"enqueueDelayedMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"afterDelayedMessagesRead\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"prevMessageCount\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"newMessageCount\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"enqueueSequencerMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"seqMessageIndex\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"beforeAcc\",\"type\":\"bytes32\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"delayedAcc\",\"type\":\"bytes32\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"acc\",\"type\":\"bytes32\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"executeCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rollup_\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"initialize\",\"outputs\":[]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"rollup\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"sequencerInbox\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"sequencerInboxAccs\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"sequencerMessageCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"sequencerReportedSubMessageCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"setDelayedInbox\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"setOutbox\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sequencerInbox\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"setSequencerInbox\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"batchPoster\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"submitBatchSpendingReport\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"msgNum\",\"type\":\"uint256\",\"components\":[]}]}]";
    ///The parsed JSON ABI of the contract.
    pub static IBRIDGE_ABI: ::ethers_contract::Lazy<::ethers_core::abi::Abi> = ::ethers_contract::Lazy::new(||
    ::ethers_core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid"));
    pub struct IBridge<M>(::ethers_contract::Contract<M>);
    impl<M> ::core::clone::Clone for IBridge<M> {
        fn clone(&self) -> Self {
            Self(::core::clone::Clone::clone(&self.0))
        }
    }
    impl<M> ::core::ops::Deref for IBridge<M> {
        type Target = ::ethers_contract::Contract<M>;
        fn deref(&self) -> &Self::Target {
            &self.0
        }
    }
    impl<M> ::core::ops::DerefMut for IBridge<M> {
        fn deref_mut(&mut self) -> &mut Self::Target {
            &mut self.0
        }
    }
    impl<M> ::core::fmt::Debug for IBridge<M> {
        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            f.debug_tuple(stringify!(IBridge)).field(&self.address()).finish()
        }
    }
    impl<M: ::ethers_providers::Middleware> IBridge<M> {
        /// Creates a new contract instance with the specified `ethers` client at
        /// `address`. The contract derefs to a `ethers::Contract` object.
        pub fn new<T: Into<::ethers_core::types::Address>>(
            address: T,
            client: ::std::sync::Arc<M>,
        ) -> Self {
            Self(
                ::ethers_contract::Contract::new(
                    address.into(),
                    IBRIDGE_ABI.clone(),
                    client,
                ),
            )
        }
        ///Calls the contract's `activeOutbox` (0xab5d8943) function
        pub fn active_outbox(
            &self,
        ) -> ::ethers_contract::builders::ContractCall<
            M,
            ::ethers_core::types::Address,
        > {
            self.0
                .method_hash([171, 93, 137, 67], ())
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `allowedDelayedInboxList` (0xe76f5c8d) function
        pub fn allowed_delayed_inbox_list(
            &self,
            p0: ::ethers_core::types::U256,
        ) -> ::ethers_contract::builders::ContractCall<
            M,
            ::ethers_core::types::Address,
        > {
            self.0
                .method_hash([231, 111, 92, 141], p0)
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `allowedDelayedInboxes` (0xae60bd13) function
        pub fn allowed_delayed_inboxes(
            &self,
            inbox: ::ethers_core::types::Address,
        ) -> ::ethers_contract::builders::ContractCall<M, bool> {
            self.0
                .method_hash([174, 96, 189, 19], inbox)
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `allowedOutboxList` (0x945e1147) function
        pub fn allowed_outbox_list(
            &self,
            p0: ::ethers_core::types::U256,
        ) -> ::ethers_contract::builders::ContractCall<
            M,
            ::ethers_core::types::Address,
        > {
            self.0
                .method_hash([148, 94, 17, 71], p0)
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `allowedOutboxes` (0x413b35bd) function
        pub fn allowed_outboxes(
            &self,
            outbox: ::ethers_core::types::Address,
        ) -> ::ethers_contract::builders::ContractCall<M, bool> {
            self.0
                .method_hash([65, 59, 53, 189], outbox)
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `delayedInboxAccs` (0xd5719dc2) function
        pub fn delayed_inbox_accs(
            &self,
            p0: ::ethers_core::types::U256,
        ) -> ::ethers_contract::builders::ContractCall<M, [u8; 32]> {
            self.0
                .method_hash([213, 113, 157, 194], p0)
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `delayedMessageCount` (0xeca067ad) function
        pub fn delayed_message_count(
            &self,
        ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
            self.0
                .method_hash([236, 160, 103, 173], ())
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `enqueueDelayedMessage` (0x8db5993b) function
        pub fn enqueue_delayed_message(
            &self,
            kind: u8,
            sender: ::ethers_core::types::Address,
            message_data_hash: [u8; 32],
        ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
            self.0
                .method_hash([141, 181, 153, 59], (kind, sender, message_data_hash))
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `enqueueSequencerMessage` (0x86598a56) function
        pub fn enqueue_sequencer_message(
            &self,
            data_hash: [u8; 32],
            after_delayed_messages_read: ::ethers_core::types::U256,
            prev_message_count: ::ethers_core::types::U256,
            new_message_count: ::ethers_core::types::U256,
        ) -> ::ethers_contract::builders::ContractCall<
            M,
            (::ethers_core::types::U256, [u8; 32], [u8; 32], [u8; 32]),
        > {
            self.0
                .method_hash(
                    [134, 89, 138, 86],
                    (
                        data_hash,
                        after_delayed_messages_read,
                        prev_message_count,
                        new_message_count,
                    ),
                )
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `executeCall` (0x9e5d4c49) function
        pub fn execute_call(
            &self,
            to: ::ethers_core::types::Address,
            value: ::ethers_core::types::U256,
            data: ::ethers_core::types::Bytes,
        ) -> ::ethers_contract::builders::ContractCall<
            M,
            (bool, ::ethers_core::types::Bytes),
        > {
            self.0
                .method_hash([158, 93, 76, 73], (to, value, data))
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `initialize` (0xc4d66de8) function
        pub fn initialize(
            &self,
            rollup: ::ethers_core::types::Address,
        ) -> ::ethers_contract::builders::ContractCall<M, ()> {
            self.0
                .method_hash([196, 214, 109, 232], rollup)
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `rollup` (0xcb23bcb5) function
        pub fn rollup(
            &self,
        ) -> ::ethers_contract::builders::ContractCall<
            M,
            ::ethers_core::types::Address,
        > {
            self.0
                .method_hash([203, 35, 188, 181], ())
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `sequencerInbox` (0xee35f327) function
        pub fn sequencer_inbox(
            &self,
        ) -> ::ethers_contract::builders::ContractCall<
            M,
            ::ethers_core::types::Address,
        > {
            self.0
                .method_hash([238, 53, 243, 39], ())
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `sequencerInboxAccs` (0x16bf5579) function
        pub fn sequencer_inbox_accs(
            &self,
            p0: ::ethers_core::types::U256,
        ) -> ::ethers_contract::builders::ContractCall<M, [u8; 32]> {
            self.0
                .method_hash([22, 191, 85, 121], p0)
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `sequencerMessageCount` (0x0084120c) function
        pub fn sequencer_message_count(
            &self,
        ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
            self.0
                .method_hash([0, 132, 18, 12], ())
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `sequencerReportedSubMessageCount` (0x5fca4a16) function
        pub fn sequencer_reported_sub_message_count(
            &self,
        ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
            self.0
                .method_hash([95, 202, 74, 22], ())
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `setDelayedInbox` (0x47fb24c5) function
        pub fn set_delayed_inbox(
            &self,
            inbox: ::ethers_core::types::Address,
            enabled: bool,
        ) -> ::ethers_contract::builders::ContractCall<M, ()> {
            self.0
                .method_hash([71, 251, 36, 197], (inbox, enabled))
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `setOutbox` (0xcee3d728) function
        pub fn set_outbox(
            &self,
            inbox: ::ethers_core::types::Address,
            enabled: bool,
        ) -> ::ethers_contract::builders::ContractCall<M, ()> {
            self.0
                .method_hash([206, 227, 215, 40], (inbox, enabled))
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `setSequencerInbox` (0x4f61f850) function
        pub fn set_sequencer_inbox(
            &self,
            sequencer_inbox: ::ethers_core::types::Address,
        ) -> ::ethers_contract::builders::ContractCall<M, ()> {
            self.0
                .method_hash([79, 97, 248, 80], sequencer_inbox)
                .expect("method not found (this should never happen)")
        }
        ///Calls the contract's `submitBatchSpendingReport` (0x7a88b107) function
        pub fn submit_batch_spending_report(
            &self,
            batch_poster: ::ethers_core::types::Address,
            data_hash: [u8; 32],
        ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
            self.0
                .method_hash([122, 136, 177, 7], (batch_poster, data_hash))
                .expect("method not found (this should never happen)")
        }
        ///Gets the contract's `BridgeCallTriggered` event
        pub fn bridge_call_triggered_filter(
            &self,
        ) -> ::ethers_contract::builders::Event<
            ::std::sync::Arc<M>,
            M,
            BridgeCallTriggeredFilter,
        > {
            self.0.event()
        }
        ///Gets the contract's `InboxToggle` event
        pub fn inbox_toggle_filter(
            &self,
        ) -> ::ethers_contract::builders::Event<
            ::std::sync::Arc<M>,
            M,
            InboxToggleFilter,
        > {
            self.0.event()
        }
        ///Gets the contract's `MessageDelivered` event
        pub fn message_delivered_filter(
            &self,
        ) -> ::ethers_contract::builders::Event<
            ::std::sync::Arc<M>,
            M,
            MessageDeliveredFilter,
        > {
            self.0.event()
        }
        ///Gets the contract's `OutboxToggle` event
        pub fn outbox_toggle_filter(
            &self,
        ) -> ::ethers_contract::builders::Event<
            ::std::sync::Arc<M>,
            M,
            OutboxToggleFilter,
        > {
            self.0.event()
        }
        ///Gets the contract's `SequencerInboxUpdated` event
        pub fn sequencer_inbox_updated_filter(
            &self,
        ) -> ::ethers_contract::builders::Event<
            ::std::sync::Arc<M>,
            M,
            SequencerInboxUpdatedFilter,
        > {
            self.0.event()
        }
        /// Returns an `Event` builder for all the events of this contract.
        pub fn events(
            &self,
        ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, IBridgeEvents> {
            self.0.event_with_filter(::core::default::Default::default())
        }
    }
    impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
    for IBridge<M> {
        fn from(contract: ::ethers_contract::Contract<M>) -> Self {
            Self::new(contract.address(), contract.client())
        }
    }
    #[derive(
        Clone,
        ::ethers_contract::EthEvent,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethevent(
        name = "BridgeCallTriggered",
        abi = "BridgeCallTriggered(address,address,uint256,bytes)"
    )]
    pub struct BridgeCallTriggeredFilter {
        #[ethevent(indexed)]
        pub outbox: ::ethers_core::types::Address,
        #[ethevent(indexed)]
        pub to: ::ethers_core::types::Address,
        pub value: ::ethers_core::types::U256,
        pub data: ::ethers_core::types::Bytes,
    }
    #[derive(
        Clone,
        ::ethers_contract::EthEvent,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethevent(name = "InboxToggle", abi = "InboxToggle(address,bool)")]
    pub struct InboxToggleFilter {
        #[ethevent(indexed)]
        pub inbox: ::ethers_core::types::Address,
        pub enabled: bool,
    }
    #[derive(
        Clone,
        ::ethers_contract::EthEvent,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethevent(
        name = "MessageDelivered",
        abi = "MessageDelivered(uint256,bytes32,address,uint8,address,bytes32,uint256,uint64)"
    )]
    pub struct MessageDeliveredFilter {
        #[ethevent(indexed)]
        pub message_index: ::ethers_core::types::U256,
        #[ethevent(indexed)]
        pub before_inbox_acc: [u8; 32],
        pub inbox: ::ethers_core::types::Address,
        pub kind: u8,
        pub sender: ::ethers_core::types::Address,
        pub message_data_hash: [u8; 32],
        pub base_fee_l1: ::ethers_core::types::U256,
        pub timestamp: u64,
    }
    #[derive(
        Clone,
        ::ethers_contract::EthEvent,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethevent(name = "OutboxToggle", abi = "OutboxToggle(address,bool)")]
    pub struct OutboxToggleFilter {
        #[ethevent(indexed)]
        pub outbox: ::ethers_core::types::Address,
        pub enabled: bool,
    }
    #[derive(
        Clone,
        ::ethers_contract::EthEvent,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethevent(name = "SequencerInboxUpdated", abi = "SequencerInboxUpdated(address)")]
    pub struct SequencerInboxUpdatedFilter {
        pub new_sequencer_inbox: ::ethers_core::types::Address,
    }
    ///Container type for all of the contract's events
    #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
    pub enum IBridgeEvents {
        BridgeCallTriggeredFilter(BridgeCallTriggeredFilter),
        InboxToggleFilter(InboxToggleFilter),
        MessageDeliveredFilter(MessageDeliveredFilter),
        OutboxToggleFilter(OutboxToggleFilter),
        SequencerInboxUpdatedFilter(SequencerInboxUpdatedFilter),
    }
    impl ::ethers_contract::EthLogDecode for IBridgeEvents {
        fn decode_log(
            log: &::ethers_core::abi::RawLog,
        ) -> ::core::result::Result<Self, ::ethers_core::abi::Error> {
            if let Ok(decoded) = BridgeCallTriggeredFilter::decode_log(log) {
                return Ok(IBridgeEvents::BridgeCallTriggeredFilter(decoded));
            }
            if let Ok(decoded) = InboxToggleFilter::decode_log(log) {
                return Ok(IBridgeEvents::InboxToggleFilter(decoded));
            }
            if let Ok(decoded) = MessageDeliveredFilter::decode_log(log) {
                return Ok(IBridgeEvents::MessageDeliveredFilter(decoded));
            }
            if let Ok(decoded) = OutboxToggleFilter::decode_log(log) {
                return Ok(IBridgeEvents::OutboxToggleFilter(decoded));
            }
            if let Ok(decoded) = SequencerInboxUpdatedFilter::decode_log(log) {
                return Ok(IBridgeEvents::SequencerInboxUpdatedFilter(decoded));
            }
            Err(::ethers_core::abi::Error::InvalidData)
        }
    }
    impl ::core::fmt::Display for IBridgeEvents {
        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            match self {
                Self::BridgeCallTriggeredFilter(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
                Self::InboxToggleFilter(element) => ::core::fmt::Display::fmt(element, f),
                Self::MessageDeliveredFilter(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
                Self::OutboxToggleFilter(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
                Self::SequencerInboxUpdatedFilter(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
            }
        }
    }
    impl ::core::convert::From<BridgeCallTriggeredFilter> for IBridgeEvents {
        fn from(value: BridgeCallTriggeredFilter) -> Self {
            Self::BridgeCallTriggeredFilter(value)
        }
    }
    impl ::core::convert::From<InboxToggleFilter> for IBridgeEvents {
        fn from(value: InboxToggleFilter) -> Self {
            Self::InboxToggleFilter(value)
        }
    }
    impl ::core::convert::From<MessageDeliveredFilter> for IBridgeEvents {
        fn from(value: MessageDeliveredFilter) -> Self {
            Self::MessageDeliveredFilter(value)
        }
    }
    impl ::core::convert::From<OutboxToggleFilter> for IBridgeEvents {
        fn from(value: OutboxToggleFilter) -> Self {
            Self::OutboxToggleFilter(value)
        }
    }
    impl ::core::convert::From<SequencerInboxUpdatedFilter> for IBridgeEvents {
        fn from(value: SequencerInboxUpdatedFilter) -> Self {
            Self::SequencerInboxUpdatedFilter(value)
        }
    }
    ///Container type for all input parameters for the `activeOutbox` function with signature `activeOutbox()` and selector `0xab5d8943`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "activeOutbox", abi = "activeOutbox()")]
    pub struct ActiveOutboxCall;
    ///Container type for all input parameters for the `allowedDelayedInboxList` function with signature `allowedDelayedInboxList(uint256)` and selector `0xe76f5c8d`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(
        name = "allowedDelayedInboxList",
        abi = "allowedDelayedInboxList(uint256)"
    )]
    pub struct AllowedDelayedInboxListCall(pub ::ethers_core::types::U256);
    ///Container type for all input parameters for the `allowedDelayedInboxes` function with signature `allowedDelayedInboxes(address)` and selector `0xae60bd13`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "allowedDelayedInboxes", abi = "allowedDelayedInboxes(address)")]
    pub struct AllowedDelayedInboxesCall {
        pub inbox: ::ethers_core::types::Address,
    }
    ///Container type for all input parameters for the `allowedOutboxList` function with signature `allowedOutboxList(uint256)` and selector `0x945e1147`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "allowedOutboxList", abi = "allowedOutboxList(uint256)")]
    pub struct AllowedOutboxListCall(pub ::ethers_core::types::U256);
    ///Container type for all input parameters for the `allowedOutboxes` function with signature `allowedOutboxes(address)` and selector `0x413b35bd`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "allowedOutboxes", abi = "allowedOutboxes(address)")]
    pub struct AllowedOutboxesCall {
        pub outbox: ::ethers_core::types::Address,
    }
    ///Container type for all input parameters for the `delayedInboxAccs` function with signature `delayedInboxAccs(uint256)` and selector `0xd5719dc2`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "delayedInboxAccs", abi = "delayedInboxAccs(uint256)")]
    pub struct DelayedInboxAccsCall(pub ::ethers_core::types::U256);
    ///Container type for all input parameters for the `delayedMessageCount` function with signature `delayedMessageCount()` and selector `0xeca067ad`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "delayedMessageCount", abi = "delayedMessageCount()")]
    pub struct DelayedMessageCountCall;
    ///Container type for all input parameters for the `enqueueDelayedMessage` function with signature `enqueueDelayedMessage(uint8,address,bytes32)` and selector `0x8db5993b`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(
        name = "enqueueDelayedMessage",
        abi = "enqueueDelayedMessage(uint8,address,bytes32)"
    )]
    pub struct EnqueueDelayedMessageCall {
        pub kind: u8,
        pub sender: ::ethers_core::types::Address,
        pub message_data_hash: [u8; 32],
    }
    ///Container type for all input parameters for the `enqueueSequencerMessage` function with signature `enqueueSequencerMessage(bytes32,uint256,uint256,uint256)` and selector `0x86598a56`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(
        name = "enqueueSequencerMessage",
        abi = "enqueueSequencerMessage(bytes32,uint256,uint256,uint256)"
    )]
    pub struct EnqueueSequencerMessageCall {
        pub data_hash: [u8; 32],
        pub after_delayed_messages_read: ::ethers_core::types::U256,
        pub prev_message_count: ::ethers_core::types::U256,
        pub new_message_count: ::ethers_core::types::U256,
    }
    ///Container type for all input parameters for the `executeCall` function with signature `executeCall(address,uint256,bytes)` and selector `0x9e5d4c49`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "executeCall", abi = "executeCall(address,uint256,bytes)")]
    pub struct ExecuteCallCall {
        pub to: ::ethers_core::types::Address,
        pub value: ::ethers_core::types::U256,
        pub data: ::ethers_core::types::Bytes,
    }
    ///Container type for all input parameters for the `initialize` function with signature `initialize(address)` and selector `0xc4d66de8`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "initialize", abi = "initialize(address)")]
    pub struct InitializeCall {
        pub rollup: ::ethers_core::types::Address,
    }
    ///Container type for all input parameters for the `rollup` function with signature `rollup()` and selector `0xcb23bcb5`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "rollup", abi = "rollup()")]
    pub struct RollupCall;
    ///Container type for all input parameters for the `sequencerInbox` function with signature `sequencerInbox()` and selector `0xee35f327`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "sequencerInbox", abi = "sequencerInbox()")]
    pub struct SequencerInboxCall;
    ///Container type for all input parameters for the `sequencerInboxAccs` function with signature `sequencerInboxAccs(uint256)` and selector `0x16bf5579`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "sequencerInboxAccs", abi = "sequencerInboxAccs(uint256)")]
    pub struct SequencerInboxAccsCall(pub ::ethers_core::types::U256);
    ///Container type for all input parameters for the `sequencerMessageCount` function with signature `sequencerMessageCount()` and selector `0x0084120c`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "sequencerMessageCount", abi = "sequencerMessageCount()")]
    pub struct SequencerMessageCountCall;
    ///Container type for all input parameters for the `sequencerReportedSubMessageCount` function with signature `sequencerReportedSubMessageCount()` and selector `0x5fca4a16`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(
        name = "sequencerReportedSubMessageCount",
        abi = "sequencerReportedSubMessageCount()"
    )]
    pub struct SequencerReportedSubMessageCountCall;
    ///Container type for all input parameters for the `setDelayedInbox` function with signature `setDelayedInbox(address,bool)` and selector `0x47fb24c5`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "setDelayedInbox", abi = "setDelayedInbox(address,bool)")]
    pub struct SetDelayedInboxCall {
        pub inbox: ::ethers_core::types::Address,
        pub enabled: bool,
    }
    ///Container type for all input parameters for the `setOutbox` function with signature `setOutbox(address,bool)` and selector `0xcee3d728`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "setOutbox", abi = "setOutbox(address,bool)")]
    pub struct SetOutboxCall {
        pub inbox: ::ethers_core::types::Address,
        pub enabled: bool,
    }
    ///Container type for all input parameters for the `setSequencerInbox` function with signature `setSequencerInbox(address)` and selector `0x4f61f850`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(name = "setSequencerInbox", abi = "setSequencerInbox(address)")]
    pub struct SetSequencerInboxCall {
        pub sequencer_inbox: ::ethers_core::types::Address,
    }
    ///Container type for all input parameters for the `submitBatchSpendingReport` function with signature `submitBatchSpendingReport(address,bytes32)` and selector `0x7a88b107`
    #[derive(
        Clone,
        ::ethers_contract::EthCall,
        ::ethers_contract::EthDisplay,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    #[ethcall(
        name = "submitBatchSpendingReport",
        abi = "submitBatchSpendingReport(address,bytes32)"
    )]
    pub struct SubmitBatchSpendingReportCall {
        pub batch_poster: ::ethers_core::types::Address,
        pub data_hash: [u8; 32],
    }
    ///Container type for all of the contract's call
    #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
    pub enum IBridgeCalls {
        ActiveOutbox(ActiveOutboxCall),
        AllowedDelayedInboxList(AllowedDelayedInboxListCall),
        AllowedDelayedInboxes(AllowedDelayedInboxesCall),
        AllowedOutboxList(AllowedOutboxListCall),
        AllowedOutboxes(AllowedOutboxesCall),
        DelayedInboxAccs(DelayedInboxAccsCall),
        DelayedMessageCount(DelayedMessageCountCall),
        EnqueueDelayedMessage(EnqueueDelayedMessageCall),
        EnqueueSequencerMessage(EnqueueSequencerMessageCall),
        ExecuteCall(ExecuteCallCall),
        Initialize(InitializeCall),
        Rollup(RollupCall),
        SequencerInbox(SequencerInboxCall),
        SequencerInboxAccs(SequencerInboxAccsCall),
        SequencerMessageCount(SequencerMessageCountCall),
        SequencerReportedSubMessageCount(SequencerReportedSubMessageCountCall),
        SetDelayedInbox(SetDelayedInboxCall),
        SetOutbox(SetOutboxCall),
        SetSequencerInbox(SetSequencerInboxCall),
        SubmitBatchSpendingReport(SubmitBatchSpendingReportCall),
    }
    impl ::ethers_core::abi::AbiDecode for IBridgeCalls {
        fn decode(
            data: impl AsRef<[u8]>,
        ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
            let data = data.as_ref();
            if let Ok(decoded)
                = <ActiveOutboxCall as ::ethers_core::abi::AbiDecode>::decode(data) {
                return Ok(Self::ActiveOutbox(decoded));
            }
            if let Ok(decoded)
                = <AllowedDelayedInboxListCall as ::ethers_core::abi::AbiDecode>::decode(
                    data,
                ) {
                return Ok(Self::AllowedDelayedInboxList(decoded));
            }
            if let Ok(decoded)
                = <AllowedDelayedInboxesCall as ::ethers_core::abi::AbiDecode>::decode(
                    data,
                ) {
                return Ok(Self::AllowedDelayedInboxes(decoded));
            }
            if let Ok(decoded)
                = <AllowedOutboxListCall as ::ethers_core::abi::AbiDecode>::decode(
                    data,
                ) {
                return Ok(Self::AllowedOutboxList(decoded));
            }
            if let Ok(decoded)
                = <AllowedOutboxesCall as ::ethers_core::abi::AbiDecode>::decode(data) {
                return Ok(Self::AllowedOutboxes(decoded));
            }
            if let Ok(decoded)
                = <DelayedInboxAccsCall as ::ethers_core::abi::AbiDecode>::decode(data) {
                return Ok(Self::DelayedInboxAccs(decoded));
            }
            if let Ok(decoded)
                = <DelayedMessageCountCall as ::ethers_core::abi::AbiDecode>::decode(
                    data,
                ) {
                return Ok(Self::DelayedMessageCount(decoded));
            }
            if let Ok(decoded)
                = <EnqueueDelayedMessageCall as ::ethers_core::abi::AbiDecode>::decode(
                    data,
                ) {
                return Ok(Self::EnqueueDelayedMessage(decoded));
            }
            if let Ok(decoded)
                = <EnqueueSequencerMessageCall as ::ethers_core::abi::AbiDecode>::decode(
                    data,
                ) {
                return Ok(Self::EnqueueSequencerMessage(decoded));
            }
            if let Ok(decoded)
                = <ExecuteCallCall as ::ethers_core::abi::AbiDecode>::decode(data) {
                return Ok(Self::ExecuteCall(decoded));
            }
            if let Ok(decoded)
                = <InitializeCall as ::ethers_core::abi::AbiDecode>::decode(data) {
                return Ok(Self::Initialize(decoded));
            }
            if let Ok(decoded)
                = <RollupCall as ::ethers_core::abi::AbiDecode>::decode(data) {
                return Ok(Self::Rollup(decoded));
            }
            if let Ok(decoded)
                = <SequencerInboxCall as ::ethers_core::abi::AbiDecode>::decode(data) {
                return Ok(Self::SequencerInbox(decoded));
            }
            if let Ok(decoded)
                = <SequencerInboxAccsCall as ::ethers_core::abi::AbiDecode>::decode(
                    data,
                ) {
                return Ok(Self::SequencerInboxAccs(decoded));
            }
            if let Ok(decoded)
                = <SequencerMessageCountCall as ::ethers_core::abi::AbiDecode>::decode(
                    data,
                ) {
                return Ok(Self::SequencerMessageCount(decoded));
            }
            if let Ok(decoded)
                = <SequencerReportedSubMessageCountCall as ::ethers_core::abi::AbiDecode>::decode(
                    data,
                ) {
                return Ok(Self::SequencerReportedSubMessageCount(decoded));
            }
            if let Ok(decoded)
                = <SetDelayedInboxCall as ::ethers_core::abi::AbiDecode>::decode(data) {
                return Ok(Self::SetDelayedInbox(decoded));
            }
            if let Ok(decoded)
                = <SetOutboxCall as ::ethers_core::abi::AbiDecode>::decode(data) {
                return Ok(Self::SetOutbox(decoded));
            }
            if let Ok(decoded)
                = <SetSequencerInboxCall as ::ethers_core::abi::AbiDecode>::decode(
                    data,
                ) {
                return Ok(Self::SetSequencerInbox(decoded));
            }
            if let Ok(decoded)
                = <SubmitBatchSpendingReportCall as ::ethers_core::abi::AbiDecode>::decode(
                    data,
                ) {
                return Ok(Self::SubmitBatchSpendingReport(decoded));
            }
            Err(::ethers_core::abi::Error::InvalidData.into())
        }
    }
    impl ::ethers_core::abi::AbiEncode for IBridgeCalls {
        fn encode(self) -> Vec<u8> {
            match self {
                Self::ActiveOutbox(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::AllowedDelayedInboxList(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::AllowedDelayedInboxes(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::AllowedOutboxList(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::AllowedOutboxes(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::DelayedInboxAccs(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::DelayedMessageCount(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::EnqueueDelayedMessage(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::EnqueueSequencerMessage(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::ExecuteCall(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::Initialize(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::Rollup(element) => ::ethers_core::abi::AbiEncode::encode(element),
                Self::SequencerInbox(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::SequencerInboxAccs(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::SequencerMessageCount(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::SequencerReportedSubMessageCount(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::SetDelayedInbox(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::SetOutbox(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::SetSequencerInbox(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
                Self::SubmitBatchSpendingReport(element) => {
                    ::ethers_core::abi::AbiEncode::encode(element)
                }
            }
        }
    }
    impl ::core::fmt::Display for IBridgeCalls {
        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            match self {
                Self::ActiveOutbox(element) => ::core::fmt::Display::fmt(element, f),
                Self::AllowedDelayedInboxList(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
                Self::AllowedDelayedInboxes(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
                Self::AllowedOutboxList(element) => ::core::fmt::Display::fmt(element, f),
                Self::AllowedOutboxes(element) => ::core::fmt::Display::fmt(element, f),
                Self::DelayedInboxAccs(element) => ::core::fmt::Display::fmt(element, f),
                Self::DelayedMessageCount(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
                Self::EnqueueDelayedMessage(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
                Self::EnqueueSequencerMessage(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
                Self::ExecuteCall(element) => ::core::fmt::Display::fmt(element, f),
                Self::Initialize(element) => ::core::fmt::Display::fmt(element, f),
                Self::Rollup(element) => ::core::fmt::Display::fmt(element, f),
                Self::SequencerInbox(element) => ::core::fmt::Display::fmt(element, f),
                Self::SequencerInboxAccs(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
                Self::SequencerMessageCount(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
                Self::SequencerReportedSubMessageCount(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
                Self::SetDelayedInbox(element) => ::core::fmt::Display::fmt(element, f),
                Self::SetOutbox(element) => ::core::fmt::Display::fmt(element, f),
                Self::SetSequencerInbox(element) => ::core::fmt::Display::fmt(element, f),
                Self::SubmitBatchSpendingReport(element) => {
                    ::core::fmt::Display::fmt(element, f)
                }
            }
        }
    }
    impl ::core::convert::From<ActiveOutboxCall> for IBridgeCalls {
        fn from(value: ActiveOutboxCall) -> Self {
            Self::ActiveOutbox(value)
        }
    }
    impl ::core::convert::From<AllowedDelayedInboxListCall> for IBridgeCalls {
        fn from(value: AllowedDelayedInboxListCall) -> Self {
            Self::AllowedDelayedInboxList(value)
        }
    }
    impl ::core::convert::From<AllowedDelayedInboxesCall> for IBridgeCalls {
        fn from(value: AllowedDelayedInboxesCall) -> Self {
            Self::AllowedDelayedInboxes(value)
        }
    }
    impl ::core::convert::From<AllowedOutboxListCall> for IBridgeCalls {
        fn from(value: AllowedOutboxListCall) -> Self {
            Self::AllowedOutboxList(value)
        }
    }
    impl ::core::convert::From<AllowedOutboxesCall> for IBridgeCalls {
        fn from(value: AllowedOutboxesCall) -> Self {
            Self::AllowedOutboxes(value)
        }
    }
    impl ::core::convert::From<DelayedInboxAccsCall> for IBridgeCalls {
        fn from(value: DelayedInboxAccsCall) -> Self {
            Self::DelayedInboxAccs(value)
        }
    }
    impl ::core::convert::From<DelayedMessageCountCall> for IBridgeCalls {
        fn from(value: DelayedMessageCountCall) -> Self {
            Self::DelayedMessageCount(value)
        }
    }
    impl ::core::convert::From<EnqueueDelayedMessageCall> for IBridgeCalls {
        fn from(value: EnqueueDelayedMessageCall) -> Self {
            Self::EnqueueDelayedMessage(value)
        }
    }
    impl ::core::convert::From<EnqueueSequencerMessageCall> for IBridgeCalls {
        fn from(value: EnqueueSequencerMessageCall) -> Self {
            Self::EnqueueSequencerMessage(value)
        }
    }
    impl ::core::convert::From<ExecuteCallCall> for IBridgeCalls {
        fn from(value: ExecuteCallCall) -> Self {
            Self::ExecuteCall(value)
        }
    }
    impl ::core::convert::From<InitializeCall> for IBridgeCalls {
        fn from(value: InitializeCall) -> Self {
            Self::Initialize(value)
        }
    }
    impl ::core::convert::From<RollupCall> for IBridgeCalls {
        fn from(value: RollupCall) -> Self {
            Self::Rollup(value)
        }
    }
    impl ::core::convert::From<SequencerInboxCall> for IBridgeCalls {
        fn from(value: SequencerInboxCall) -> Self {
            Self::SequencerInbox(value)
        }
    }
    impl ::core::convert::From<SequencerInboxAccsCall> for IBridgeCalls {
        fn from(value: SequencerInboxAccsCall) -> Self {
            Self::SequencerInboxAccs(value)
        }
    }
    impl ::core::convert::From<SequencerMessageCountCall> for IBridgeCalls {
        fn from(value: SequencerMessageCountCall) -> Self {
            Self::SequencerMessageCount(value)
        }
    }
    impl ::core::convert::From<SequencerReportedSubMessageCountCall> for IBridgeCalls {
        fn from(value: SequencerReportedSubMessageCountCall) -> Self {
            Self::SequencerReportedSubMessageCount(value)
        }
    }
    impl ::core::convert::From<SetDelayedInboxCall> for IBridgeCalls {
        fn from(value: SetDelayedInboxCall) -> Self {
            Self::SetDelayedInbox(value)
        }
    }
    impl ::core::convert::From<SetOutboxCall> for IBridgeCalls {
        fn from(value: SetOutboxCall) -> Self {
            Self::SetOutbox(value)
        }
    }
    impl ::core::convert::From<SetSequencerInboxCall> for IBridgeCalls {
        fn from(value: SetSequencerInboxCall) -> Self {
            Self::SetSequencerInbox(value)
        }
    }
    impl ::core::convert::From<SubmitBatchSpendingReportCall> for IBridgeCalls {
        fn from(value: SubmitBatchSpendingReportCall) -> Self {
            Self::SubmitBatchSpendingReport(value)
        }
    }
    ///Container type for all return fields from the `activeOutbox` function with signature `activeOutbox()` and selector `0xab5d8943`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct ActiveOutboxReturn(pub ::ethers_core::types::Address);
    ///Container type for all return fields from the `allowedDelayedInboxList` function with signature `allowedDelayedInboxList(uint256)` and selector `0xe76f5c8d`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct AllowedDelayedInboxListReturn(pub ::ethers_core::types::Address);
    ///Container type for all return fields from the `allowedDelayedInboxes` function with signature `allowedDelayedInboxes(address)` and selector `0xae60bd13`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct AllowedDelayedInboxesReturn(pub bool);
    ///Container type for all return fields from the `allowedOutboxList` function with signature `allowedOutboxList(uint256)` and selector `0x945e1147`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct AllowedOutboxListReturn(pub ::ethers_core::types::Address);
    ///Container type for all return fields from the `allowedOutboxes` function with signature `allowedOutboxes(address)` and selector `0x413b35bd`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct AllowedOutboxesReturn(pub bool);
    ///Container type for all return fields from the `delayedInboxAccs` function with signature `delayedInboxAccs(uint256)` and selector `0xd5719dc2`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct DelayedInboxAccsReturn(pub [u8; 32]);
    ///Container type for all return fields from the `delayedMessageCount` function with signature `delayedMessageCount()` and selector `0xeca067ad`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct DelayedMessageCountReturn(pub ::ethers_core::types::U256);
    ///Container type for all return fields from the `enqueueDelayedMessage` function with signature `enqueueDelayedMessage(uint8,address,bytes32)` and selector `0x8db5993b`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct EnqueueDelayedMessageReturn(pub ::ethers_core::types::U256);
    ///Container type for all return fields from the `enqueueSequencerMessage` function with signature `enqueueSequencerMessage(bytes32,uint256,uint256,uint256)` and selector `0x86598a56`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct EnqueueSequencerMessageReturn {
        pub seq_message_index: ::ethers_core::types::U256,
        pub before_acc: [u8; 32],
        pub delayed_acc: [u8; 32],
        pub acc: [u8; 32],
    }
    ///Container type for all return fields from the `executeCall` function with signature `executeCall(address,uint256,bytes)` and selector `0x9e5d4c49`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct ExecuteCallReturn {
        pub success: bool,
        pub return_data: ::ethers_core::types::Bytes,
    }
    ///Container type for all return fields from the `rollup` function with signature `rollup()` and selector `0xcb23bcb5`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct RollupReturn(pub ::ethers_core::types::Address);
    ///Container type for all return fields from the `sequencerInbox` function with signature `sequencerInbox()` and selector `0xee35f327`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct SequencerInboxReturn(pub ::ethers_core::types::Address);
    ///Container type for all return fields from the `sequencerInboxAccs` function with signature `sequencerInboxAccs(uint256)` and selector `0x16bf5579`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct SequencerInboxAccsReturn(pub [u8; 32]);
    ///Container type for all return fields from the `sequencerMessageCount` function with signature `sequencerMessageCount()` and selector `0x0084120c`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct SequencerMessageCountReturn(pub ::ethers_core::types::U256);
    ///Container type for all return fields from the `sequencerReportedSubMessageCount` function with signature `sequencerReportedSubMessageCount()` and selector `0x5fca4a16`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct SequencerReportedSubMessageCountReturn(pub ::ethers_core::types::U256);
    ///Container type for all return fields from the `submitBatchSpendingReport` function with signature `submitBatchSpendingReport(address,bytes32)` and selector `0x7a88b107`
    #[derive(
        Clone,
        ::ethers_contract::EthAbiType,
        ::ethers_contract::EthAbiCodec,
        Default,
        Debug,
        PartialEq,
        Eq,
        Hash
    )]
    pub struct SubmitBatchSpendingReportReturn {
        pub msg_num: ::ethers_core::types::U256,
    }
}