fluence_marketplace_api_draft/
epochcontroller.rs

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