hopr_bindings/codegen/
hoprledger.rs

1/**
2
3Generated by the following Solidity interface...
4```solidity
5interface HoprLedger {
6    event LedgerDomainSeparatorUpdated(bytes32 indexed ledgerDomainSeparator);
7
8    function LEDGER_VERSION() external view returns (string memory);
9    function ledgerDomainSeparator() external view returns (bytes32);
10    function updateLedgerDomainSeparator() external;
11}
12```
13
14...which was generated by the following JSON ABI:
15```json
16[
17  {
18    "type": "function",
19    "name": "LEDGER_VERSION",
20    "inputs": [],
21    "outputs": [
22      {
23        "name": "",
24        "type": "string",
25        "internalType": "string"
26      }
27    ],
28    "stateMutability": "view"
29  },
30  {
31    "type": "function",
32    "name": "ledgerDomainSeparator",
33    "inputs": [],
34    "outputs": [
35      {
36        "name": "",
37        "type": "bytes32",
38        "internalType": "bytes32"
39      }
40    ],
41    "stateMutability": "view"
42  },
43  {
44    "type": "function",
45    "name": "updateLedgerDomainSeparator",
46    "inputs": [],
47    "outputs": [],
48    "stateMutability": "nonpayable"
49  },
50  {
51    "type": "event",
52    "name": "LedgerDomainSeparatorUpdated",
53    "inputs": [
54      {
55        "name": "ledgerDomainSeparator",
56        "type": "bytes32",
57        "indexed": true,
58        "internalType": "bytes32"
59      }
60    ],
61    "anonymous": false
62  }
63]
64```*/
65#[allow(
66    non_camel_case_types,
67    non_snake_case,
68    clippy::pub_underscore_fields,
69    clippy::style,
70    clippy::empty_structs_with_brackets
71)]
72pub mod HoprLedger {
73    use super::*;
74    use alloy::sol_types as alloy_sol_types;
75    /// The creation / init bytecode of the contract.
76    ///
77    /// ```text
78    ///0x
79    /// ```
80    #[rustfmt::skip]
81    #[allow(clippy::all)]
82    pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
83        b"",
84    );
85    /// The runtime bytecode of the contract, as deployed on the network.
86    ///
87    /// ```text
88    ///0x
89    /// ```
90    #[rustfmt::skip]
91    #[allow(clippy::all)]
92    pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
93        b"",
94    );
95    #[derive(serde::Serialize, serde::Deserialize)]
96    #[derive(Default, Debug, PartialEq, Eq, Hash)]
97    /**Event with signature `LedgerDomainSeparatorUpdated(bytes32)` and selector `0xa43fad83920fd09445855e854e73c9c532e17402c9ceb09993a2392843a5bdb9`.
98```solidity
99event LedgerDomainSeparatorUpdated(bytes32 indexed ledgerDomainSeparator);
100```*/
101    #[allow(
102        non_camel_case_types,
103        non_snake_case,
104        clippy::pub_underscore_fields,
105        clippy::style
106    )]
107    #[derive(Clone)]
108    pub struct LedgerDomainSeparatorUpdated {
109        #[allow(missing_docs)]
110        pub ledgerDomainSeparator: alloy::sol_types::private::FixedBytes<32>,
111    }
112    #[allow(
113        non_camel_case_types,
114        non_snake_case,
115        clippy::pub_underscore_fields,
116        clippy::style
117    )]
118    const _: () = {
119        use alloy::sol_types as alloy_sol_types;
120        #[automatically_derived]
121        impl alloy_sol_types::SolEvent for LedgerDomainSeparatorUpdated {
122            type DataTuple<'a> = ();
123            type DataToken<'a> = <Self::DataTuple<
124                'a,
125            > as alloy_sol_types::SolType>::Token<'a>;
126            type TopicList = (
127                alloy_sol_types::sol_data::FixedBytes<32>,
128                alloy::sol_types::sol_data::FixedBytes<32>,
129            );
130            const SIGNATURE: &'static str = "LedgerDomainSeparatorUpdated(bytes32)";
131            const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
132                164u8, 63u8, 173u8, 131u8, 146u8, 15u8, 208u8, 148u8, 69u8, 133u8, 94u8,
133                133u8, 78u8, 115u8, 201u8, 197u8, 50u8, 225u8, 116u8, 2u8, 201u8, 206u8,
134                176u8, 153u8, 147u8, 162u8, 57u8, 40u8, 67u8, 165u8, 189u8, 185u8,
135            ]);
136            const ANONYMOUS: bool = false;
137            #[allow(unused_variables)]
138            #[inline]
139            fn new(
140                topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
141                data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
142            ) -> Self {
143                Self {
144                    ledgerDomainSeparator: topics.1,
145                }
146            }
147            #[inline]
148            fn check_signature(
149                topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
150            ) -> alloy_sol_types::Result<()> {
151                if topics.0 != Self::SIGNATURE_HASH {
152                    return Err(
153                        alloy_sol_types::Error::invalid_event_signature_hash(
154                            Self::SIGNATURE,
155                            topics.0,
156                            Self::SIGNATURE_HASH,
157                        ),
158                    );
159                }
160                Ok(())
161            }
162            #[inline]
163            fn tokenize_body(&self) -> Self::DataToken<'_> {
164                ()
165            }
166            #[inline]
167            fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
168                (Self::SIGNATURE_HASH.into(), self.ledgerDomainSeparator.clone())
169            }
170            #[inline]
171            fn encode_topics_raw(
172                &self,
173                out: &mut [alloy_sol_types::abi::token::WordToken],
174            ) -> alloy_sol_types::Result<()> {
175                if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
176                    return Err(alloy_sol_types::Error::Overrun);
177                }
178                out[0usize] = alloy_sol_types::abi::token::WordToken(
179                    Self::SIGNATURE_HASH,
180                );
181                out[1usize] = <alloy::sol_types::sol_data::FixedBytes<
182                    32,
183                > as alloy_sol_types::EventTopic>::encode_topic(
184                    &self.ledgerDomainSeparator,
185                );
186                Ok(())
187            }
188        }
189        #[automatically_derived]
190        impl alloy_sol_types::private::IntoLogData for LedgerDomainSeparatorUpdated {
191            fn to_log_data(&self) -> alloy_sol_types::private::LogData {
192                From::from(self)
193            }
194            fn into_log_data(self) -> alloy_sol_types::private::LogData {
195                From::from(&self)
196            }
197        }
198        #[automatically_derived]
199        impl From<&LedgerDomainSeparatorUpdated> for alloy_sol_types::private::LogData {
200            #[inline]
201            fn from(
202                this: &LedgerDomainSeparatorUpdated,
203            ) -> alloy_sol_types::private::LogData {
204                alloy_sol_types::SolEvent::encode_log_data(this)
205            }
206        }
207    };
208    #[derive(serde::Serialize, serde::Deserialize)]
209    #[derive(Default, Debug, PartialEq, Eq, Hash)]
210    /**Function with signature `LEDGER_VERSION()` and selector `0xddad1902`.
211```solidity
212function LEDGER_VERSION() external view returns (string memory);
213```*/
214    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
215    #[derive(Clone)]
216    pub struct LEDGER_VERSIONCall;
217    #[derive(serde::Serialize, serde::Deserialize)]
218    #[derive(Default, Debug, PartialEq, Eq, Hash)]
219    ///Container type for the return parameters of the [`LEDGER_VERSION()`](LEDGER_VERSIONCall) function.
220    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
221    #[derive(Clone)]
222    pub struct LEDGER_VERSIONReturn {
223        #[allow(missing_docs)]
224        pub _0: alloy::sol_types::private::String,
225    }
226    #[allow(
227        non_camel_case_types,
228        non_snake_case,
229        clippy::pub_underscore_fields,
230        clippy::style
231    )]
232    const _: () = {
233        use alloy::sol_types as alloy_sol_types;
234        {
235            #[doc(hidden)]
236            type UnderlyingSolTuple<'a> = ();
237            #[doc(hidden)]
238            type UnderlyingRustTuple<'a> = ();
239            #[cfg(test)]
240            #[allow(dead_code, unreachable_patterns)]
241            fn _type_assertion(
242                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
243            ) {
244                match _t {
245                    alloy_sol_types::private::AssertTypeEq::<
246                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
247                    >(_) => {}
248                }
249            }
250            #[automatically_derived]
251            #[doc(hidden)]
252            impl ::core::convert::From<LEDGER_VERSIONCall> for UnderlyingRustTuple<'_> {
253                fn from(value: LEDGER_VERSIONCall) -> Self {
254                    ()
255                }
256            }
257            #[automatically_derived]
258            #[doc(hidden)]
259            impl ::core::convert::From<UnderlyingRustTuple<'_>> for LEDGER_VERSIONCall {
260                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
261                    Self
262                }
263            }
264        }
265        {
266            #[doc(hidden)]
267            type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,);
268            #[doc(hidden)]
269            type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,);
270            #[cfg(test)]
271            #[allow(dead_code, unreachable_patterns)]
272            fn _type_assertion(
273                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
274            ) {
275                match _t {
276                    alloy_sol_types::private::AssertTypeEq::<
277                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
278                    >(_) => {}
279                }
280            }
281            #[automatically_derived]
282            #[doc(hidden)]
283            impl ::core::convert::From<LEDGER_VERSIONReturn>
284            for UnderlyingRustTuple<'_> {
285                fn from(value: LEDGER_VERSIONReturn) -> Self {
286                    (value._0,)
287                }
288            }
289            #[automatically_derived]
290            #[doc(hidden)]
291            impl ::core::convert::From<UnderlyingRustTuple<'_>>
292            for LEDGER_VERSIONReturn {
293                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
294                    Self { _0: tuple.0 }
295                }
296            }
297        }
298        #[automatically_derived]
299        impl alloy_sol_types::SolCall for LEDGER_VERSIONCall {
300            type Parameters<'a> = ();
301            type Token<'a> = <Self::Parameters<
302                'a,
303            > as alloy_sol_types::SolType>::Token<'a>;
304            type Return = alloy::sol_types::private::String;
305            type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,);
306            type ReturnToken<'a> = <Self::ReturnTuple<
307                'a,
308            > as alloy_sol_types::SolType>::Token<'a>;
309            const SIGNATURE: &'static str = "LEDGER_VERSION()";
310            const SELECTOR: [u8; 4] = [221u8, 173u8, 25u8, 2u8];
311            #[inline]
312            fn new<'a>(
313                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
314            ) -> Self {
315                tuple.into()
316            }
317            #[inline]
318            fn tokenize(&self) -> Self::Token<'_> {
319                ()
320            }
321            #[inline]
322            fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
323                (
324                    <alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(
325                        ret,
326                    ),
327                )
328            }
329            #[inline]
330            fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
331                <Self::ReturnTuple<
332                    '_,
333                > as alloy_sol_types::SolType>::abi_decode_sequence(data)
334                    .map(|r| {
335                        let r: LEDGER_VERSIONReturn = r.into();
336                        r._0
337                    })
338            }
339            #[inline]
340            fn abi_decode_returns_validate(
341                data: &[u8],
342            ) -> alloy_sol_types::Result<Self::Return> {
343                <Self::ReturnTuple<
344                    '_,
345                > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
346                    .map(|r| {
347                        let r: LEDGER_VERSIONReturn = r.into();
348                        r._0
349                    })
350            }
351        }
352    };
353    #[derive(serde::Serialize, serde::Deserialize)]
354    #[derive(Default, Debug, PartialEq, Eq, Hash)]
355    /**Function with signature `ledgerDomainSeparator()` and selector `0xc966c4fe`.
356```solidity
357function ledgerDomainSeparator() external view returns (bytes32);
358```*/
359    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
360    #[derive(Clone)]
361    pub struct ledgerDomainSeparatorCall;
362    #[derive(serde::Serialize, serde::Deserialize)]
363    #[derive(Default, Debug, PartialEq, Eq, Hash)]
364    ///Container type for the return parameters of the [`ledgerDomainSeparator()`](ledgerDomainSeparatorCall) function.
365    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
366    #[derive(Clone)]
367    pub struct ledgerDomainSeparatorReturn {
368        #[allow(missing_docs)]
369        pub _0: alloy::sol_types::private::FixedBytes<32>,
370    }
371    #[allow(
372        non_camel_case_types,
373        non_snake_case,
374        clippy::pub_underscore_fields,
375        clippy::style
376    )]
377    const _: () = {
378        use alloy::sol_types as alloy_sol_types;
379        {
380            #[doc(hidden)]
381            type UnderlyingSolTuple<'a> = ();
382            #[doc(hidden)]
383            type UnderlyingRustTuple<'a> = ();
384            #[cfg(test)]
385            #[allow(dead_code, unreachable_patterns)]
386            fn _type_assertion(
387                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
388            ) {
389                match _t {
390                    alloy_sol_types::private::AssertTypeEq::<
391                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
392                    >(_) => {}
393                }
394            }
395            #[automatically_derived]
396            #[doc(hidden)]
397            impl ::core::convert::From<ledgerDomainSeparatorCall>
398            for UnderlyingRustTuple<'_> {
399                fn from(value: ledgerDomainSeparatorCall) -> Self {
400                    ()
401                }
402            }
403            #[automatically_derived]
404            #[doc(hidden)]
405            impl ::core::convert::From<UnderlyingRustTuple<'_>>
406            for ledgerDomainSeparatorCall {
407                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
408                    Self
409                }
410            }
411        }
412        {
413            #[doc(hidden)]
414            type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
415            #[doc(hidden)]
416            type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,);
417            #[cfg(test)]
418            #[allow(dead_code, unreachable_patterns)]
419            fn _type_assertion(
420                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
421            ) {
422                match _t {
423                    alloy_sol_types::private::AssertTypeEq::<
424                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
425                    >(_) => {}
426                }
427            }
428            #[automatically_derived]
429            #[doc(hidden)]
430            impl ::core::convert::From<ledgerDomainSeparatorReturn>
431            for UnderlyingRustTuple<'_> {
432                fn from(value: ledgerDomainSeparatorReturn) -> Self {
433                    (value._0,)
434                }
435            }
436            #[automatically_derived]
437            #[doc(hidden)]
438            impl ::core::convert::From<UnderlyingRustTuple<'_>>
439            for ledgerDomainSeparatorReturn {
440                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
441                    Self { _0: tuple.0 }
442                }
443            }
444        }
445        #[automatically_derived]
446        impl alloy_sol_types::SolCall for ledgerDomainSeparatorCall {
447            type Parameters<'a> = ();
448            type Token<'a> = <Self::Parameters<
449                'a,
450            > as alloy_sol_types::SolType>::Token<'a>;
451            type Return = alloy::sol_types::private::FixedBytes<32>;
452            type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
453            type ReturnToken<'a> = <Self::ReturnTuple<
454                'a,
455            > as alloy_sol_types::SolType>::Token<'a>;
456            const SIGNATURE: &'static str = "ledgerDomainSeparator()";
457            const SELECTOR: [u8; 4] = [201u8, 102u8, 196u8, 254u8];
458            #[inline]
459            fn new<'a>(
460                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
461            ) -> Self {
462                tuple.into()
463            }
464            #[inline]
465            fn tokenize(&self) -> Self::Token<'_> {
466                ()
467            }
468            #[inline]
469            fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
470                (
471                    <alloy::sol_types::sol_data::FixedBytes<
472                        32,
473                    > as alloy_sol_types::SolType>::tokenize(ret),
474                )
475            }
476            #[inline]
477            fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
478                <Self::ReturnTuple<
479                    '_,
480                > as alloy_sol_types::SolType>::abi_decode_sequence(data)
481                    .map(|r| {
482                        let r: ledgerDomainSeparatorReturn = r.into();
483                        r._0
484                    })
485            }
486            #[inline]
487            fn abi_decode_returns_validate(
488                data: &[u8],
489            ) -> alloy_sol_types::Result<Self::Return> {
490                <Self::ReturnTuple<
491                    '_,
492                > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
493                    .map(|r| {
494                        let r: ledgerDomainSeparatorReturn = r.into();
495                        r._0
496                    })
497            }
498        }
499    };
500    #[derive(serde::Serialize, serde::Deserialize)]
501    #[derive(Default, Debug, PartialEq, Eq, Hash)]
502    /**Function with signature `updateLedgerDomainSeparator()` and selector `0xdc96fd50`.
503```solidity
504function updateLedgerDomainSeparator() external;
505```*/
506    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
507    #[derive(Clone)]
508    pub struct updateLedgerDomainSeparatorCall;
509    ///Container type for the return parameters of the [`updateLedgerDomainSeparator()`](updateLedgerDomainSeparatorCall) function.
510    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
511    #[derive(Clone)]
512    pub struct updateLedgerDomainSeparatorReturn {}
513    #[allow(
514        non_camel_case_types,
515        non_snake_case,
516        clippy::pub_underscore_fields,
517        clippy::style
518    )]
519    const _: () = {
520        use alloy::sol_types as alloy_sol_types;
521        {
522            #[doc(hidden)]
523            type UnderlyingSolTuple<'a> = ();
524            #[doc(hidden)]
525            type UnderlyingRustTuple<'a> = ();
526            #[cfg(test)]
527            #[allow(dead_code, unreachable_patterns)]
528            fn _type_assertion(
529                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
530            ) {
531                match _t {
532                    alloy_sol_types::private::AssertTypeEq::<
533                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
534                    >(_) => {}
535                }
536            }
537            #[automatically_derived]
538            #[doc(hidden)]
539            impl ::core::convert::From<updateLedgerDomainSeparatorCall>
540            for UnderlyingRustTuple<'_> {
541                fn from(value: updateLedgerDomainSeparatorCall) -> Self {
542                    ()
543                }
544            }
545            #[automatically_derived]
546            #[doc(hidden)]
547            impl ::core::convert::From<UnderlyingRustTuple<'_>>
548            for updateLedgerDomainSeparatorCall {
549                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
550                    Self
551                }
552            }
553        }
554        {
555            #[doc(hidden)]
556            type UnderlyingSolTuple<'a> = ();
557            #[doc(hidden)]
558            type UnderlyingRustTuple<'a> = ();
559            #[cfg(test)]
560            #[allow(dead_code, unreachable_patterns)]
561            fn _type_assertion(
562                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
563            ) {
564                match _t {
565                    alloy_sol_types::private::AssertTypeEq::<
566                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
567                    >(_) => {}
568                }
569            }
570            #[automatically_derived]
571            #[doc(hidden)]
572            impl ::core::convert::From<updateLedgerDomainSeparatorReturn>
573            for UnderlyingRustTuple<'_> {
574                fn from(value: updateLedgerDomainSeparatorReturn) -> Self {
575                    ()
576                }
577            }
578            #[automatically_derived]
579            #[doc(hidden)]
580            impl ::core::convert::From<UnderlyingRustTuple<'_>>
581            for updateLedgerDomainSeparatorReturn {
582                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
583                    Self {}
584                }
585            }
586        }
587        impl updateLedgerDomainSeparatorReturn {
588            fn _tokenize(
589                &self,
590            ) -> <updateLedgerDomainSeparatorCall as alloy_sol_types::SolCall>::ReturnToken<
591                '_,
592            > {
593                ()
594            }
595        }
596        #[automatically_derived]
597        impl alloy_sol_types::SolCall for updateLedgerDomainSeparatorCall {
598            type Parameters<'a> = ();
599            type Token<'a> = <Self::Parameters<
600                'a,
601            > as alloy_sol_types::SolType>::Token<'a>;
602            type Return = updateLedgerDomainSeparatorReturn;
603            type ReturnTuple<'a> = ();
604            type ReturnToken<'a> = <Self::ReturnTuple<
605                'a,
606            > as alloy_sol_types::SolType>::Token<'a>;
607            const SIGNATURE: &'static str = "updateLedgerDomainSeparator()";
608            const SELECTOR: [u8; 4] = [220u8, 150u8, 253u8, 80u8];
609            #[inline]
610            fn new<'a>(
611                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
612            ) -> Self {
613                tuple.into()
614            }
615            #[inline]
616            fn tokenize(&self) -> Self::Token<'_> {
617                ()
618            }
619            #[inline]
620            fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
621                updateLedgerDomainSeparatorReturn::_tokenize(ret)
622            }
623            #[inline]
624            fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
625                <Self::ReturnTuple<
626                    '_,
627                > as alloy_sol_types::SolType>::abi_decode_sequence(data)
628                    .map(Into::into)
629            }
630            #[inline]
631            fn abi_decode_returns_validate(
632                data: &[u8],
633            ) -> alloy_sol_types::Result<Self::Return> {
634                <Self::ReturnTuple<
635                    '_,
636                > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
637                    .map(Into::into)
638            }
639        }
640    };
641    ///Container for all the [`HoprLedger`](self) function calls.
642    #[derive(serde::Serialize, serde::Deserialize)]
643    #[derive()]
644    pub enum HoprLedgerCalls {
645        #[allow(missing_docs)]
646        LEDGER_VERSION(LEDGER_VERSIONCall),
647        #[allow(missing_docs)]
648        ledgerDomainSeparator(ledgerDomainSeparatorCall),
649        #[allow(missing_docs)]
650        updateLedgerDomainSeparator(updateLedgerDomainSeparatorCall),
651    }
652    #[automatically_derived]
653    impl HoprLedgerCalls {
654        /// All the selectors of this enum.
655        ///
656        /// Note that the selectors might not be in the same order as the variants.
657        /// No guarantees are made about the order of the selectors.
658        ///
659        /// Prefer using `SolInterface` methods instead.
660        pub const SELECTORS: &'static [[u8; 4usize]] = &[
661            [201u8, 102u8, 196u8, 254u8],
662            [220u8, 150u8, 253u8, 80u8],
663            [221u8, 173u8, 25u8, 2u8],
664        ];
665    }
666    #[automatically_derived]
667    impl alloy_sol_types::SolInterface for HoprLedgerCalls {
668        const NAME: &'static str = "HoprLedgerCalls";
669        const MIN_DATA_LENGTH: usize = 0usize;
670        const COUNT: usize = 3usize;
671        #[inline]
672        fn selector(&self) -> [u8; 4] {
673            match self {
674                Self::LEDGER_VERSION(_) => {
675                    <LEDGER_VERSIONCall as alloy_sol_types::SolCall>::SELECTOR
676                }
677                Self::ledgerDomainSeparator(_) => {
678                    <ledgerDomainSeparatorCall as alloy_sol_types::SolCall>::SELECTOR
679                }
680                Self::updateLedgerDomainSeparator(_) => {
681                    <updateLedgerDomainSeparatorCall as alloy_sol_types::SolCall>::SELECTOR
682                }
683            }
684        }
685        #[inline]
686        fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
687            Self::SELECTORS.get(i).copied()
688        }
689        #[inline]
690        fn valid_selector(selector: [u8; 4]) -> bool {
691            Self::SELECTORS.binary_search(&selector).is_ok()
692        }
693        #[inline]
694        #[allow(non_snake_case)]
695        fn abi_decode_raw(
696            selector: [u8; 4],
697            data: &[u8],
698        ) -> alloy_sol_types::Result<Self> {
699            static DECODE_SHIMS: &[fn(
700                &[u8],
701            ) -> alloy_sol_types::Result<HoprLedgerCalls>] = &[
702                {
703                    fn ledgerDomainSeparator(
704                        data: &[u8],
705                    ) -> alloy_sol_types::Result<HoprLedgerCalls> {
706                        <ledgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_decode_raw(
707                                data,
708                            )
709                            .map(HoprLedgerCalls::ledgerDomainSeparator)
710                    }
711                    ledgerDomainSeparator
712                },
713                {
714                    fn updateLedgerDomainSeparator(
715                        data: &[u8],
716                    ) -> alloy_sol_types::Result<HoprLedgerCalls> {
717                        <updateLedgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_decode_raw(
718                                data,
719                            )
720                            .map(HoprLedgerCalls::updateLedgerDomainSeparator)
721                    }
722                    updateLedgerDomainSeparator
723                },
724                {
725                    fn LEDGER_VERSION(
726                        data: &[u8],
727                    ) -> alloy_sol_types::Result<HoprLedgerCalls> {
728                        <LEDGER_VERSIONCall as alloy_sol_types::SolCall>::abi_decode_raw(
729                                data,
730                            )
731                            .map(HoprLedgerCalls::LEDGER_VERSION)
732                    }
733                    LEDGER_VERSION
734                },
735            ];
736            let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
737                return Err(
738                    alloy_sol_types::Error::unknown_selector(
739                        <Self as alloy_sol_types::SolInterface>::NAME,
740                        selector,
741                    ),
742                );
743            };
744            DECODE_SHIMS[idx](data)
745        }
746        #[inline]
747        #[allow(non_snake_case)]
748        fn abi_decode_raw_validate(
749            selector: [u8; 4],
750            data: &[u8],
751        ) -> alloy_sol_types::Result<Self> {
752            static DECODE_VALIDATE_SHIMS: &[fn(
753                &[u8],
754            ) -> alloy_sol_types::Result<HoprLedgerCalls>] = &[
755                {
756                    fn ledgerDomainSeparator(
757                        data: &[u8],
758                    ) -> alloy_sol_types::Result<HoprLedgerCalls> {
759                        <ledgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
760                                data,
761                            )
762                            .map(HoprLedgerCalls::ledgerDomainSeparator)
763                    }
764                    ledgerDomainSeparator
765                },
766                {
767                    fn updateLedgerDomainSeparator(
768                        data: &[u8],
769                    ) -> alloy_sol_types::Result<HoprLedgerCalls> {
770                        <updateLedgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
771                                data,
772                            )
773                            .map(HoprLedgerCalls::updateLedgerDomainSeparator)
774                    }
775                    updateLedgerDomainSeparator
776                },
777                {
778                    fn LEDGER_VERSION(
779                        data: &[u8],
780                    ) -> alloy_sol_types::Result<HoprLedgerCalls> {
781                        <LEDGER_VERSIONCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
782                                data,
783                            )
784                            .map(HoprLedgerCalls::LEDGER_VERSION)
785                    }
786                    LEDGER_VERSION
787                },
788            ];
789            let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
790                return Err(
791                    alloy_sol_types::Error::unknown_selector(
792                        <Self as alloy_sol_types::SolInterface>::NAME,
793                        selector,
794                    ),
795                );
796            };
797            DECODE_VALIDATE_SHIMS[idx](data)
798        }
799        #[inline]
800        fn abi_encoded_size(&self) -> usize {
801            match self {
802                Self::LEDGER_VERSION(inner) => {
803                    <LEDGER_VERSIONCall as alloy_sol_types::SolCall>::abi_encoded_size(
804                        inner,
805                    )
806                }
807                Self::ledgerDomainSeparator(inner) => {
808                    <ledgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_encoded_size(
809                        inner,
810                    )
811                }
812                Self::updateLedgerDomainSeparator(inner) => {
813                    <updateLedgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_encoded_size(
814                        inner,
815                    )
816                }
817            }
818        }
819        #[inline]
820        fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
821            match self {
822                Self::LEDGER_VERSION(inner) => {
823                    <LEDGER_VERSIONCall as alloy_sol_types::SolCall>::abi_encode_raw(
824                        inner,
825                        out,
826                    )
827                }
828                Self::ledgerDomainSeparator(inner) => {
829                    <ledgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_encode_raw(
830                        inner,
831                        out,
832                    )
833                }
834                Self::updateLedgerDomainSeparator(inner) => {
835                    <updateLedgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_encode_raw(
836                        inner,
837                        out,
838                    )
839                }
840            }
841        }
842    }
843    ///Container for all the [`HoprLedger`](self) events.
844    #[derive(serde::Serialize, serde::Deserialize)]
845    #[derive(Debug, PartialEq, Eq, Hash)]
846    pub enum HoprLedgerEvents {
847        #[allow(missing_docs)]
848        LedgerDomainSeparatorUpdated(LedgerDomainSeparatorUpdated),
849    }
850    #[automatically_derived]
851    impl HoprLedgerEvents {
852        /// All the selectors of this enum.
853        ///
854        /// Note that the selectors might not be in the same order as the variants.
855        /// No guarantees are made about the order of the selectors.
856        ///
857        /// Prefer using `SolInterface` methods instead.
858        pub const SELECTORS: &'static [[u8; 32usize]] = &[
859            [
860                164u8, 63u8, 173u8, 131u8, 146u8, 15u8, 208u8, 148u8, 69u8, 133u8, 94u8,
861                133u8, 78u8, 115u8, 201u8, 197u8, 50u8, 225u8, 116u8, 2u8, 201u8, 206u8,
862                176u8, 153u8, 147u8, 162u8, 57u8, 40u8, 67u8, 165u8, 189u8, 185u8,
863            ],
864        ];
865    }
866    #[automatically_derived]
867    impl alloy_sol_types::SolEventInterface for HoprLedgerEvents {
868        const NAME: &'static str = "HoprLedgerEvents";
869        const COUNT: usize = 1usize;
870        fn decode_raw_log(
871            topics: &[alloy_sol_types::Word],
872            data: &[u8],
873        ) -> alloy_sol_types::Result<Self> {
874            match topics.first().copied() {
875                Some(
876                    <LedgerDomainSeparatorUpdated as alloy_sol_types::SolEvent>::SIGNATURE_HASH,
877                ) => {
878                    <LedgerDomainSeparatorUpdated as alloy_sol_types::SolEvent>::decode_raw_log(
879                            topics,
880                            data,
881                        )
882                        .map(Self::LedgerDomainSeparatorUpdated)
883                }
884                _ => {
885                    alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
886                        name: <Self as alloy_sol_types::SolEventInterface>::NAME,
887                        log: alloy_sol_types::private::Box::new(
888                            alloy_sol_types::private::LogData::new_unchecked(
889                                topics.to_vec(),
890                                data.to_vec().into(),
891                            ),
892                        ),
893                    })
894                }
895            }
896        }
897    }
898    #[automatically_derived]
899    impl alloy_sol_types::private::IntoLogData for HoprLedgerEvents {
900        fn to_log_data(&self) -> alloy_sol_types::private::LogData {
901            match self {
902                Self::LedgerDomainSeparatorUpdated(inner) => {
903                    alloy_sol_types::private::IntoLogData::to_log_data(inner)
904                }
905            }
906        }
907        fn into_log_data(self) -> alloy_sol_types::private::LogData {
908            match self {
909                Self::LedgerDomainSeparatorUpdated(inner) => {
910                    alloy_sol_types::private::IntoLogData::into_log_data(inner)
911                }
912            }
913        }
914    }
915    use alloy::contract as alloy_contract;
916    /**Creates a new wrapper around an on-chain [`HoprLedger`](self) contract instance.
917
918See the [wrapper's documentation](`HoprLedgerInstance`) for more details.*/
919    #[inline]
920    pub const fn new<
921        P: alloy_contract::private::Provider<N>,
922        N: alloy_contract::private::Network,
923    >(
924        address: alloy_sol_types::private::Address,
925        provider: P,
926    ) -> HoprLedgerInstance<P, N> {
927        HoprLedgerInstance::<P, N>::new(address, provider)
928    }
929    /**Deploys this contract using the given `provider` and constructor arguments, if any.
930
931Returns a new instance of the contract, if the deployment was successful.
932
933For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
934    #[inline]
935    pub fn deploy<
936        P: alloy_contract::private::Provider<N>,
937        N: alloy_contract::private::Network,
938    >(
939        provider: P,
940    ) -> impl ::core::future::Future<
941        Output = alloy_contract::Result<HoprLedgerInstance<P, N>>,
942    > {
943        HoprLedgerInstance::<P, N>::deploy(provider)
944    }
945    /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
946and constructor arguments, if any.
947
948This is a simple wrapper around creating a `RawCallBuilder` with the data set to
949the bytecode concatenated with the constructor's ABI-encoded arguments.*/
950    #[inline]
951    pub fn deploy_builder<
952        P: alloy_contract::private::Provider<N>,
953        N: alloy_contract::private::Network,
954    >(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
955        HoprLedgerInstance::<P, N>::deploy_builder(provider)
956    }
957    /**A [`HoprLedger`](self) instance.
958
959Contains type-safe methods for interacting with an on-chain instance of the
960[`HoprLedger`](self) contract located at a given `address`, using a given
961provider `P`.
962
963If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
964documentation on how to provide it), the `deploy` and `deploy_builder` methods can
965be used to deploy a new instance of the contract.
966
967See the [module-level documentation](self) for all the available methods.*/
968    #[derive(Clone)]
969    pub struct HoprLedgerInstance<P, N = alloy_contract::private::Ethereum> {
970        address: alloy_sol_types::private::Address,
971        provider: P,
972        _network: ::core::marker::PhantomData<N>,
973    }
974    #[automatically_derived]
975    impl<P, N> ::core::fmt::Debug for HoprLedgerInstance<P, N> {
976        #[inline]
977        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
978            f.debug_tuple("HoprLedgerInstance").field(&self.address).finish()
979        }
980    }
981    /// Instantiation and getters/setters.
982    #[automatically_derived]
983    impl<
984        P: alloy_contract::private::Provider<N>,
985        N: alloy_contract::private::Network,
986    > HoprLedgerInstance<P, N> {
987        /**Creates a new wrapper around an on-chain [`HoprLedger`](self) contract instance.
988
989See the [wrapper's documentation](`HoprLedgerInstance`) for more details.*/
990        #[inline]
991        pub const fn new(
992            address: alloy_sol_types::private::Address,
993            provider: P,
994        ) -> Self {
995            Self {
996                address,
997                provider,
998                _network: ::core::marker::PhantomData,
999            }
1000        }
1001        /**Deploys this contract using the given `provider` and constructor arguments, if any.
1002
1003Returns a new instance of the contract, if the deployment was successful.
1004
1005For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
1006        #[inline]
1007        pub async fn deploy(
1008            provider: P,
1009        ) -> alloy_contract::Result<HoprLedgerInstance<P, N>> {
1010            let call_builder = Self::deploy_builder(provider);
1011            let contract_address = call_builder.deploy().await?;
1012            Ok(Self::new(contract_address, call_builder.provider))
1013        }
1014        /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
1015and constructor arguments, if any.
1016
1017This is a simple wrapper around creating a `RawCallBuilder` with the data set to
1018the bytecode concatenated with the constructor's ABI-encoded arguments.*/
1019        #[inline]
1020        pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
1021            alloy_contract::RawCallBuilder::new_raw_deploy(
1022                provider,
1023                ::core::clone::Clone::clone(&BYTECODE),
1024            )
1025        }
1026        /// Returns a reference to the address.
1027        #[inline]
1028        pub const fn address(&self) -> &alloy_sol_types::private::Address {
1029            &self.address
1030        }
1031        /// Sets the address.
1032        #[inline]
1033        pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
1034            self.address = address;
1035        }
1036        /// Sets the address and returns `self`.
1037        pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
1038            self.set_address(address);
1039            self
1040        }
1041        /// Returns a reference to the provider.
1042        #[inline]
1043        pub const fn provider(&self) -> &P {
1044            &self.provider
1045        }
1046    }
1047    impl<P: ::core::clone::Clone, N> HoprLedgerInstance<&P, N> {
1048        /// Clones the provider and returns a new instance with the cloned provider.
1049        #[inline]
1050        pub fn with_cloned_provider(self) -> HoprLedgerInstance<P, N> {
1051            HoprLedgerInstance {
1052                address: self.address,
1053                provider: ::core::clone::Clone::clone(&self.provider),
1054                _network: ::core::marker::PhantomData,
1055            }
1056        }
1057    }
1058    /// Function calls.
1059    #[automatically_derived]
1060    impl<
1061        P: alloy_contract::private::Provider<N>,
1062        N: alloy_contract::private::Network,
1063    > HoprLedgerInstance<P, N> {
1064        /// Creates a new call builder using this contract instance's provider and address.
1065        ///
1066        /// Note that the call can be any function call, not just those defined in this
1067        /// contract. Prefer using the other methods for building type-safe contract calls.
1068        pub fn call_builder<C: alloy_sol_types::SolCall>(
1069            &self,
1070            call: &C,
1071        ) -> alloy_contract::SolCallBuilder<&P, C, N> {
1072            alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
1073        }
1074        ///Creates a new call builder for the [`LEDGER_VERSION`] function.
1075        pub fn LEDGER_VERSION(
1076            &self,
1077        ) -> alloy_contract::SolCallBuilder<&P, LEDGER_VERSIONCall, N> {
1078            self.call_builder(&LEDGER_VERSIONCall)
1079        }
1080        ///Creates a new call builder for the [`ledgerDomainSeparator`] function.
1081        pub fn ledgerDomainSeparator(
1082            &self,
1083        ) -> alloy_contract::SolCallBuilder<&P, ledgerDomainSeparatorCall, N> {
1084            self.call_builder(&ledgerDomainSeparatorCall)
1085        }
1086        ///Creates a new call builder for the [`updateLedgerDomainSeparator`] function.
1087        pub fn updateLedgerDomainSeparator(
1088            &self,
1089        ) -> alloy_contract::SolCallBuilder<&P, updateLedgerDomainSeparatorCall, N> {
1090            self.call_builder(&updateLedgerDomainSeparatorCall)
1091        }
1092    }
1093    /// Event filters.
1094    #[automatically_derived]
1095    impl<
1096        P: alloy_contract::private::Provider<N>,
1097        N: alloy_contract::private::Network,
1098    > HoprLedgerInstance<P, N> {
1099        /// Creates a new event filter using this contract instance's provider and address.
1100        ///
1101        /// Note that the type can be any event, not just those defined in this contract.
1102        /// Prefer using the other methods for building type-safe event filters.
1103        pub fn event_filter<E: alloy_sol_types::SolEvent>(
1104            &self,
1105        ) -> alloy_contract::Event<&P, E, N> {
1106            alloy_contract::Event::new_sol(&self.provider, &self.address)
1107        }
1108        ///Creates a new event filter for the [`LedgerDomainSeparatorUpdated`] event.
1109        pub fn LedgerDomainSeparatorUpdated_filter(
1110            &self,
1111        ) -> alloy_contract::Event<&P, LedgerDomainSeparatorUpdated, N> {
1112            self.event_filter::<LedgerDomainSeparatorUpdated>()
1113        }
1114    }
1115}