1#[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 pub const SELECTORS: &'static [[u8; 4usize]] = &[
418 [133u8, 121u8, 253u8, 12u8],
419 [177u8, 44u8, 158u8, 222u8],
420 ];
421 pub const VARIANT_NAMES: &'static [&'static str] = &[
423 ::core::stringify!(InputBoxAndEspresso),
424 ::core::stringify!(InputBox),
425 ];
426 pub const SIGNATURES: &'static [&'static str] = &[
428 <InputBoxAndEspressoCall as alloy_sol_types::SolCall>::SIGNATURE,
429 <InputBoxCall as alloy_sol_types::SolCall>::SIGNATURE,
430 ];
431 #[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 #[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 #[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 #[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 #[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 #[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 impl<
655 P: alloy_contract::private::Provider<N>,
656 N: alloy_contract::private::Network,
657 > DataAvailabilityInstance<P, N> {
658 #[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 #[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 #[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 #[inline]
699 pub const fn address(&self) -> &alloy_sol_types::private::Address {
700 &self.address
701 }
702 #[inline]
704 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
705 self.address = address;
706 }
707 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
709 self.set_address(address);
710 self
711 }
712 #[inline]
714 pub const fn provider(&self) -> &P {
715 &self.provider
716 }
717 }
718 impl<P: ::core::clone::Clone, N> DataAvailabilityInstance<&P, N> {
719 #[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 impl<
731 P: alloy_contract::private::Provider<N>,
732 N: alloy_contract::private::Network,
733 > DataAvailabilityInstance<P, N> {
734 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 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 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 impl<
769 P: alloy_contract::private::Provider<N>,
770 N: alloy_contract::private::Network,
771 > DataAvailabilityInstance<P, N> {
772 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}