hopr_bindings/codegen/
hoprchannelsevents.rs

1///Module containing a contract's types and functions.
2/**
3
4```solidity
5library HoprChannels {
6    type Balance is uint96;
7    type TicketIndex is uint48;
8    type Timestamp is uint32;
9}
10```*/
11#[allow(
12    non_camel_case_types,
13    non_snake_case,
14    clippy::pub_underscore_fields,
15    clippy::style,
16    clippy::empty_structs_with_brackets
17)]
18pub mod HoprChannels {
19    use super::*;
20    use alloy::sol_types as alloy_sol_types;
21    #[derive(serde::Serialize, serde::Deserialize)]
22    #[derive(Default, Debug, PartialEq, Eq, Hash)]
23    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
24    #[derive(Clone)]
25    pub struct Balance(alloy::sol_types::private::primitives::aliases::U96);
26    const _: () = {
27        use alloy::sol_types as alloy_sol_types;
28        #[automatically_derived]
29        impl alloy_sol_types::private::SolTypeValue<Balance>
30        for alloy::sol_types::private::primitives::aliases::U96 {
31            #[inline]
32            fn stv_to_tokens(
33                &self,
34            ) -> <alloy::sol_types::sol_data::Uint<
35                96,
36            > as alloy_sol_types::SolType>::Token<'_> {
37                alloy_sol_types::private::SolTypeValue::<
38                    alloy::sol_types::sol_data::Uint<96>,
39                >::stv_to_tokens(self)
40            }
41            #[inline]
42            fn stv_eip712_data_word(&self) -> alloy_sol_types::Word {
43                <alloy::sol_types::sol_data::Uint<
44                    96,
45                > as alloy_sol_types::SolType>::tokenize(self)
46                    .0
47            }
48            #[inline]
49            fn stv_abi_encode_packed_to(
50                &self,
51                out: &mut alloy_sol_types::private::Vec<u8>,
52            ) {
53                <alloy::sol_types::sol_data::Uint<
54                    96,
55                > as alloy_sol_types::SolType>::abi_encode_packed_to(self, out)
56            }
57            #[inline]
58            fn stv_abi_packed_encoded_size(&self) -> usize {
59                <alloy::sol_types::sol_data::Uint<
60                    96,
61                > as alloy_sol_types::SolType>::abi_encoded_size(self)
62            }
63        }
64        #[automatically_derived]
65        impl Balance {
66            /// The Solidity type name.
67            pub const NAME: &'static str = stringify!(@ name);
68            /// Convert from the underlying value type.
69            #[inline]
70            pub const fn from_underlying(
71                value: alloy::sol_types::private::primitives::aliases::U96,
72            ) -> Self {
73                Self(value)
74            }
75            /// Return the underlying value.
76            #[inline]
77            pub const fn into_underlying(
78                self,
79            ) -> alloy::sol_types::private::primitives::aliases::U96 {
80                self.0
81            }
82            /// Return the single encoding of this value, delegating to the
83            /// underlying type.
84            #[inline]
85            pub fn abi_encode(&self) -> alloy_sol_types::private::Vec<u8> {
86                <Self as alloy_sol_types::SolType>::abi_encode(&self.0)
87            }
88            /// Return the packed encoding of this value, delegating to the
89            /// underlying type.
90            #[inline]
91            pub fn abi_encode_packed(&self) -> alloy_sol_types::private::Vec<u8> {
92                <Self as alloy_sol_types::SolType>::abi_encode_packed(&self.0)
93            }
94        }
95        #[automatically_derived]
96        impl From<alloy::sol_types::private::primitives::aliases::U96> for Balance {
97            fn from(value: alloy::sol_types::private::primitives::aliases::U96) -> Self {
98                Self::from_underlying(value)
99            }
100        }
101        #[automatically_derived]
102        impl From<Balance> for alloy::sol_types::private::primitives::aliases::U96 {
103            fn from(value: Balance) -> Self {
104                value.into_underlying()
105            }
106        }
107        #[automatically_derived]
108        impl alloy_sol_types::SolType for Balance {
109            type RustType = alloy::sol_types::private::primitives::aliases::U96;
110            type Token<'a> = <alloy::sol_types::sol_data::Uint<
111                96,
112            > as alloy_sol_types::SolType>::Token<'a>;
113            const SOL_NAME: &'static str = Self::NAME;
114            const ENCODED_SIZE: Option<usize> = <alloy::sol_types::sol_data::Uint<
115                96,
116            > as alloy_sol_types::SolType>::ENCODED_SIZE;
117            const PACKED_ENCODED_SIZE: Option<usize> = <alloy::sol_types::sol_data::Uint<
118                96,
119            > as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE;
120            #[inline]
121            fn valid_token(token: &Self::Token<'_>) -> bool {
122                Self::type_check(token).is_ok()
123            }
124            #[inline]
125            fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> {
126                <alloy::sol_types::sol_data::Uint<
127                    96,
128                > as alloy_sol_types::SolType>::type_check(token)
129            }
130            #[inline]
131            fn detokenize(token: Self::Token<'_>) -> Self::RustType {
132                <alloy::sol_types::sol_data::Uint<
133                    96,
134                > as alloy_sol_types::SolType>::detokenize(token)
135            }
136        }
137        #[automatically_derived]
138        impl alloy_sol_types::EventTopic for Balance {
139            #[inline]
140            fn topic_preimage_length(rust: &Self::RustType) -> usize {
141                <alloy::sol_types::sol_data::Uint<
142                    96,
143                > as alloy_sol_types::EventTopic>::topic_preimage_length(rust)
144            }
145            #[inline]
146            fn encode_topic_preimage(
147                rust: &Self::RustType,
148                out: &mut alloy_sol_types::private::Vec<u8>,
149            ) {
150                <alloy::sol_types::sol_data::Uint<
151                    96,
152                > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out)
153            }
154            #[inline]
155            fn encode_topic(
156                rust: &Self::RustType,
157            ) -> alloy_sol_types::abi::token::WordToken {
158                <alloy::sol_types::sol_data::Uint<
159                    96,
160                > as alloy_sol_types::EventTopic>::encode_topic(rust)
161            }
162        }
163    };
164    #[derive(serde::Serialize, serde::Deserialize)]
165    #[derive(Default, Debug, PartialEq, Eq, Hash)]
166    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
167    #[derive(Clone)]
168    pub struct TicketIndex(alloy::sol_types::private::primitives::aliases::U48);
169    const _: () = {
170        use alloy::sol_types as alloy_sol_types;
171        #[automatically_derived]
172        impl alloy_sol_types::private::SolTypeValue<TicketIndex>
173        for alloy::sol_types::private::primitives::aliases::U48 {
174            #[inline]
175            fn stv_to_tokens(
176                &self,
177            ) -> <alloy::sol_types::sol_data::Uint<
178                48,
179            > as alloy_sol_types::SolType>::Token<'_> {
180                alloy_sol_types::private::SolTypeValue::<
181                    alloy::sol_types::sol_data::Uint<48>,
182                >::stv_to_tokens(self)
183            }
184            #[inline]
185            fn stv_eip712_data_word(&self) -> alloy_sol_types::Word {
186                <alloy::sol_types::sol_data::Uint<
187                    48,
188                > as alloy_sol_types::SolType>::tokenize(self)
189                    .0
190            }
191            #[inline]
192            fn stv_abi_encode_packed_to(
193                &self,
194                out: &mut alloy_sol_types::private::Vec<u8>,
195            ) {
196                <alloy::sol_types::sol_data::Uint<
197                    48,
198                > as alloy_sol_types::SolType>::abi_encode_packed_to(self, out)
199            }
200            #[inline]
201            fn stv_abi_packed_encoded_size(&self) -> usize {
202                <alloy::sol_types::sol_data::Uint<
203                    48,
204                > as alloy_sol_types::SolType>::abi_encoded_size(self)
205            }
206        }
207        #[automatically_derived]
208        impl TicketIndex {
209            /// The Solidity type name.
210            pub const NAME: &'static str = stringify!(@ name);
211            /// Convert from the underlying value type.
212            #[inline]
213            pub const fn from_underlying(
214                value: alloy::sol_types::private::primitives::aliases::U48,
215            ) -> Self {
216                Self(value)
217            }
218            /// Return the underlying value.
219            #[inline]
220            pub const fn into_underlying(
221                self,
222            ) -> alloy::sol_types::private::primitives::aliases::U48 {
223                self.0
224            }
225            /// Return the single encoding of this value, delegating to the
226            /// underlying type.
227            #[inline]
228            pub fn abi_encode(&self) -> alloy_sol_types::private::Vec<u8> {
229                <Self as alloy_sol_types::SolType>::abi_encode(&self.0)
230            }
231            /// Return the packed encoding of this value, delegating to the
232            /// underlying type.
233            #[inline]
234            pub fn abi_encode_packed(&self) -> alloy_sol_types::private::Vec<u8> {
235                <Self as alloy_sol_types::SolType>::abi_encode_packed(&self.0)
236            }
237        }
238        #[automatically_derived]
239        impl From<alloy::sol_types::private::primitives::aliases::U48> for TicketIndex {
240            fn from(value: alloy::sol_types::private::primitives::aliases::U48) -> Self {
241                Self::from_underlying(value)
242            }
243        }
244        #[automatically_derived]
245        impl From<TicketIndex> for alloy::sol_types::private::primitives::aliases::U48 {
246            fn from(value: TicketIndex) -> Self {
247                value.into_underlying()
248            }
249        }
250        #[automatically_derived]
251        impl alloy_sol_types::SolType for TicketIndex {
252            type RustType = alloy::sol_types::private::primitives::aliases::U48;
253            type Token<'a> = <alloy::sol_types::sol_data::Uint<
254                48,
255            > as alloy_sol_types::SolType>::Token<'a>;
256            const SOL_NAME: &'static str = Self::NAME;
257            const ENCODED_SIZE: Option<usize> = <alloy::sol_types::sol_data::Uint<
258                48,
259            > as alloy_sol_types::SolType>::ENCODED_SIZE;
260            const PACKED_ENCODED_SIZE: Option<usize> = <alloy::sol_types::sol_data::Uint<
261                48,
262            > as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE;
263            #[inline]
264            fn valid_token(token: &Self::Token<'_>) -> bool {
265                Self::type_check(token).is_ok()
266            }
267            #[inline]
268            fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> {
269                <alloy::sol_types::sol_data::Uint<
270                    48,
271                > as alloy_sol_types::SolType>::type_check(token)
272            }
273            #[inline]
274            fn detokenize(token: Self::Token<'_>) -> Self::RustType {
275                <alloy::sol_types::sol_data::Uint<
276                    48,
277                > as alloy_sol_types::SolType>::detokenize(token)
278            }
279        }
280        #[automatically_derived]
281        impl alloy_sol_types::EventTopic for TicketIndex {
282            #[inline]
283            fn topic_preimage_length(rust: &Self::RustType) -> usize {
284                <alloy::sol_types::sol_data::Uint<
285                    48,
286                > as alloy_sol_types::EventTopic>::topic_preimage_length(rust)
287            }
288            #[inline]
289            fn encode_topic_preimage(
290                rust: &Self::RustType,
291                out: &mut alloy_sol_types::private::Vec<u8>,
292            ) {
293                <alloy::sol_types::sol_data::Uint<
294                    48,
295                > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out)
296            }
297            #[inline]
298            fn encode_topic(
299                rust: &Self::RustType,
300            ) -> alloy_sol_types::abi::token::WordToken {
301                <alloy::sol_types::sol_data::Uint<
302                    48,
303                > as alloy_sol_types::EventTopic>::encode_topic(rust)
304            }
305        }
306    };
307    #[derive(serde::Serialize, serde::Deserialize)]
308    #[derive(Default, Debug, PartialEq, Eq, Hash)]
309    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
310    #[derive(Clone)]
311    pub struct Timestamp(u32);
312    const _: () = {
313        use alloy::sol_types as alloy_sol_types;
314        #[automatically_derived]
315        impl alloy_sol_types::private::SolTypeValue<Timestamp> for u32 {
316            #[inline]
317            fn stv_to_tokens(
318                &self,
319            ) -> <alloy::sol_types::sol_data::Uint<
320                32,
321            > as alloy_sol_types::SolType>::Token<'_> {
322                alloy_sol_types::private::SolTypeValue::<
323                    alloy::sol_types::sol_data::Uint<32>,
324                >::stv_to_tokens(self)
325            }
326            #[inline]
327            fn stv_eip712_data_word(&self) -> alloy_sol_types::Word {
328                <alloy::sol_types::sol_data::Uint<
329                    32,
330                > as alloy_sol_types::SolType>::tokenize(self)
331                    .0
332            }
333            #[inline]
334            fn stv_abi_encode_packed_to(
335                &self,
336                out: &mut alloy_sol_types::private::Vec<u8>,
337            ) {
338                <alloy::sol_types::sol_data::Uint<
339                    32,
340                > as alloy_sol_types::SolType>::abi_encode_packed_to(self, out)
341            }
342            #[inline]
343            fn stv_abi_packed_encoded_size(&self) -> usize {
344                <alloy::sol_types::sol_data::Uint<
345                    32,
346                > as alloy_sol_types::SolType>::abi_encoded_size(self)
347            }
348        }
349        #[automatically_derived]
350        impl Timestamp {
351            /// The Solidity type name.
352            pub const NAME: &'static str = stringify!(@ name);
353            /// Convert from the underlying value type.
354            #[inline]
355            pub const fn from_underlying(value: u32) -> Self {
356                Self(value)
357            }
358            /// Return the underlying value.
359            #[inline]
360            pub const fn into_underlying(self) -> u32 {
361                self.0
362            }
363            /// Return the single encoding of this value, delegating to the
364            /// underlying type.
365            #[inline]
366            pub fn abi_encode(&self) -> alloy_sol_types::private::Vec<u8> {
367                <Self as alloy_sol_types::SolType>::abi_encode(&self.0)
368            }
369            /// Return the packed encoding of this value, delegating to the
370            /// underlying type.
371            #[inline]
372            pub fn abi_encode_packed(&self) -> alloy_sol_types::private::Vec<u8> {
373                <Self as alloy_sol_types::SolType>::abi_encode_packed(&self.0)
374            }
375        }
376        #[automatically_derived]
377        impl From<u32> for Timestamp {
378            fn from(value: u32) -> Self {
379                Self::from_underlying(value)
380            }
381        }
382        #[automatically_derived]
383        impl From<Timestamp> for u32 {
384            fn from(value: Timestamp) -> Self {
385                value.into_underlying()
386            }
387        }
388        #[automatically_derived]
389        impl alloy_sol_types::SolType for Timestamp {
390            type RustType = u32;
391            type Token<'a> = <alloy::sol_types::sol_data::Uint<
392                32,
393            > as alloy_sol_types::SolType>::Token<'a>;
394            const SOL_NAME: &'static str = Self::NAME;
395            const ENCODED_SIZE: Option<usize> = <alloy::sol_types::sol_data::Uint<
396                32,
397            > as alloy_sol_types::SolType>::ENCODED_SIZE;
398            const PACKED_ENCODED_SIZE: Option<usize> = <alloy::sol_types::sol_data::Uint<
399                32,
400            > as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE;
401            #[inline]
402            fn valid_token(token: &Self::Token<'_>) -> bool {
403                Self::type_check(token).is_ok()
404            }
405            #[inline]
406            fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> {
407                <alloy::sol_types::sol_data::Uint<
408                    32,
409                > as alloy_sol_types::SolType>::type_check(token)
410            }
411            #[inline]
412            fn detokenize(token: Self::Token<'_>) -> Self::RustType {
413                <alloy::sol_types::sol_data::Uint<
414                    32,
415                > as alloy_sol_types::SolType>::detokenize(token)
416            }
417        }
418        #[automatically_derived]
419        impl alloy_sol_types::EventTopic for Timestamp {
420            #[inline]
421            fn topic_preimage_length(rust: &Self::RustType) -> usize {
422                <alloy::sol_types::sol_data::Uint<
423                    32,
424                > as alloy_sol_types::EventTopic>::topic_preimage_length(rust)
425            }
426            #[inline]
427            fn encode_topic_preimage(
428                rust: &Self::RustType,
429                out: &mut alloy_sol_types::private::Vec<u8>,
430            ) {
431                <alloy::sol_types::sol_data::Uint<
432                    32,
433                > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out)
434            }
435            #[inline]
436            fn encode_topic(
437                rust: &Self::RustType,
438            ) -> alloy_sol_types::abi::token::WordToken {
439                <alloy::sol_types::sol_data::Uint<
440                    32,
441                > as alloy_sol_types::EventTopic>::encode_topic(rust)
442            }
443        }
444    };
445    use alloy::contract as alloy_contract;
446    /**Creates a new wrapper around an on-chain [`HoprChannels`](self) contract instance.
447
448See the [wrapper's documentation](`HoprChannelsInstance`) for more details.*/
449    #[inline]
450    pub const fn new<
451        P: alloy_contract::private::Provider<N>,
452        N: alloy_contract::private::Network,
453    >(
454        address: alloy_sol_types::private::Address,
455        provider: P,
456    ) -> HoprChannelsInstance<P, N> {
457        HoprChannelsInstance::<P, N>::new(address, provider)
458    }
459    /**A [`HoprChannels`](self) instance.
460
461Contains type-safe methods for interacting with an on-chain instance of the
462[`HoprChannels`](self) contract located at a given `address`, using a given
463provider `P`.
464
465If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
466documentation on how to provide it), the `deploy` and `deploy_builder` methods can
467be used to deploy a new instance of the contract.
468
469See the [module-level documentation](self) for all the available methods.*/
470    #[derive(Clone)]
471    pub struct HoprChannelsInstance<P, N = alloy_contract::private::Ethereum> {
472        address: alloy_sol_types::private::Address,
473        provider: P,
474        _network: ::core::marker::PhantomData<N>,
475    }
476    #[automatically_derived]
477    impl<P, N> ::core::fmt::Debug for HoprChannelsInstance<P, N> {
478        #[inline]
479        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
480            f.debug_tuple("HoprChannelsInstance").field(&self.address).finish()
481        }
482    }
483    /// Instantiation and getters/setters.
484    #[automatically_derived]
485    impl<
486        P: alloy_contract::private::Provider<N>,
487        N: alloy_contract::private::Network,
488    > HoprChannelsInstance<P, N> {
489        /**Creates a new wrapper around an on-chain [`HoprChannels`](self) contract instance.
490
491See the [wrapper's documentation](`HoprChannelsInstance`) for more details.*/
492        #[inline]
493        pub const fn new(
494            address: alloy_sol_types::private::Address,
495            provider: P,
496        ) -> Self {
497            Self {
498                address,
499                provider,
500                _network: ::core::marker::PhantomData,
501            }
502        }
503        /// Returns a reference to the address.
504        #[inline]
505        pub const fn address(&self) -> &alloy_sol_types::private::Address {
506            &self.address
507        }
508        /// Sets the address.
509        #[inline]
510        pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
511            self.address = address;
512        }
513        /// Sets the address and returns `self`.
514        pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
515            self.set_address(address);
516            self
517        }
518        /// Returns a reference to the provider.
519        #[inline]
520        pub const fn provider(&self) -> &P {
521            &self.provider
522        }
523    }
524    impl<P: ::core::clone::Clone, N> HoprChannelsInstance<&P, N> {
525        /// Clones the provider and returns a new instance with the cloned provider.
526        #[inline]
527        pub fn with_cloned_provider(self) -> HoprChannelsInstance<P, N> {
528            HoprChannelsInstance {
529                address: self.address,
530                provider: ::core::clone::Clone::clone(&self.provider),
531                _network: ::core::marker::PhantomData,
532            }
533        }
534    }
535    /// Function calls.
536    #[automatically_derived]
537    impl<
538        P: alloy_contract::private::Provider<N>,
539        N: alloy_contract::private::Network,
540    > HoprChannelsInstance<P, N> {
541        /// Creates a new call builder using this contract instance's provider and address.
542        ///
543        /// Note that the call can be any function call, not just those defined in this
544        /// contract. Prefer using the other methods for building type-safe contract calls.
545        pub fn call_builder<C: alloy_sol_types::SolCall>(
546            &self,
547            call: &C,
548        ) -> alloy_contract::SolCallBuilder<&P, C, N> {
549            alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
550        }
551    }
552    /// Event filters.
553    #[automatically_derived]
554    impl<
555        P: alloy_contract::private::Provider<N>,
556        N: alloy_contract::private::Network,
557    > HoprChannelsInstance<P, N> {
558        /// Creates a new event filter using this contract instance's provider and address.
559        ///
560        /// Note that the type can be any event, not just those defined in this contract.
561        /// Prefer using the other methods for building type-safe event filters.
562        pub fn event_filter<E: alloy_sol_types::SolEvent>(
563            &self,
564        ) -> alloy_contract::Event<&P, E, N> {
565            alloy_contract::Event::new_sol(&self.provider, &self.address)
566        }
567    }
568}
569/**
570
571Generated by the following Solidity interface...
572```solidity
573library HoprChannels {
574    type Balance is uint96;
575    type TicketIndex is uint48;
576    type Timestamp is uint32;
577}
578
579interface HoprChannelsEvents {
580    event ChannelBalanceDecreased(bytes32 indexed channelId, HoprChannels.Balance newBalance);
581    event ChannelBalanceIncreased(bytes32 indexed channelId, HoprChannels.Balance newBalance);
582    event ChannelClosed(bytes32 indexed channelId);
583    event ChannelOpened(address indexed source, address indexed destination);
584    event DomainSeparatorUpdated(bytes32 indexed domainSeparator);
585    event OutgoingChannelClosureInitiated(bytes32 indexed channelId, HoprChannels.Timestamp closureTime);
586    event TicketRedeemed(bytes32 indexed channelId, HoprChannels.TicketIndex newTicketIndex);
587}
588```
589
590...which was generated by the following JSON ABI:
591```json
592[
593  {
594    "type": "event",
595    "name": "ChannelBalanceDecreased",
596    "inputs": [
597      {
598        "name": "channelId",
599        "type": "bytes32",
600        "indexed": true,
601        "internalType": "bytes32"
602      },
603      {
604        "name": "newBalance",
605        "type": "uint96",
606        "indexed": false,
607        "internalType": "HoprChannels.Balance"
608      }
609    ],
610    "anonymous": false
611  },
612  {
613    "type": "event",
614    "name": "ChannelBalanceIncreased",
615    "inputs": [
616      {
617        "name": "channelId",
618        "type": "bytes32",
619        "indexed": true,
620        "internalType": "bytes32"
621      },
622      {
623        "name": "newBalance",
624        "type": "uint96",
625        "indexed": false,
626        "internalType": "HoprChannels.Balance"
627      }
628    ],
629    "anonymous": false
630  },
631  {
632    "type": "event",
633    "name": "ChannelClosed",
634    "inputs": [
635      {
636        "name": "channelId",
637        "type": "bytes32",
638        "indexed": true,
639        "internalType": "bytes32"
640      }
641    ],
642    "anonymous": false
643  },
644  {
645    "type": "event",
646    "name": "ChannelOpened",
647    "inputs": [
648      {
649        "name": "source",
650        "type": "address",
651        "indexed": true,
652        "internalType": "address"
653      },
654      {
655        "name": "destination",
656        "type": "address",
657        "indexed": true,
658        "internalType": "address"
659      }
660    ],
661    "anonymous": false
662  },
663  {
664    "type": "event",
665    "name": "DomainSeparatorUpdated",
666    "inputs": [
667      {
668        "name": "domainSeparator",
669        "type": "bytes32",
670        "indexed": true,
671        "internalType": "bytes32"
672      }
673    ],
674    "anonymous": false
675  },
676  {
677    "type": "event",
678    "name": "OutgoingChannelClosureInitiated",
679    "inputs": [
680      {
681        "name": "channelId",
682        "type": "bytes32",
683        "indexed": true,
684        "internalType": "bytes32"
685      },
686      {
687        "name": "closureTime",
688        "type": "uint32",
689        "indexed": false,
690        "internalType": "HoprChannels.Timestamp"
691      }
692    ],
693    "anonymous": false
694  },
695  {
696    "type": "event",
697    "name": "TicketRedeemed",
698    "inputs": [
699      {
700        "name": "channelId",
701        "type": "bytes32",
702        "indexed": true,
703        "internalType": "bytes32"
704      },
705      {
706        "name": "newTicketIndex",
707        "type": "uint48",
708        "indexed": false,
709        "internalType": "HoprChannels.TicketIndex"
710      }
711    ],
712    "anonymous": false
713  }
714]
715```*/
716#[allow(
717    non_camel_case_types,
718    non_snake_case,
719    clippy::pub_underscore_fields,
720    clippy::style,
721    clippy::empty_structs_with_brackets
722)]
723pub mod HoprChannelsEvents {
724    use super::*;
725    use alloy::sol_types as alloy_sol_types;
726    /// The creation / init bytecode of the contract.
727    ///
728    /// ```text
729    ///0x
730    /// ```
731    #[rustfmt::skip]
732    #[allow(clippy::all)]
733    pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
734        b"",
735    );
736    /// The runtime bytecode of the contract, as deployed on the network.
737    ///
738    /// ```text
739    ///0x
740    /// ```
741    #[rustfmt::skip]
742    #[allow(clippy::all)]
743    pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
744        b"",
745    );
746    #[derive(serde::Serialize, serde::Deserialize)]
747    #[derive(Default, Debug, PartialEq, Eq, Hash)]
748    /**Event with signature `ChannelBalanceDecreased(bytes32,uint96)` and selector `0x22e2a422a8860656a3a33cfa1daf771e76798ce5649747957235025de12e0b24`.
749```solidity
750event ChannelBalanceDecreased(bytes32 indexed channelId, HoprChannels.Balance newBalance);
751```*/
752    #[allow(
753        non_camel_case_types,
754        non_snake_case,
755        clippy::pub_underscore_fields,
756        clippy::style
757    )]
758    #[derive(Clone)]
759    pub struct ChannelBalanceDecreased {
760        #[allow(missing_docs)]
761        pub channelId: alloy::sol_types::private::FixedBytes<32>,
762        #[allow(missing_docs)]
763        pub newBalance: <HoprChannels::Balance as alloy::sol_types::SolType>::RustType,
764    }
765    #[allow(
766        non_camel_case_types,
767        non_snake_case,
768        clippy::pub_underscore_fields,
769        clippy::style
770    )]
771    const _: () = {
772        use alloy::sol_types as alloy_sol_types;
773        #[automatically_derived]
774        impl alloy_sol_types::SolEvent for ChannelBalanceDecreased {
775            type DataTuple<'a> = (HoprChannels::Balance,);
776            type DataToken<'a> = <Self::DataTuple<
777                'a,
778            > as alloy_sol_types::SolType>::Token<'a>;
779            type TopicList = (
780                alloy_sol_types::sol_data::FixedBytes<32>,
781                alloy::sol_types::sol_data::FixedBytes<32>,
782            );
783            const SIGNATURE: &'static str = "ChannelBalanceDecreased(bytes32,uint96)";
784            const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
785                34u8, 226u8, 164u8, 34u8, 168u8, 134u8, 6u8, 86u8, 163u8, 163u8, 60u8,
786                250u8, 29u8, 175u8, 119u8, 30u8, 118u8, 121u8, 140u8, 229u8, 100u8,
787                151u8, 71u8, 149u8, 114u8, 53u8, 2u8, 93u8, 225u8, 46u8, 11u8, 36u8,
788            ]);
789            const ANONYMOUS: bool = false;
790            #[allow(unused_variables)]
791            #[inline]
792            fn new(
793                topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
794                data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
795            ) -> Self {
796                Self {
797                    channelId: topics.1,
798                    newBalance: data.0,
799                }
800            }
801            #[inline]
802            fn check_signature(
803                topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
804            ) -> alloy_sol_types::Result<()> {
805                if topics.0 != Self::SIGNATURE_HASH {
806                    return Err(
807                        alloy_sol_types::Error::invalid_event_signature_hash(
808                            Self::SIGNATURE,
809                            topics.0,
810                            Self::SIGNATURE_HASH,
811                        ),
812                    );
813                }
814                Ok(())
815            }
816            #[inline]
817            fn tokenize_body(&self) -> Self::DataToken<'_> {
818                (
819                    <HoprChannels::Balance as alloy_sol_types::SolType>::tokenize(
820                        &self.newBalance,
821                    ),
822                )
823            }
824            #[inline]
825            fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
826                (Self::SIGNATURE_HASH.into(), self.channelId.clone())
827            }
828            #[inline]
829            fn encode_topics_raw(
830                &self,
831                out: &mut [alloy_sol_types::abi::token::WordToken],
832            ) -> alloy_sol_types::Result<()> {
833                if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
834                    return Err(alloy_sol_types::Error::Overrun);
835                }
836                out[0usize] = alloy_sol_types::abi::token::WordToken(
837                    Self::SIGNATURE_HASH,
838                );
839                out[1usize] = <alloy::sol_types::sol_data::FixedBytes<
840                    32,
841                > as alloy_sol_types::EventTopic>::encode_topic(&self.channelId);
842                Ok(())
843            }
844        }
845        #[automatically_derived]
846        impl alloy_sol_types::private::IntoLogData for ChannelBalanceDecreased {
847            fn to_log_data(&self) -> alloy_sol_types::private::LogData {
848                From::from(self)
849            }
850            fn into_log_data(self) -> alloy_sol_types::private::LogData {
851                From::from(&self)
852            }
853        }
854        #[automatically_derived]
855        impl From<&ChannelBalanceDecreased> for alloy_sol_types::private::LogData {
856            #[inline]
857            fn from(
858                this: &ChannelBalanceDecreased,
859            ) -> alloy_sol_types::private::LogData {
860                alloy_sol_types::SolEvent::encode_log_data(this)
861            }
862        }
863    };
864    #[derive(serde::Serialize, serde::Deserialize)]
865    #[derive(Default, Debug, PartialEq, Eq, Hash)]
866    /**Event with signature `ChannelBalanceIncreased(bytes32,uint96)` and selector `0x5fa17246d3a5d68d42baa94cde33042180b783a399c02bf63ac2076e0f708738`.
867```solidity
868event ChannelBalanceIncreased(bytes32 indexed channelId, HoprChannels.Balance newBalance);
869```*/
870    #[allow(
871        non_camel_case_types,
872        non_snake_case,
873        clippy::pub_underscore_fields,
874        clippy::style
875    )]
876    #[derive(Clone)]
877    pub struct ChannelBalanceIncreased {
878        #[allow(missing_docs)]
879        pub channelId: alloy::sol_types::private::FixedBytes<32>,
880        #[allow(missing_docs)]
881        pub newBalance: <HoprChannels::Balance as alloy::sol_types::SolType>::RustType,
882    }
883    #[allow(
884        non_camel_case_types,
885        non_snake_case,
886        clippy::pub_underscore_fields,
887        clippy::style
888    )]
889    const _: () = {
890        use alloy::sol_types as alloy_sol_types;
891        #[automatically_derived]
892        impl alloy_sol_types::SolEvent for ChannelBalanceIncreased {
893            type DataTuple<'a> = (HoprChannels::Balance,);
894            type DataToken<'a> = <Self::DataTuple<
895                'a,
896            > as alloy_sol_types::SolType>::Token<'a>;
897            type TopicList = (
898                alloy_sol_types::sol_data::FixedBytes<32>,
899                alloy::sol_types::sol_data::FixedBytes<32>,
900            );
901            const SIGNATURE: &'static str = "ChannelBalanceIncreased(bytes32,uint96)";
902            const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
903                95u8, 161u8, 114u8, 70u8, 211u8, 165u8, 214u8, 141u8, 66u8, 186u8, 169u8,
904                76u8, 222u8, 51u8, 4u8, 33u8, 128u8, 183u8, 131u8, 163u8, 153u8, 192u8,
905                43u8, 246u8, 58u8, 194u8, 7u8, 110u8, 15u8, 112u8, 135u8, 56u8,
906            ]);
907            const ANONYMOUS: bool = false;
908            #[allow(unused_variables)]
909            #[inline]
910            fn new(
911                topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
912                data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
913            ) -> Self {
914                Self {
915                    channelId: topics.1,
916                    newBalance: data.0,
917                }
918            }
919            #[inline]
920            fn check_signature(
921                topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
922            ) -> alloy_sol_types::Result<()> {
923                if topics.0 != Self::SIGNATURE_HASH {
924                    return Err(
925                        alloy_sol_types::Error::invalid_event_signature_hash(
926                            Self::SIGNATURE,
927                            topics.0,
928                            Self::SIGNATURE_HASH,
929                        ),
930                    );
931                }
932                Ok(())
933            }
934            #[inline]
935            fn tokenize_body(&self) -> Self::DataToken<'_> {
936                (
937                    <HoprChannels::Balance as alloy_sol_types::SolType>::tokenize(
938                        &self.newBalance,
939                    ),
940                )
941            }
942            #[inline]
943            fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
944                (Self::SIGNATURE_HASH.into(), self.channelId.clone())
945            }
946            #[inline]
947            fn encode_topics_raw(
948                &self,
949                out: &mut [alloy_sol_types::abi::token::WordToken],
950            ) -> alloy_sol_types::Result<()> {
951                if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
952                    return Err(alloy_sol_types::Error::Overrun);
953                }
954                out[0usize] = alloy_sol_types::abi::token::WordToken(
955                    Self::SIGNATURE_HASH,
956                );
957                out[1usize] = <alloy::sol_types::sol_data::FixedBytes<
958                    32,
959                > as alloy_sol_types::EventTopic>::encode_topic(&self.channelId);
960                Ok(())
961            }
962        }
963        #[automatically_derived]
964        impl alloy_sol_types::private::IntoLogData for ChannelBalanceIncreased {
965            fn to_log_data(&self) -> alloy_sol_types::private::LogData {
966                From::from(self)
967            }
968            fn into_log_data(self) -> alloy_sol_types::private::LogData {
969                From::from(&self)
970            }
971        }
972        #[automatically_derived]
973        impl From<&ChannelBalanceIncreased> for alloy_sol_types::private::LogData {
974            #[inline]
975            fn from(
976                this: &ChannelBalanceIncreased,
977            ) -> alloy_sol_types::private::LogData {
978                alloy_sol_types::SolEvent::encode_log_data(this)
979            }
980        }
981    };
982    #[derive(serde::Serialize, serde::Deserialize)]
983    #[derive(Default, Debug, PartialEq, Eq, Hash)]
984    /**Event with signature `ChannelClosed(bytes32)` and selector `0xceeab2eef998c17fe96f30f83fbf3c55fc5047f6e40c55a0cf72d236e9d2ba72`.
985```solidity
986event ChannelClosed(bytes32 indexed channelId);
987```*/
988    #[allow(
989        non_camel_case_types,
990        non_snake_case,
991        clippy::pub_underscore_fields,
992        clippy::style
993    )]
994    #[derive(Clone)]
995    pub struct ChannelClosed {
996        #[allow(missing_docs)]
997        pub channelId: alloy::sol_types::private::FixedBytes<32>,
998    }
999    #[allow(
1000        non_camel_case_types,
1001        non_snake_case,
1002        clippy::pub_underscore_fields,
1003        clippy::style
1004    )]
1005    const _: () = {
1006        use alloy::sol_types as alloy_sol_types;
1007        #[automatically_derived]
1008        impl alloy_sol_types::SolEvent for ChannelClosed {
1009            type DataTuple<'a> = ();
1010            type DataToken<'a> = <Self::DataTuple<
1011                'a,
1012            > as alloy_sol_types::SolType>::Token<'a>;
1013            type TopicList = (
1014                alloy_sol_types::sol_data::FixedBytes<32>,
1015                alloy::sol_types::sol_data::FixedBytes<32>,
1016            );
1017            const SIGNATURE: &'static str = "ChannelClosed(bytes32)";
1018            const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
1019                206u8, 234u8, 178u8, 238u8, 249u8, 152u8, 193u8, 127u8, 233u8, 111u8,
1020                48u8, 248u8, 63u8, 191u8, 60u8, 85u8, 252u8, 80u8, 71u8, 246u8, 228u8,
1021                12u8, 85u8, 160u8, 207u8, 114u8, 210u8, 54u8, 233u8, 210u8, 186u8, 114u8,
1022            ]);
1023            const ANONYMOUS: bool = false;
1024            #[allow(unused_variables)]
1025            #[inline]
1026            fn new(
1027                topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
1028                data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
1029            ) -> Self {
1030                Self { channelId: topics.1 }
1031            }
1032            #[inline]
1033            fn check_signature(
1034                topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
1035            ) -> alloy_sol_types::Result<()> {
1036                if topics.0 != Self::SIGNATURE_HASH {
1037                    return Err(
1038                        alloy_sol_types::Error::invalid_event_signature_hash(
1039                            Self::SIGNATURE,
1040                            topics.0,
1041                            Self::SIGNATURE_HASH,
1042                        ),
1043                    );
1044                }
1045                Ok(())
1046            }
1047            #[inline]
1048            fn tokenize_body(&self) -> Self::DataToken<'_> {
1049                ()
1050            }
1051            #[inline]
1052            fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
1053                (Self::SIGNATURE_HASH.into(), self.channelId.clone())
1054            }
1055            #[inline]
1056            fn encode_topics_raw(
1057                &self,
1058                out: &mut [alloy_sol_types::abi::token::WordToken],
1059            ) -> alloy_sol_types::Result<()> {
1060                if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
1061                    return Err(alloy_sol_types::Error::Overrun);
1062                }
1063                out[0usize] = alloy_sol_types::abi::token::WordToken(
1064                    Self::SIGNATURE_HASH,
1065                );
1066                out[1usize] = <alloy::sol_types::sol_data::FixedBytes<
1067                    32,
1068                > as alloy_sol_types::EventTopic>::encode_topic(&self.channelId);
1069                Ok(())
1070            }
1071        }
1072        #[automatically_derived]
1073        impl alloy_sol_types::private::IntoLogData for ChannelClosed {
1074            fn to_log_data(&self) -> alloy_sol_types::private::LogData {
1075                From::from(self)
1076            }
1077            fn into_log_data(self) -> alloy_sol_types::private::LogData {
1078                From::from(&self)
1079            }
1080        }
1081        #[automatically_derived]
1082        impl From<&ChannelClosed> for alloy_sol_types::private::LogData {
1083            #[inline]
1084            fn from(this: &ChannelClosed) -> alloy_sol_types::private::LogData {
1085                alloy_sol_types::SolEvent::encode_log_data(this)
1086            }
1087        }
1088    };
1089    #[derive(serde::Serialize, serde::Deserialize)]
1090    #[derive(Default, Debug, PartialEq, Eq, Hash)]
1091    /**Event with signature `ChannelOpened(address,address)` and selector `0xdd90f938230335e59dc925c57ecb0e27a28c2d87356e31f00cd5554abd6c1b2d`.
1092```solidity
1093event ChannelOpened(address indexed source, address indexed destination);
1094```*/
1095    #[allow(
1096        non_camel_case_types,
1097        non_snake_case,
1098        clippy::pub_underscore_fields,
1099        clippy::style
1100    )]
1101    #[derive(Clone)]
1102    pub struct ChannelOpened {
1103        #[allow(missing_docs)]
1104        pub source: alloy::sol_types::private::Address,
1105        #[allow(missing_docs)]
1106        pub destination: alloy::sol_types::private::Address,
1107    }
1108    #[allow(
1109        non_camel_case_types,
1110        non_snake_case,
1111        clippy::pub_underscore_fields,
1112        clippy::style
1113    )]
1114    const _: () = {
1115        use alloy::sol_types as alloy_sol_types;
1116        #[automatically_derived]
1117        impl alloy_sol_types::SolEvent for ChannelOpened {
1118            type DataTuple<'a> = ();
1119            type DataToken<'a> = <Self::DataTuple<
1120                'a,
1121            > as alloy_sol_types::SolType>::Token<'a>;
1122            type TopicList = (
1123                alloy_sol_types::sol_data::FixedBytes<32>,
1124                alloy::sol_types::sol_data::Address,
1125                alloy::sol_types::sol_data::Address,
1126            );
1127            const SIGNATURE: &'static str = "ChannelOpened(address,address)";
1128            const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
1129                221u8, 144u8, 249u8, 56u8, 35u8, 3u8, 53u8, 229u8, 157u8, 201u8, 37u8,
1130                197u8, 126u8, 203u8, 14u8, 39u8, 162u8, 140u8, 45u8, 135u8, 53u8, 110u8,
1131                49u8, 240u8, 12u8, 213u8, 85u8, 74u8, 189u8, 108u8, 27u8, 45u8,
1132            ]);
1133            const ANONYMOUS: bool = false;
1134            #[allow(unused_variables)]
1135            #[inline]
1136            fn new(
1137                topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
1138                data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
1139            ) -> Self {
1140                Self {
1141                    source: topics.1,
1142                    destination: topics.2,
1143                }
1144            }
1145            #[inline]
1146            fn check_signature(
1147                topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
1148            ) -> alloy_sol_types::Result<()> {
1149                if topics.0 != Self::SIGNATURE_HASH {
1150                    return Err(
1151                        alloy_sol_types::Error::invalid_event_signature_hash(
1152                            Self::SIGNATURE,
1153                            topics.0,
1154                            Self::SIGNATURE_HASH,
1155                        ),
1156                    );
1157                }
1158                Ok(())
1159            }
1160            #[inline]
1161            fn tokenize_body(&self) -> Self::DataToken<'_> {
1162                ()
1163            }
1164            #[inline]
1165            fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
1166                (
1167                    Self::SIGNATURE_HASH.into(),
1168                    self.source.clone(),
1169                    self.destination.clone(),
1170                )
1171            }
1172            #[inline]
1173            fn encode_topics_raw(
1174                &self,
1175                out: &mut [alloy_sol_types::abi::token::WordToken],
1176            ) -> alloy_sol_types::Result<()> {
1177                if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
1178                    return Err(alloy_sol_types::Error::Overrun);
1179                }
1180                out[0usize] = alloy_sol_types::abi::token::WordToken(
1181                    Self::SIGNATURE_HASH,
1182                );
1183                out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
1184                    &self.source,
1185                );
1186                out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
1187                    &self.destination,
1188                );
1189                Ok(())
1190            }
1191        }
1192        #[automatically_derived]
1193        impl alloy_sol_types::private::IntoLogData for ChannelOpened {
1194            fn to_log_data(&self) -> alloy_sol_types::private::LogData {
1195                From::from(self)
1196            }
1197            fn into_log_data(self) -> alloy_sol_types::private::LogData {
1198                From::from(&self)
1199            }
1200        }
1201        #[automatically_derived]
1202        impl From<&ChannelOpened> for alloy_sol_types::private::LogData {
1203            #[inline]
1204            fn from(this: &ChannelOpened) -> alloy_sol_types::private::LogData {
1205                alloy_sol_types::SolEvent::encode_log_data(this)
1206            }
1207        }
1208    };
1209    #[derive(serde::Serialize, serde::Deserialize)]
1210    #[derive(Default, Debug, PartialEq, Eq, Hash)]
1211    /**Event with signature `DomainSeparatorUpdated(bytes32)` and selector `0x771f5240ae5fd8a7640d3fb82fa70aab2fb1dbf35f2ef464f8509946717664c5`.
1212```solidity
1213event DomainSeparatorUpdated(bytes32 indexed domainSeparator);
1214```*/
1215    #[allow(
1216        non_camel_case_types,
1217        non_snake_case,
1218        clippy::pub_underscore_fields,
1219        clippy::style
1220    )]
1221    #[derive(Clone)]
1222    pub struct DomainSeparatorUpdated {
1223        #[allow(missing_docs)]
1224        pub domainSeparator: alloy::sol_types::private::FixedBytes<32>,
1225    }
1226    #[allow(
1227        non_camel_case_types,
1228        non_snake_case,
1229        clippy::pub_underscore_fields,
1230        clippy::style
1231    )]
1232    const _: () = {
1233        use alloy::sol_types as alloy_sol_types;
1234        #[automatically_derived]
1235        impl alloy_sol_types::SolEvent for DomainSeparatorUpdated {
1236            type DataTuple<'a> = ();
1237            type DataToken<'a> = <Self::DataTuple<
1238                'a,
1239            > as alloy_sol_types::SolType>::Token<'a>;
1240            type TopicList = (
1241                alloy_sol_types::sol_data::FixedBytes<32>,
1242                alloy::sol_types::sol_data::FixedBytes<32>,
1243            );
1244            const SIGNATURE: &'static str = "DomainSeparatorUpdated(bytes32)";
1245            const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
1246                119u8, 31u8, 82u8, 64u8, 174u8, 95u8, 216u8, 167u8, 100u8, 13u8, 63u8,
1247                184u8, 47u8, 167u8, 10u8, 171u8, 47u8, 177u8, 219u8, 243u8, 95u8, 46u8,
1248                244u8, 100u8, 248u8, 80u8, 153u8, 70u8, 113u8, 118u8, 100u8, 197u8,
1249            ]);
1250            const ANONYMOUS: bool = false;
1251            #[allow(unused_variables)]
1252            #[inline]
1253            fn new(
1254                topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
1255                data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
1256            ) -> Self {
1257                Self { domainSeparator: topics.1 }
1258            }
1259            #[inline]
1260            fn check_signature(
1261                topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
1262            ) -> alloy_sol_types::Result<()> {
1263                if topics.0 != Self::SIGNATURE_HASH {
1264                    return Err(
1265                        alloy_sol_types::Error::invalid_event_signature_hash(
1266                            Self::SIGNATURE,
1267                            topics.0,
1268                            Self::SIGNATURE_HASH,
1269                        ),
1270                    );
1271                }
1272                Ok(())
1273            }
1274            #[inline]
1275            fn tokenize_body(&self) -> Self::DataToken<'_> {
1276                ()
1277            }
1278            #[inline]
1279            fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
1280                (Self::SIGNATURE_HASH.into(), self.domainSeparator.clone())
1281            }
1282            #[inline]
1283            fn encode_topics_raw(
1284                &self,
1285                out: &mut [alloy_sol_types::abi::token::WordToken],
1286            ) -> alloy_sol_types::Result<()> {
1287                if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
1288                    return Err(alloy_sol_types::Error::Overrun);
1289                }
1290                out[0usize] = alloy_sol_types::abi::token::WordToken(
1291                    Self::SIGNATURE_HASH,
1292                );
1293                out[1usize] = <alloy::sol_types::sol_data::FixedBytes<
1294                    32,
1295                > as alloy_sol_types::EventTopic>::encode_topic(&self.domainSeparator);
1296                Ok(())
1297            }
1298        }
1299        #[automatically_derived]
1300        impl alloy_sol_types::private::IntoLogData for DomainSeparatorUpdated {
1301            fn to_log_data(&self) -> alloy_sol_types::private::LogData {
1302                From::from(self)
1303            }
1304            fn into_log_data(self) -> alloy_sol_types::private::LogData {
1305                From::from(&self)
1306            }
1307        }
1308        #[automatically_derived]
1309        impl From<&DomainSeparatorUpdated> for alloy_sol_types::private::LogData {
1310            #[inline]
1311            fn from(this: &DomainSeparatorUpdated) -> alloy_sol_types::private::LogData {
1312                alloy_sol_types::SolEvent::encode_log_data(this)
1313            }
1314        }
1315    };
1316    #[derive(serde::Serialize, serde::Deserialize)]
1317    #[derive(Default, Debug, PartialEq, Eq, Hash)]
1318    /**Event with signature `OutgoingChannelClosureInitiated(bytes32,uint32)` and selector `0x07b5c950597fc3bed92e2ad37fa84f701655acb372982e486f5fad3607f04a5c`.
1319```solidity
1320event OutgoingChannelClosureInitiated(bytes32 indexed channelId, HoprChannels.Timestamp closureTime);
1321```*/
1322    #[allow(
1323        non_camel_case_types,
1324        non_snake_case,
1325        clippy::pub_underscore_fields,
1326        clippy::style
1327    )]
1328    #[derive(Clone)]
1329    pub struct OutgoingChannelClosureInitiated {
1330        #[allow(missing_docs)]
1331        pub channelId: alloy::sol_types::private::FixedBytes<32>,
1332        #[allow(missing_docs)]
1333        pub closureTime: <HoprChannels::Timestamp as alloy::sol_types::SolType>::RustType,
1334    }
1335    #[allow(
1336        non_camel_case_types,
1337        non_snake_case,
1338        clippy::pub_underscore_fields,
1339        clippy::style
1340    )]
1341    const _: () = {
1342        use alloy::sol_types as alloy_sol_types;
1343        #[automatically_derived]
1344        impl alloy_sol_types::SolEvent for OutgoingChannelClosureInitiated {
1345            type DataTuple<'a> = (HoprChannels::Timestamp,);
1346            type DataToken<'a> = <Self::DataTuple<
1347                'a,
1348            > as alloy_sol_types::SolType>::Token<'a>;
1349            type TopicList = (
1350                alloy_sol_types::sol_data::FixedBytes<32>,
1351                alloy::sol_types::sol_data::FixedBytes<32>,
1352            );
1353            const SIGNATURE: &'static str = "OutgoingChannelClosureInitiated(bytes32,uint32)";
1354            const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
1355                7u8, 181u8, 201u8, 80u8, 89u8, 127u8, 195u8, 190u8, 217u8, 46u8, 42u8,
1356                211u8, 127u8, 168u8, 79u8, 112u8, 22u8, 85u8, 172u8, 179u8, 114u8, 152u8,
1357                46u8, 72u8, 111u8, 95u8, 173u8, 54u8, 7u8, 240u8, 74u8, 92u8,
1358            ]);
1359            const ANONYMOUS: bool = false;
1360            #[allow(unused_variables)]
1361            #[inline]
1362            fn new(
1363                topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
1364                data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
1365            ) -> Self {
1366                Self {
1367                    channelId: topics.1,
1368                    closureTime: data.0,
1369                }
1370            }
1371            #[inline]
1372            fn check_signature(
1373                topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
1374            ) -> alloy_sol_types::Result<()> {
1375                if topics.0 != Self::SIGNATURE_HASH {
1376                    return Err(
1377                        alloy_sol_types::Error::invalid_event_signature_hash(
1378                            Self::SIGNATURE,
1379                            topics.0,
1380                            Self::SIGNATURE_HASH,
1381                        ),
1382                    );
1383                }
1384                Ok(())
1385            }
1386            #[inline]
1387            fn tokenize_body(&self) -> Self::DataToken<'_> {
1388                (
1389                    <HoprChannels::Timestamp as alloy_sol_types::SolType>::tokenize(
1390                        &self.closureTime,
1391                    ),
1392                )
1393            }
1394            #[inline]
1395            fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
1396                (Self::SIGNATURE_HASH.into(), self.channelId.clone())
1397            }
1398            #[inline]
1399            fn encode_topics_raw(
1400                &self,
1401                out: &mut [alloy_sol_types::abi::token::WordToken],
1402            ) -> alloy_sol_types::Result<()> {
1403                if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
1404                    return Err(alloy_sol_types::Error::Overrun);
1405                }
1406                out[0usize] = alloy_sol_types::abi::token::WordToken(
1407                    Self::SIGNATURE_HASH,
1408                );
1409                out[1usize] = <alloy::sol_types::sol_data::FixedBytes<
1410                    32,
1411                > as alloy_sol_types::EventTopic>::encode_topic(&self.channelId);
1412                Ok(())
1413            }
1414        }
1415        #[automatically_derived]
1416        impl alloy_sol_types::private::IntoLogData for OutgoingChannelClosureInitiated {
1417            fn to_log_data(&self) -> alloy_sol_types::private::LogData {
1418                From::from(self)
1419            }
1420            fn into_log_data(self) -> alloy_sol_types::private::LogData {
1421                From::from(&self)
1422            }
1423        }
1424        #[automatically_derived]
1425        impl From<&OutgoingChannelClosureInitiated>
1426        for alloy_sol_types::private::LogData {
1427            #[inline]
1428            fn from(
1429                this: &OutgoingChannelClosureInitiated,
1430            ) -> alloy_sol_types::private::LogData {
1431                alloy_sol_types::SolEvent::encode_log_data(this)
1432            }
1433        }
1434    };
1435    #[derive(serde::Serialize, serde::Deserialize)]
1436    #[derive(Default, Debug, PartialEq, Eq, Hash)]
1437    /**Event with signature `TicketRedeemed(bytes32,uint48)` and selector `0x7165e2ebc7ce35cc98cb7666f9945b3617f3f36326b76d18937ba5fecf18739a`.
1438```solidity
1439event TicketRedeemed(bytes32 indexed channelId, HoprChannels.TicketIndex newTicketIndex);
1440```*/
1441    #[allow(
1442        non_camel_case_types,
1443        non_snake_case,
1444        clippy::pub_underscore_fields,
1445        clippy::style
1446    )]
1447    #[derive(Clone)]
1448    pub struct TicketRedeemed {
1449        #[allow(missing_docs)]
1450        pub channelId: alloy::sol_types::private::FixedBytes<32>,
1451        #[allow(missing_docs)]
1452        pub newTicketIndex: <HoprChannels::TicketIndex as alloy::sol_types::SolType>::RustType,
1453    }
1454    #[allow(
1455        non_camel_case_types,
1456        non_snake_case,
1457        clippy::pub_underscore_fields,
1458        clippy::style
1459    )]
1460    const _: () = {
1461        use alloy::sol_types as alloy_sol_types;
1462        #[automatically_derived]
1463        impl alloy_sol_types::SolEvent for TicketRedeemed {
1464            type DataTuple<'a> = (HoprChannels::TicketIndex,);
1465            type DataToken<'a> = <Self::DataTuple<
1466                'a,
1467            > as alloy_sol_types::SolType>::Token<'a>;
1468            type TopicList = (
1469                alloy_sol_types::sol_data::FixedBytes<32>,
1470                alloy::sol_types::sol_data::FixedBytes<32>,
1471            );
1472            const SIGNATURE: &'static str = "TicketRedeemed(bytes32,uint48)";
1473            const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
1474                113u8, 101u8, 226u8, 235u8, 199u8, 206u8, 53u8, 204u8, 152u8, 203u8,
1475                118u8, 102u8, 249u8, 148u8, 91u8, 54u8, 23u8, 243u8, 243u8, 99u8, 38u8,
1476                183u8, 109u8, 24u8, 147u8, 123u8, 165u8, 254u8, 207u8, 24u8, 115u8, 154u8,
1477            ]);
1478            const ANONYMOUS: bool = false;
1479            #[allow(unused_variables)]
1480            #[inline]
1481            fn new(
1482                topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
1483                data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
1484            ) -> Self {
1485                Self {
1486                    channelId: topics.1,
1487                    newTicketIndex: data.0,
1488                }
1489            }
1490            #[inline]
1491            fn check_signature(
1492                topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
1493            ) -> alloy_sol_types::Result<()> {
1494                if topics.0 != Self::SIGNATURE_HASH {
1495                    return Err(
1496                        alloy_sol_types::Error::invalid_event_signature_hash(
1497                            Self::SIGNATURE,
1498                            topics.0,
1499                            Self::SIGNATURE_HASH,
1500                        ),
1501                    );
1502                }
1503                Ok(())
1504            }
1505            #[inline]
1506            fn tokenize_body(&self) -> Self::DataToken<'_> {
1507                (
1508                    <HoprChannels::TicketIndex as alloy_sol_types::SolType>::tokenize(
1509                        &self.newTicketIndex,
1510                    ),
1511                )
1512            }
1513            #[inline]
1514            fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
1515                (Self::SIGNATURE_HASH.into(), self.channelId.clone())
1516            }
1517            #[inline]
1518            fn encode_topics_raw(
1519                &self,
1520                out: &mut [alloy_sol_types::abi::token::WordToken],
1521            ) -> alloy_sol_types::Result<()> {
1522                if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
1523                    return Err(alloy_sol_types::Error::Overrun);
1524                }
1525                out[0usize] = alloy_sol_types::abi::token::WordToken(
1526                    Self::SIGNATURE_HASH,
1527                );
1528                out[1usize] = <alloy::sol_types::sol_data::FixedBytes<
1529                    32,
1530                > as alloy_sol_types::EventTopic>::encode_topic(&self.channelId);
1531                Ok(())
1532            }
1533        }
1534        #[automatically_derived]
1535        impl alloy_sol_types::private::IntoLogData for TicketRedeemed {
1536            fn to_log_data(&self) -> alloy_sol_types::private::LogData {
1537                From::from(self)
1538            }
1539            fn into_log_data(self) -> alloy_sol_types::private::LogData {
1540                From::from(&self)
1541            }
1542        }
1543        #[automatically_derived]
1544        impl From<&TicketRedeemed> for alloy_sol_types::private::LogData {
1545            #[inline]
1546            fn from(this: &TicketRedeemed) -> alloy_sol_types::private::LogData {
1547                alloy_sol_types::SolEvent::encode_log_data(this)
1548            }
1549        }
1550    };
1551    ///Container for all the [`HoprChannelsEvents`](self) events.
1552    #[derive(serde::Serialize, serde::Deserialize)]
1553    #[derive(Debug, PartialEq, Eq, Hash)]
1554    pub enum HoprChannelsEventsEvents {
1555        #[allow(missing_docs)]
1556        ChannelBalanceDecreased(ChannelBalanceDecreased),
1557        #[allow(missing_docs)]
1558        ChannelBalanceIncreased(ChannelBalanceIncreased),
1559        #[allow(missing_docs)]
1560        ChannelClosed(ChannelClosed),
1561        #[allow(missing_docs)]
1562        ChannelOpened(ChannelOpened),
1563        #[allow(missing_docs)]
1564        DomainSeparatorUpdated(DomainSeparatorUpdated),
1565        #[allow(missing_docs)]
1566        OutgoingChannelClosureInitiated(OutgoingChannelClosureInitiated),
1567        #[allow(missing_docs)]
1568        TicketRedeemed(TicketRedeemed),
1569    }
1570    #[automatically_derived]
1571    impl HoprChannelsEventsEvents {
1572        /// All the selectors of this enum.
1573        ///
1574        /// Note that the selectors might not be in the same order as the variants.
1575        /// No guarantees are made about the order of the selectors.
1576        ///
1577        /// Prefer using `SolInterface` methods instead.
1578        pub const SELECTORS: &'static [[u8; 32usize]] = &[
1579            [
1580                7u8, 181u8, 201u8, 80u8, 89u8, 127u8, 195u8, 190u8, 217u8, 46u8, 42u8,
1581                211u8, 127u8, 168u8, 79u8, 112u8, 22u8, 85u8, 172u8, 179u8, 114u8, 152u8,
1582                46u8, 72u8, 111u8, 95u8, 173u8, 54u8, 7u8, 240u8, 74u8, 92u8,
1583            ],
1584            [
1585                34u8, 226u8, 164u8, 34u8, 168u8, 134u8, 6u8, 86u8, 163u8, 163u8, 60u8,
1586                250u8, 29u8, 175u8, 119u8, 30u8, 118u8, 121u8, 140u8, 229u8, 100u8,
1587                151u8, 71u8, 149u8, 114u8, 53u8, 2u8, 93u8, 225u8, 46u8, 11u8, 36u8,
1588            ],
1589            [
1590                95u8, 161u8, 114u8, 70u8, 211u8, 165u8, 214u8, 141u8, 66u8, 186u8, 169u8,
1591                76u8, 222u8, 51u8, 4u8, 33u8, 128u8, 183u8, 131u8, 163u8, 153u8, 192u8,
1592                43u8, 246u8, 58u8, 194u8, 7u8, 110u8, 15u8, 112u8, 135u8, 56u8,
1593            ],
1594            [
1595                113u8, 101u8, 226u8, 235u8, 199u8, 206u8, 53u8, 204u8, 152u8, 203u8,
1596                118u8, 102u8, 249u8, 148u8, 91u8, 54u8, 23u8, 243u8, 243u8, 99u8, 38u8,
1597                183u8, 109u8, 24u8, 147u8, 123u8, 165u8, 254u8, 207u8, 24u8, 115u8, 154u8,
1598            ],
1599            [
1600                119u8, 31u8, 82u8, 64u8, 174u8, 95u8, 216u8, 167u8, 100u8, 13u8, 63u8,
1601                184u8, 47u8, 167u8, 10u8, 171u8, 47u8, 177u8, 219u8, 243u8, 95u8, 46u8,
1602                244u8, 100u8, 248u8, 80u8, 153u8, 70u8, 113u8, 118u8, 100u8, 197u8,
1603            ],
1604            [
1605                206u8, 234u8, 178u8, 238u8, 249u8, 152u8, 193u8, 127u8, 233u8, 111u8,
1606                48u8, 248u8, 63u8, 191u8, 60u8, 85u8, 252u8, 80u8, 71u8, 246u8, 228u8,
1607                12u8, 85u8, 160u8, 207u8, 114u8, 210u8, 54u8, 233u8, 210u8, 186u8, 114u8,
1608            ],
1609            [
1610                221u8, 144u8, 249u8, 56u8, 35u8, 3u8, 53u8, 229u8, 157u8, 201u8, 37u8,
1611                197u8, 126u8, 203u8, 14u8, 39u8, 162u8, 140u8, 45u8, 135u8, 53u8, 110u8,
1612                49u8, 240u8, 12u8, 213u8, 85u8, 74u8, 189u8, 108u8, 27u8, 45u8,
1613            ],
1614        ];
1615    }
1616    #[automatically_derived]
1617    impl alloy_sol_types::SolEventInterface for HoprChannelsEventsEvents {
1618        const NAME: &'static str = "HoprChannelsEventsEvents";
1619        const COUNT: usize = 7usize;
1620        fn decode_raw_log(
1621            topics: &[alloy_sol_types::Word],
1622            data: &[u8],
1623        ) -> alloy_sol_types::Result<Self> {
1624            match topics.first().copied() {
1625                Some(
1626                    <ChannelBalanceDecreased as alloy_sol_types::SolEvent>::SIGNATURE_HASH,
1627                ) => {
1628                    <ChannelBalanceDecreased as alloy_sol_types::SolEvent>::decode_raw_log(
1629                            topics,
1630                            data,
1631                        )
1632                        .map(Self::ChannelBalanceDecreased)
1633                }
1634                Some(
1635                    <ChannelBalanceIncreased as alloy_sol_types::SolEvent>::SIGNATURE_HASH,
1636                ) => {
1637                    <ChannelBalanceIncreased as alloy_sol_types::SolEvent>::decode_raw_log(
1638                            topics,
1639                            data,
1640                        )
1641                        .map(Self::ChannelBalanceIncreased)
1642                }
1643                Some(<ChannelClosed as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
1644                    <ChannelClosed as alloy_sol_types::SolEvent>::decode_raw_log(
1645                            topics,
1646                            data,
1647                        )
1648                        .map(Self::ChannelClosed)
1649                }
1650                Some(<ChannelOpened as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
1651                    <ChannelOpened as alloy_sol_types::SolEvent>::decode_raw_log(
1652                            topics,
1653                            data,
1654                        )
1655                        .map(Self::ChannelOpened)
1656                }
1657                Some(
1658                    <DomainSeparatorUpdated as alloy_sol_types::SolEvent>::SIGNATURE_HASH,
1659                ) => {
1660                    <DomainSeparatorUpdated as alloy_sol_types::SolEvent>::decode_raw_log(
1661                            topics,
1662                            data,
1663                        )
1664                        .map(Self::DomainSeparatorUpdated)
1665                }
1666                Some(
1667                    <OutgoingChannelClosureInitiated as alloy_sol_types::SolEvent>::SIGNATURE_HASH,
1668                ) => {
1669                    <OutgoingChannelClosureInitiated as alloy_sol_types::SolEvent>::decode_raw_log(
1670                            topics,
1671                            data,
1672                        )
1673                        .map(Self::OutgoingChannelClosureInitiated)
1674                }
1675                Some(<TicketRedeemed as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
1676                    <TicketRedeemed as alloy_sol_types::SolEvent>::decode_raw_log(
1677                            topics,
1678                            data,
1679                        )
1680                        .map(Self::TicketRedeemed)
1681                }
1682                _ => {
1683                    alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
1684                        name: <Self as alloy_sol_types::SolEventInterface>::NAME,
1685                        log: alloy_sol_types::private::Box::new(
1686                            alloy_sol_types::private::LogData::new_unchecked(
1687                                topics.to_vec(),
1688                                data.to_vec().into(),
1689                            ),
1690                        ),
1691                    })
1692                }
1693            }
1694        }
1695    }
1696    #[automatically_derived]
1697    impl alloy_sol_types::private::IntoLogData for HoprChannelsEventsEvents {
1698        fn to_log_data(&self) -> alloy_sol_types::private::LogData {
1699            match self {
1700                Self::ChannelBalanceDecreased(inner) => {
1701                    alloy_sol_types::private::IntoLogData::to_log_data(inner)
1702                }
1703                Self::ChannelBalanceIncreased(inner) => {
1704                    alloy_sol_types::private::IntoLogData::to_log_data(inner)
1705                }
1706                Self::ChannelClosed(inner) => {
1707                    alloy_sol_types::private::IntoLogData::to_log_data(inner)
1708                }
1709                Self::ChannelOpened(inner) => {
1710                    alloy_sol_types::private::IntoLogData::to_log_data(inner)
1711                }
1712                Self::DomainSeparatorUpdated(inner) => {
1713                    alloy_sol_types::private::IntoLogData::to_log_data(inner)
1714                }
1715                Self::OutgoingChannelClosureInitiated(inner) => {
1716                    alloy_sol_types::private::IntoLogData::to_log_data(inner)
1717                }
1718                Self::TicketRedeemed(inner) => {
1719                    alloy_sol_types::private::IntoLogData::to_log_data(inner)
1720                }
1721            }
1722        }
1723        fn into_log_data(self) -> alloy_sol_types::private::LogData {
1724            match self {
1725                Self::ChannelBalanceDecreased(inner) => {
1726                    alloy_sol_types::private::IntoLogData::into_log_data(inner)
1727                }
1728                Self::ChannelBalanceIncreased(inner) => {
1729                    alloy_sol_types::private::IntoLogData::into_log_data(inner)
1730                }
1731                Self::ChannelClosed(inner) => {
1732                    alloy_sol_types::private::IntoLogData::into_log_data(inner)
1733                }
1734                Self::ChannelOpened(inner) => {
1735                    alloy_sol_types::private::IntoLogData::into_log_data(inner)
1736                }
1737                Self::DomainSeparatorUpdated(inner) => {
1738                    alloy_sol_types::private::IntoLogData::into_log_data(inner)
1739                }
1740                Self::OutgoingChannelClosureInitiated(inner) => {
1741                    alloy_sol_types::private::IntoLogData::into_log_data(inner)
1742                }
1743                Self::TicketRedeemed(inner) => {
1744                    alloy_sol_types::private::IntoLogData::into_log_data(inner)
1745                }
1746            }
1747        }
1748    }
1749    use alloy::contract as alloy_contract;
1750    /**Creates a new wrapper around an on-chain [`HoprChannelsEvents`](self) contract instance.
1751
1752See the [wrapper's documentation](`HoprChannelsEventsInstance`) for more details.*/
1753    #[inline]
1754    pub const fn new<
1755        P: alloy_contract::private::Provider<N>,
1756        N: alloy_contract::private::Network,
1757    >(
1758        address: alloy_sol_types::private::Address,
1759        provider: P,
1760    ) -> HoprChannelsEventsInstance<P, N> {
1761        HoprChannelsEventsInstance::<P, N>::new(address, provider)
1762    }
1763    /**Deploys this contract using the given `provider` and constructor arguments, if any.
1764
1765Returns a new instance of the contract, if the deployment was successful.
1766
1767For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
1768    #[inline]
1769    pub fn deploy<
1770        P: alloy_contract::private::Provider<N>,
1771        N: alloy_contract::private::Network,
1772    >(
1773        provider: P,
1774    ) -> impl ::core::future::Future<
1775        Output = alloy_contract::Result<HoprChannelsEventsInstance<P, N>>,
1776    > {
1777        HoprChannelsEventsInstance::<P, N>::deploy(provider)
1778    }
1779    /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
1780and constructor arguments, if any.
1781
1782This is a simple wrapper around creating a `RawCallBuilder` with the data set to
1783the bytecode concatenated with the constructor's ABI-encoded arguments.*/
1784    #[inline]
1785    pub fn deploy_builder<
1786        P: alloy_contract::private::Provider<N>,
1787        N: alloy_contract::private::Network,
1788    >(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
1789        HoprChannelsEventsInstance::<P, N>::deploy_builder(provider)
1790    }
1791    /**A [`HoprChannelsEvents`](self) instance.
1792
1793Contains type-safe methods for interacting with an on-chain instance of the
1794[`HoprChannelsEvents`](self) contract located at a given `address`, using a given
1795provider `P`.
1796
1797If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
1798documentation on how to provide it), the `deploy` and `deploy_builder` methods can
1799be used to deploy a new instance of the contract.
1800
1801See the [module-level documentation](self) for all the available methods.*/
1802    #[derive(Clone)]
1803    pub struct HoprChannelsEventsInstance<P, N = alloy_contract::private::Ethereum> {
1804        address: alloy_sol_types::private::Address,
1805        provider: P,
1806        _network: ::core::marker::PhantomData<N>,
1807    }
1808    #[automatically_derived]
1809    impl<P, N> ::core::fmt::Debug for HoprChannelsEventsInstance<P, N> {
1810        #[inline]
1811        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1812            f.debug_tuple("HoprChannelsEventsInstance").field(&self.address).finish()
1813        }
1814    }
1815    /// Instantiation and getters/setters.
1816    #[automatically_derived]
1817    impl<
1818        P: alloy_contract::private::Provider<N>,
1819        N: alloy_contract::private::Network,
1820    > HoprChannelsEventsInstance<P, N> {
1821        /**Creates a new wrapper around an on-chain [`HoprChannelsEvents`](self) contract instance.
1822
1823See the [wrapper's documentation](`HoprChannelsEventsInstance`) for more details.*/
1824        #[inline]
1825        pub const fn new(
1826            address: alloy_sol_types::private::Address,
1827            provider: P,
1828        ) -> Self {
1829            Self {
1830                address,
1831                provider,
1832                _network: ::core::marker::PhantomData,
1833            }
1834        }
1835        /**Deploys this contract using the given `provider` and constructor arguments, if any.
1836
1837Returns a new instance of the contract, if the deployment was successful.
1838
1839For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
1840        #[inline]
1841        pub async fn deploy(
1842            provider: P,
1843        ) -> alloy_contract::Result<HoprChannelsEventsInstance<P, N>> {
1844            let call_builder = Self::deploy_builder(provider);
1845            let contract_address = call_builder.deploy().await?;
1846            Ok(Self::new(contract_address, call_builder.provider))
1847        }
1848        /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
1849and constructor arguments, if any.
1850
1851This is a simple wrapper around creating a `RawCallBuilder` with the data set to
1852the bytecode concatenated with the constructor's ABI-encoded arguments.*/
1853        #[inline]
1854        pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
1855            alloy_contract::RawCallBuilder::new_raw_deploy(
1856                provider,
1857                ::core::clone::Clone::clone(&BYTECODE),
1858            )
1859        }
1860        /// Returns a reference to the address.
1861        #[inline]
1862        pub const fn address(&self) -> &alloy_sol_types::private::Address {
1863            &self.address
1864        }
1865        /// Sets the address.
1866        #[inline]
1867        pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
1868            self.address = address;
1869        }
1870        /// Sets the address and returns `self`.
1871        pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
1872            self.set_address(address);
1873            self
1874        }
1875        /// Returns a reference to the provider.
1876        #[inline]
1877        pub const fn provider(&self) -> &P {
1878            &self.provider
1879        }
1880    }
1881    impl<P: ::core::clone::Clone, N> HoprChannelsEventsInstance<&P, N> {
1882        /// Clones the provider and returns a new instance with the cloned provider.
1883        #[inline]
1884        pub fn with_cloned_provider(self) -> HoprChannelsEventsInstance<P, N> {
1885            HoprChannelsEventsInstance {
1886                address: self.address,
1887                provider: ::core::clone::Clone::clone(&self.provider),
1888                _network: ::core::marker::PhantomData,
1889            }
1890        }
1891    }
1892    /// Function calls.
1893    #[automatically_derived]
1894    impl<
1895        P: alloy_contract::private::Provider<N>,
1896        N: alloy_contract::private::Network,
1897    > HoprChannelsEventsInstance<P, N> {
1898        /// Creates a new call builder using this contract instance's provider and address.
1899        ///
1900        /// Note that the call can be any function call, not just those defined in this
1901        /// contract. Prefer using the other methods for building type-safe contract calls.
1902        pub fn call_builder<C: alloy_sol_types::SolCall>(
1903            &self,
1904            call: &C,
1905        ) -> alloy_contract::SolCallBuilder<&P, C, N> {
1906            alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
1907        }
1908    }
1909    /// Event filters.
1910    #[automatically_derived]
1911    impl<
1912        P: alloy_contract::private::Provider<N>,
1913        N: alloy_contract::private::Network,
1914    > HoprChannelsEventsInstance<P, N> {
1915        /// Creates a new event filter using this contract instance's provider and address.
1916        ///
1917        /// Note that the type can be any event, not just those defined in this contract.
1918        /// Prefer using the other methods for building type-safe event filters.
1919        pub fn event_filter<E: alloy_sol_types::SolEvent>(
1920            &self,
1921        ) -> alloy_contract::Event<&P, E, N> {
1922            alloy_contract::Event::new_sol(&self.provider, &self.address)
1923        }
1924        ///Creates a new event filter for the [`ChannelBalanceDecreased`] event.
1925        pub fn ChannelBalanceDecreased_filter(
1926            &self,
1927        ) -> alloy_contract::Event<&P, ChannelBalanceDecreased, N> {
1928            self.event_filter::<ChannelBalanceDecreased>()
1929        }
1930        ///Creates a new event filter for the [`ChannelBalanceIncreased`] event.
1931        pub fn ChannelBalanceIncreased_filter(
1932            &self,
1933        ) -> alloy_contract::Event<&P, ChannelBalanceIncreased, N> {
1934            self.event_filter::<ChannelBalanceIncreased>()
1935        }
1936        ///Creates a new event filter for the [`ChannelClosed`] event.
1937        pub fn ChannelClosed_filter(
1938            &self,
1939        ) -> alloy_contract::Event<&P, ChannelClosed, N> {
1940            self.event_filter::<ChannelClosed>()
1941        }
1942        ///Creates a new event filter for the [`ChannelOpened`] event.
1943        pub fn ChannelOpened_filter(
1944            &self,
1945        ) -> alloy_contract::Event<&P, ChannelOpened, N> {
1946            self.event_filter::<ChannelOpened>()
1947        }
1948        ///Creates a new event filter for the [`DomainSeparatorUpdated`] event.
1949        pub fn DomainSeparatorUpdated_filter(
1950            &self,
1951        ) -> alloy_contract::Event<&P, DomainSeparatorUpdated, N> {
1952            self.event_filter::<DomainSeparatorUpdated>()
1953        }
1954        ///Creates a new event filter for the [`OutgoingChannelClosureInitiated`] event.
1955        pub fn OutgoingChannelClosureInitiated_filter(
1956            &self,
1957        ) -> alloy_contract::Event<&P, OutgoingChannelClosureInitiated, N> {
1958            self.event_filter::<OutgoingChannelClosureInitiated>()
1959        }
1960        ///Creates a new event filter for the [`TicketRedeemed`] event.
1961        pub fn TicketRedeemed_filter(
1962            &self,
1963        ) -> alloy_contract::Event<&P, TicketRedeemed, N> {
1964            self.event_filter::<TicketRedeemed>()
1965        }
1966    }
1967}