Skip to main content

cartesi_rollups_contracts/
data_availability.rs

1/**
2
3Generated by the following Solidity interface...
4```solidity
5interface DataAvailability {
6    function InputBox(address inputBox) external;
7    function InputBoxAndEspresso(address inputBox, uint256 fromBlock, uint32 namespaceId) external;
8}
9```
10
11...which was generated by the following JSON ABI:
12```json
13[
14  {
15    "type": "function",
16    "name": "InputBox",
17    "inputs": [
18      {
19        "name": "inputBox",
20        "type": "address",
21        "internalType": "contract IInputBox"
22      }
23    ],
24    "outputs": [],
25    "stateMutability": "nonpayable"
26  },
27  {
28    "type": "function",
29    "name": "InputBoxAndEspresso",
30    "inputs": [
31      {
32        "name": "inputBox",
33        "type": "address",
34        "internalType": "contract IInputBox"
35      },
36      {
37        "name": "fromBlock",
38        "type": "uint256",
39        "internalType": "uint256"
40      },
41      {
42        "name": "namespaceId",
43        "type": "uint32",
44        "internalType": "uint32"
45      }
46    ],
47    "outputs": [],
48    "stateMutability": "nonpayable"
49  }
50]
51```*/
52#[allow(
53    non_camel_case_types,
54    non_snake_case,
55    clippy::pub_underscore_fields,
56    clippy::style,
57    clippy::empty_structs_with_brackets
58)]
59pub mod DataAvailability {
60    use super::*;
61    use alloy::sol_types as alloy_sol_types;
62    /// The creation / init bytecode of the contract.
63    ///
64    /// ```text
65    ///0x
66    /// ```
67    #[rustfmt::skip]
68    #[allow(clippy::all)]
69    pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
70        b"",
71    );
72    /// The runtime bytecode of the contract, as deployed on the network.
73    ///
74    /// ```text
75    ///0x
76    /// ```
77    #[rustfmt::skip]
78    #[allow(clippy::all)]
79    pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
80        b"",
81    );
82    #[derive(serde::Serialize, serde::Deserialize)]
83    #[derive(Default, Debug, PartialEq, Eq, Hash)]
84    /**Function with signature `InputBox(address)` and selector `0xb12c9ede`.
85```solidity
86function InputBox(address inputBox) external;
87```*/
88    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
89    #[derive(Clone)]
90    pub struct InputBoxCall {
91        #[allow(missing_docs)]
92        pub inputBox: alloy::sol_types::private::Address,
93    }
94    ///Container type for the return parameters of the [`InputBox(address)`](InputBoxCall) function.
95    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
96    #[derive(Clone)]
97    pub struct InputBoxReturn {}
98    #[allow(
99        non_camel_case_types,
100        non_snake_case,
101        clippy::pub_underscore_fields,
102        clippy::style
103    )]
104    const _: () = {
105        use alloy::sol_types as alloy_sol_types;
106        {
107            #[doc(hidden)]
108            #[allow(dead_code)]
109            type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
110            #[doc(hidden)]
111            type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
112            #[cfg(test)]
113            #[allow(dead_code, unreachable_patterns)]
114            fn _type_assertion(
115                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
116            ) {
117                match _t {
118                    alloy_sol_types::private::AssertTypeEq::<
119                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
120                    >(_) => {}
121                }
122            }
123            #[automatically_derived]
124            #[doc(hidden)]
125            impl ::core::convert::From<InputBoxCall> for UnderlyingRustTuple<'_> {
126                fn from(value: InputBoxCall) -> Self {
127                    (value.inputBox,)
128                }
129            }
130            #[automatically_derived]
131            #[doc(hidden)]
132            impl ::core::convert::From<UnderlyingRustTuple<'_>> for InputBoxCall {
133                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
134                    Self { inputBox: tuple.0 }
135                }
136            }
137        }
138        {
139            #[doc(hidden)]
140            #[allow(dead_code)]
141            type UnderlyingSolTuple<'a> = ();
142            #[doc(hidden)]
143            type UnderlyingRustTuple<'a> = ();
144            #[cfg(test)]
145            #[allow(dead_code, unreachable_patterns)]
146            fn _type_assertion(
147                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
148            ) {
149                match _t {
150                    alloy_sol_types::private::AssertTypeEq::<
151                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
152                    >(_) => {}
153                }
154            }
155            #[automatically_derived]
156            #[doc(hidden)]
157            impl ::core::convert::From<InputBoxReturn> for UnderlyingRustTuple<'_> {
158                fn from(value: InputBoxReturn) -> Self {
159                    ()
160                }
161            }
162            #[automatically_derived]
163            #[doc(hidden)]
164            impl ::core::convert::From<UnderlyingRustTuple<'_>> for InputBoxReturn {
165                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
166                    Self {}
167                }
168            }
169        }
170        impl InputBoxReturn {
171            fn _tokenize(
172                &self,
173            ) -> <InputBoxCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
174                ()
175            }
176        }
177        #[automatically_derived]
178        impl alloy_sol_types::SolCall for InputBoxCall {
179            type Parameters<'a> = (alloy::sol_types::sol_data::Address,);
180            type Token<'a> = <Self::Parameters<
181                'a,
182            > as alloy_sol_types::SolType>::Token<'a>;
183            type Return = InputBoxReturn;
184            type ReturnTuple<'a> = ();
185            type ReturnToken<'a> = <Self::ReturnTuple<
186                'a,
187            > as alloy_sol_types::SolType>::Token<'a>;
188            const SIGNATURE: &'static str = "InputBox(address)";
189            const SELECTOR: [u8; 4] = [177u8, 44u8, 158u8, 222u8];
190            #[inline]
191            fn new<'a>(
192                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
193            ) -> Self {
194                tuple.into()
195            }
196            #[inline]
197            fn tokenize(&self) -> Self::Token<'_> {
198                (
199                    <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
200                        &self.inputBox,
201                    ),
202                )
203            }
204            #[inline]
205            fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
206                InputBoxReturn::_tokenize(ret)
207            }
208            #[inline]
209            fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
210                <Self::ReturnTuple<
211                    '_,
212                > as alloy_sol_types::SolType>::abi_decode_sequence(data)
213                    .map(Into::into)
214            }
215            #[inline]
216            fn abi_decode_returns_validate(
217                data: &[u8],
218            ) -> alloy_sol_types::Result<Self::Return> {
219                <Self::ReturnTuple<
220                    '_,
221                > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
222                    .map(Into::into)
223            }
224        }
225    };
226    #[derive(serde::Serialize, serde::Deserialize)]
227    #[derive(Default, Debug, PartialEq, Eq, Hash)]
228    /**Function with signature `InputBoxAndEspresso(address,uint256,uint32)` and selector `0x8579fd0c`.
229```solidity
230function InputBoxAndEspresso(address inputBox, uint256 fromBlock, uint32 namespaceId) external;
231```*/
232    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
233    #[derive(Clone)]
234    pub struct InputBoxAndEspressoCall {
235        #[allow(missing_docs)]
236        pub inputBox: alloy::sol_types::private::Address,
237        #[allow(missing_docs)]
238        pub fromBlock: alloy::sol_types::private::primitives::aliases::U256,
239        #[allow(missing_docs)]
240        pub namespaceId: u32,
241    }
242    ///Container type for the return parameters of the [`InputBoxAndEspresso(address,uint256,uint32)`](InputBoxAndEspressoCall) function.
243    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
244    #[derive(Clone)]
245    pub struct InputBoxAndEspressoReturn {}
246    #[allow(
247        non_camel_case_types,
248        non_snake_case,
249        clippy::pub_underscore_fields,
250        clippy::style
251    )]
252    const _: () = {
253        use alloy::sol_types as alloy_sol_types;
254        {
255            #[doc(hidden)]
256            #[allow(dead_code)]
257            type UnderlyingSolTuple<'a> = (
258                alloy::sol_types::sol_data::Address,
259                alloy::sol_types::sol_data::Uint<256>,
260                alloy::sol_types::sol_data::Uint<32>,
261            );
262            #[doc(hidden)]
263            type UnderlyingRustTuple<'a> = (
264                alloy::sol_types::private::Address,
265                alloy::sol_types::private::primitives::aliases::U256,
266                u32,
267            );
268            #[cfg(test)]
269            #[allow(dead_code, unreachable_patterns)]
270            fn _type_assertion(
271                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
272            ) {
273                match _t {
274                    alloy_sol_types::private::AssertTypeEq::<
275                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
276                    >(_) => {}
277                }
278            }
279            #[automatically_derived]
280            #[doc(hidden)]
281            impl ::core::convert::From<InputBoxAndEspressoCall>
282            for UnderlyingRustTuple<'_> {
283                fn from(value: InputBoxAndEspressoCall) -> Self {
284                    (value.inputBox, value.fromBlock, value.namespaceId)
285                }
286            }
287            #[automatically_derived]
288            #[doc(hidden)]
289            impl ::core::convert::From<UnderlyingRustTuple<'_>>
290            for InputBoxAndEspressoCall {
291                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
292                    Self {
293                        inputBox: tuple.0,
294                        fromBlock: tuple.1,
295                        namespaceId: tuple.2,
296                    }
297                }
298            }
299        }
300        {
301            #[doc(hidden)]
302            #[allow(dead_code)]
303            type UnderlyingSolTuple<'a> = ();
304            #[doc(hidden)]
305            type UnderlyingRustTuple<'a> = ();
306            #[cfg(test)]
307            #[allow(dead_code, unreachable_patterns)]
308            fn _type_assertion(
309                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
310            ) {
311                match _t {
312                    alloy_sol_types::private::AssertTypeEq::<
313                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
314                    >(_) => {}
315                }
316            }
317            #[automatically_derived]
318            #[doc(hidden)]
319            impl ::core::convert::From<InputBoxAndEspressoReturn>
320            for UnderlyingRustTuple<'_> {
321                fn from(value: InputBoxAndEspressoReturn) -> Self {
322                    ()
323                }
324            }
325            #[automatically_derived]
326            #[doc(hidden)]
327            impl ::core::convert::From<UnderlyingRustTuple<'_>>
328            for InputBoxAndEspressoReturn {
329                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
330                    Self {}
331                }
332            }
333        }
334        impl InputBoxAndEspressoReturn {
335            fn _tokenize(
336                &self,
337            ) -> <InputBoxAndEspressoCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
338                ()
339            }
340        }
341        #[automatically_derived]
342        impl alloy_sol_types::SolCall for InputBoxAndEspressoCall {
343            type Parameters<'a> = (
344                alloy::sol_types::sol_data::Address,
345                alloy::sol_types::sol_data::Uint<256>,
346                alloy::sol_types::sol_data::Uint<32>,
347            );
348            type Token<'a> = <Self::Parameters<
349                'a,
350            > as alloy_sol_types::SolType>::Token<'a>;
351            type Return = InputBoxAndEspressoReturn;
352            type ReturnTuple<'a> = ();
353            type ReturnToken<'a> = <Self::ReturnTuple<
354                'a,
355            > as alloy_sol_types::SolType>::Token<'a>;
356            const SIGNATURE: &'static str = "InputBoxAndEspresso(address,uint256,uint32)";
357            const SELECTOR: [u8; 4] = [133u8, 121u8, 253u8, 12u8];
358            #[inline]
359            fn new<'a>(
360                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
361            ) -> Self {
362                tuple.into()
363            }
364            #[inline]
365            fn tokenize(&self) -> Self::Token<'_> {
366                (
367                    <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
368                        &self.inputBox,
369                    ),
370                    <alloy::sol_types::sol_data::Uint<
371                        256,
372                    > as alloy_sol_types::SolType>::tokenize(&self.fromBlock),
373                    <alloy::sol_types::sol_data::Uint<
374                        32,
375                    > as alloy_sol_types::SolType>::tokenize(&self.namespaceId),
376                )
377            }
378            #[inline]
379            fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
380                InputBoxAndEspressoReturn::_tokenize(ret)
381            }
382            #[inline]
383            fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
384                <Self::ReturnTuple<
385                    '_,
386                > as alloy_sol_types::SolType>::abi_decode_sequence(data)
387                    .map(Into::into)
388            }
389            #[inline]
390            fn abi_decode_returns_validate(
391                data: &[u8],
392            ) -> alloy_sol_types::Result<Self::Return> {
393                <Self::ReturnTuple<
394                    '_,
395                > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
396                    .map(Into::into)
397            }
398        }
399    };
400    ///Container for all the [`DataAvailability`](self) function calls.
401    #[derive(Clone)]
402    #[derive(serde::Serialize, serde::Deserialize)]
403    #[derive()]
404    pub enum DataAvailabilityCalls {
405        #[allow(missing_docs)]
406        InputBox(InputBoxCall),
407        #[allow(missing_docs)]
408        InputBoxAndEspresso(InputBoxAndEspressoCall),
409    }
410    impl DataAvailabilityCalls {
411        /// All the selectors of this enum.
412        ///
413        /// Note that the selectors might not be in the same order as the variants.
414        /// No guarantees are made about the order of the selectors.
415        ///
416        /// Prefer using `SolInterface` methods instead.
417        pub const SELECTORS: &'static [[u8; 4usize]] = &[
418            [133u8, 121u8, 253u8, 12u8],
419            [177u8, 44u8, 158u8, 222u8],
420        ];
421        /// The names of the variants in the same order as `SELECTORS`.
422        pub const VARIANT_NAMES: &'static [&'static str] = &[
423            ::core::stringify!(InputBoxAndEspresso),
424            ::core::stringify!(InputBox),
425        ];
426        /// The signatures in the same order as `SELECTORS`.
427        pub const SIGNATURES: &'static [&'static str] = &[
428            <InputBoxAndEspressoCall as alloy_sol_types::SolCall>::SIGNATURE,
429            <InputBoxCall as alloy_sol_types::SolCall>::SIGNATURE,
430        ];
431        /// Returns the signature for the given selector, if known.
432        #[inline]
433        pub fn signature_by_selector(
434            selector: [u8; 4usize],
435        ) -> ::core::option::Option<&'static str> {
436            match Self::SELECTORS.binary_search(&selector) {
437                ::core::result::Result::Ok(idx) => {
438                    ::core::option::Option::Some(Self::SIGNATURES[idx])
439                }
440                ::core::result::Result::Err(_) => ::core::option::Option::None,
441            }
442        }
443        /// Returns the enum variant name for the given selector, if known.
444        #[inline]
445        pub fn name_by_selector(
446            selector: [u8; 4usize],
447        ) -> ::core::option::Option<&'static str> {
448            let sig = Self::signature_by_selector(selector)?;
449            sig.split_once('(').map(|(name, _)| name)
450        }
451    }
452    #[automatically_derived]
453    impl alloy_sol_types::SolInterface for DataAvailabilityCalls {
454        const NAME: &'static str = "DataAvailabilityCalls";
455        const MIN_DATA_LENGTH: usize = 32usize;
456        const COUNT: usize = 2usize;
457        #[inline]
458        fn selector(&self) -> [u8; 4] {
459            match self {
460                Self::InputBox(_) => <InputBoxCall as alloy_sol_types::SolCall>::SELECTOR,
461                Self::InputBoxAndEspresso(_) => {
462                    <InputBoxAndEspressoCall as alloy_sol_types::SolCall>::SELECTOR
463                }
464            }
465        }
466        #[inline]
467        fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
468            Self::SELECTORS.get(i).copied()
469        }
470        #[inline]
471        fn valid_selector(selector: [u8; 4]) -> bool {
472            Self::SELECTORS.binary_search(&selector).is_ok()
473        }
474        #[inline]
475        #[allow(non_snake_case)]
476        fn abi_decode_raw(
477            selector: [u8; 4],
478            data: &[u8],
479        ) -> alloy_sol_types::Result<Self> {
480            static DECODE_SHIMS: &[fn(
481                &[u8],
482            ) -> alloy_sol_types::Result<DataAvailabilityCalls>] = &[
483                {
484                    fn InputBoxAndEspresso(
485                        data: &[u8],
486                    ) -> alloy_sol_types::Result<DataAvailabilityCalls> {
487                        <InputBoxAndEspressoCall as alloy_sol_types::SolCall>::abi_decode_raw(
488                                data,
489                            )
490                            .map(DataAvailabilityCalls::InputBoxAndEspresso)
491                    }
492                    InputBoxAndEspresso
493                },
494                {
495                    fn InputBox(
496                        data: &[u8],
497                    ) -> alloy_sol_types::Result<DataAvailabilityCalls> {
498                        <InputBoxCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
499                            .map(DataAvailabilityCalls::InputBox)
500                    }
501                    InputBox
502                },
503            ];
504            let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
505                return Err(
506                    alloy_sol_types::Error::unknown_selector(
507                        <Self as alloy_sol_types::SolInterface>::NAME,
508                        selector,
509                    ),
510                );
511            };
512            DECODE_SHIMS[idx](data)
513        }
514        #[inline]
515        #[allow(non_snake_case)]
516        fn abi_decode_raw_validate(
517            selector: [u8; 4],
518            data: &[u8],
519        ) -> alloy_sol_types::Result<Self> {
520            static DECODE_VALIDATE_SHIMS: &[fn(
521                &[u8],
522            ) -> alloy_sol_types::Result<DataAvailabilityCalls>] = &[
523                {
524                    fn InputBoxAndEspresso(
525                        data: &[u8],
526                    ) -> alloy_sol_types::Result<DataAvailabilityCalls> {
527                        <InputBoxAndEspressoCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
528                                data,
529                            )
530                            .map(DataAvailabilityCalls::InputBoxAndEspresso)
531                    }
532                    InputBoxAndEspresso
533                },
534                {
535                    fn InputBox(
536                        data: &[u8],
537                    ) -> alloy_sol_types::Result<DataAvailabilityCalls> {
538                        <InputBoxCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
539                                data,
540                            )
541                            .map(DataAvailabilityCalls::InputBox)
542                    }
543                    InputBox
544                },
545            ];
546            let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
547                return Err(
548                    alloy_sol_types::Error::unknown_selector(
549                        <Self as alloy_sol_types::SolInterface>::NAME,
550                        selector,
551                    ),
552                );
553            };
554            DECODE_VALIDATE_SHIMS[idx](data)
555        }
556        #[inline]
557        fn abi_encoded_size(&self) -> usize {
558            match self {
559                Self::InputBox(inner) => {
560                    <InputBoxCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
561                }
562                Self::InputBoxAndEspresso(inner) => {
563                    <InputBoxAndEspressoCall as alloy_sol_types::SolCall>::abi_encoded_size(
564                        inner,
565                    )
566                }
567            }
568        }
569        #[inline]
570        fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
571            match self {
572                Self::InputBox(inner) => {
573                    <InputBoxCall as alloy_sol_types::SolCall>::abi_encode_raw(
574                        inner,
575                        out,
576                    )
577                }
578                Self::InputBoxAndEspresso(inner) => {
579                    <InputBoxAndEspressoCall as alloy_sol_types::SolCall>::abi_encode_raw(
580                        inner,
581                        out,
582                    )
583                }
584            }
585        }
586    }
587    use alloy::contract as alloy_contract;
588    /**Creates a new wrapper around an on-chain [`DataAvailability`](self) contract instance.
589
590See the [wrapper's documentation](`DataAvailabilityInstance`) for more details.*/
591    #[inline]
592    pub const fn new<
593        P: alloy_contract::private::Provider<N>,
594        N: alloy_contract::private::Network,
595    >(
596        address: alloy_sol_types::private::Address,
597        __provider: P,
598    ) -> DataAvailabilityInstance<P, N> {
599        DataAvailabilityInstance::<P, N>::new(address, __provider)
600    }
601    /**Deploys this contract using the given `provider` and constructor arguments, if any.
602
603Returns a new instance of the contract, if the deployment was successful.
604
605For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
606    #[inline]
607    pub fn deploy<
608        P: alloy_contract::private::Provider<N>,
609        N: alloy_contract::private::Network,
610    >(
611        __provider: P,
612    ) -> impl ::core::future::Future<
613        Output = alloy_contract::Result<DataAvailabilityInstance<P, N>>,
614    > {
615        DataAvailabilityInstance::<P, N>::deploy(__provider)
616    }
617    /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
618and constructor arguments, if any.
619
620This is a simple wrapper around creating a `RawCallBuilder` with the data set to
621the bytecode concatenated with the constructor's ABI-encoded arguments.*/
622    #[inline]
623    pub fn deploy_builder<
624        P: alloy_contract::private::Provider<N>,
625        N: alloy_contract::private::Network,
626    >(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
627        DataAvailabilityInstance::<P, N>::deploy_builder(__provider)
628    }
629    /**A [`DataAvailability`](self) instance.
630
631Contains type-safe methods for interacting with an on-chain instance of the
632[`DataAvailability`](self) contract located at a given `address`, using a given
633provider `P`.
634
635If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
636documentation on how to provide it), the `deploy` and `deploy_builder` methods can
637be used to deploy a new instance of the contract.
638
639See the [module-level documentation](self) for all the available methods.*/
640    #[derive(Clone)]
641    pub struct DataAvailabilityInstance<P, N = alloy_contract::private::Ethereum> {
642        address: alloy_sol_types::private::Address,
643        provider: P,
644        _network: ::core::marker::PhantomData<N>,
645    }
646    #[automatically_derived]
647    impl<P, N> ::core::fmt::Debug for DataAvailabilityInstance<P, N> {
648        #[inline]
649        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
650            f.debug_tuple("DataAvailabilityInstance").field(&self.address).finish()
651        }
652    }
653    /// Instantiation and getters/setters.
654    impl<
655        P: alloy_contract::private::Provider<N>,
656        N: alloy_contract::private::Network,
657    > DataAvailabilityInstance<P, N> {
658        /**Creates a new wrapper around an on-chain [`DataAvailability`](self) contract instance.
659
660See the [wrapper's documentation](`DataAvailabilityInstance`) for more details.*/
661        #[inline]
662        pub const fn new(
663            address: alloy_sol_types::private::Address,
664            __provider: P,
665        ) -> Self {
666            Self {
667                address,
668                provider: __provider,
669                _network: ::core::marker::PhantomData,
670            }
671        }
672        /**Deploys this contract using the given `provider` and constructor arguments, if any.
673
674Returns a new instance of the contract, if the deployment was successful.
675
676For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
677        #[inline]
678        pub async fn deploy(
679            __provider: P,
680        ) -> alloy_contract::Result<DataAvailabilityInstance<P, N>> {
681            let call_builder = Self::deploy_builder(__provider);
682            let contract_address = call_builder.deploy().await?;
683            Ok(Self::new(contract_address, call_builder.provider))
684        }
685        /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
686and constructor arguments, if any.
687
688This is a simple wrapper around creating a `RawCallBuilder` with the data set to
689the bytecode concatenated with the constructor's ABI-encoded arguments.*/
690        #[inline]
691        pub fn deploy_builder(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
692            alloy_contract::RawCallBuilder::new_raw_deploy(
693                __provider,
694                ::core::clone::Clone::clone(&BYTECODE),
695            )
696        }
697        /// Returns a reference to the address.
698        #[inline]
699        pub const fn address(&self) -> &alloy_sol_types::private::Address {
700            &self.address
701        }
702        /// Sets the address.
703        #[inline]
704        pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
705            self.address = address;
706        }
707        /// Sets the address and returns `self`.
708        pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
709            self.set_address(address);
710            self
711        }
712        /// Returns a reference to the provider.
713        #[inline]
714        pub const fn provider(&self) -> &P {
715            &self.provider
716        }
717    }
718    impl<P: ::core::clone::Clone, N> DataAvailabilityInstance<&P, N> {
719        /// Clones the provider and returns a new instance with the cloned provider.
720        #[inline]
721        pub fn with_cloned_provider(self) -> DataAvailabilityInstance<P, N> {
722            DataAvailabilityInstance {
723                address: self.address,
724                provider: ::core::clone::Clone::clone(&self.provider),
725                _network: ::core::marker::PhantomData,
726            }
727        }
728    }
729    /// Function calls.
730    impl<
731        P: alloy_contract::private::Provider<N>,
732        N: alloy_contract::private::Network,
733    > DataAvailabilityInstance<P, N> {
734        /// Creates a new call builder using this contract instance's provider and address.
735        ///
736        /// Note that the call can be any function call, not just those defined in this
737        /// contract. Prefer using the other methods for building type-safe contract calls.
738        pub fn call_builder<C: alloy_sol_types::SolCall>(
739            &self,
740            call: &C,
741        ) -> alloy_contract::SolCallBuilder<&P, C, N> {
742            alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
743        }
744        ///Creates a new call builder for the [`InputBox`] function.
745        pub fn InputBox(
746            &self,
747            inputBox: alloy::sol_types::private::Address,
748        ) -> alloy_contract::SolCallBuilder<&P, InputBoxCall, N> {
749            self.call_builder(&InputBoxCall { inputBox })
750        }
751        ///Creates a new call builder for the [`InputBoxAndEspresso`] function.
752        pub fn InputBoxAndEspresso(
753            &self,
754            inputBox: alloy::sol_types::private::Address,
755            fromBlock: alloy::sol_types::private::primitives::aliases::U256,
756            namespaceId: u32,
757        ) -> alloy_contract::SolCallBuilder<&P, InputBoxAndEspressoCall, N> {
758            self.call_builder(
759                &InputBoxAndEspressoCall {
760                    inputBox,
761                    fromBlock,
762                    namespaceId,
763                },
764            )
765        }
766    }
767    /// Event filters.
768    impl<
769        P: alloy_contract::private::Provider<N>,
770        N: alloy_contract::private::Network,
771    > DataAvailabilityInstance<P, N> {
772        /// Creates a new event filter using this contract instance's provider and address.
773        ///
774        /// Note that the type can be any event, not just those defined in this contract.
775        /// Prefer using the other methods for building type-safe event filters.
776        pub fn event_filter<E: alloy_sol_types::SolEvent>(
777            &self,
778        ) -> alloy_contract::Event<&P, E, N> {
779            alloy_contract::Event::new_sol(&self.provider, &self.address)
780        }
781    }
782}