1#[allow(
43 non_camel_case_types,
44 non_snake_case,
45 clippy::pub_underscore_fields,
46 clippy::style,
47 clippy::empty_structs_with_brackets
48)]
49pub mod IDeadline {
50 use super::*;
51 use alloy::sol_types as alloy_sol_types;
52 #[rustfmt::skip]
58 #[allow(clippy::all)]
59 pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
60 b"",
61 );
62 #[rustfmt::skip]
68 #[allow(clippy::all)]
69 pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
70 b"",
71 );
72 #[derive(Default, Debug, PartialEq, Eq, Hash)]
73 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
78 #[derive(Clone)]
79 pub struct requireTimeGteCall {
80 #[allow(missing_docs)]
81 pub timestamp: alloy::sol_types::private::primitives::aliases::U256,
82 }
83 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
85 #[derive(Clone)]
86 pub struct requireTimeGteReturn {}
87 #[allow(
88 non_camel_case_types,
89 non_snake_case,
90 clippy::pub_underscore_fields,
91 clippy::style
92 )]
93 const _: () = {
94 use alloy::sol_types as alloy_sol_types;
95 {
96 #[doc(hidden)]
97 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
98 #[doc(hidden)]
99 type UnderlyingRustTuple<'a> = (
100 alloy::sol_types::private::primitives::aliases::U256,
101 );
102 #[cfg(test)]
103 #[allow(dead_code, unreachable_patterns)]
104 fn _type_assertion(
105 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
106 ) {
107 match _t {
108 alloy_sol_types::private::AssertTypeEq::<
109 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
110 >(_) => {}
111 }
112 }
113 #[automatically_derived]
114 #[doc(hidden)]
115 impl ::core::convert::From<requireTimeGteCall> for UnderlyingRustTuple<'_> {
116 fn from(value: requireTimeGteCall) -> Self {
117 (value.timestamp,)
118 }
119 }
120 #[automatically_derived]
121 #[doc(hidden)]
122 impl ::core::convert::From<UnderlyingRustTuple<'_>> for requireTimeGteCall {
123 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
124 Self { timestamp: tuple.0 }
125 }
126 }
127 }
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<requireTimeGteReturn>
147 for UnderlyingRustTuple<'_> {
148 fn from(value: requireTimeGteReturn) -> Self {
149 ()
150 }
151 }
152 #[automatically_derived]
153 #[doc(hidden)]
154 impl ::core::convert::From<UnderlyingRustTuple<'_>>
155 for requireTimeGteReturn {
156 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
157 Self {}
158 }
159 }
160 }
161 #[automatically_derived]
162 impl alloy_sol_types::SolCall for requireTimeGteCall {
163 type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,);
164 type Token<'a> = <Self::Parameters<
165 'a,
166 > as alloy_sol_types::SolType>::Token<'a>;
167 type Return = requireTimeGteReturn;
168 type ReturnTuple<'a> = ();
169 type ReturnToken<'a> = <Self::ReturnTuple<
170 'a,
171 > as alloy_sol_types::SolType>::Token<'a>;
172 const SIGNATURE: &'static str = "requireTimeGte(uint256)";
173 const SELECTOR: [u8; 4] = [75u8, 180u8, 166u8, 39u8];
174 #[inline]
175 fn new<'a>(
176 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
177 ) -> Self {
178 tuple.into()
179 }
180 #[inline]
181 fn tokenize(&self) -> Self::Token<'_> {
182 (
183 <alloy::sol_types::sol_data::Uint<
184 256,
185 > as alloy_sol_types::SolType>::tokenize(&self.timestamp),
186 )
187 }
188 #[inline]
189 fn abi_decode_returns(
190 data: &[u8],
191 validate: bool,
192 ) -> alloy_sol_types::Result<Self::Return> {
193 <Self::ReturnTuple<
194 '_,
195 > as alloy_sol_types::SolType>::abi_decode_sequence(data, validate)
196 .map(Into::into)
197 }
198 }
199 };
200 #[derive(Default, Debug, PartialEq, Eq, Hash)]
201 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
206 #[derive(Clone)]
207 pub struct requireTimeLteCall {
208 #[allow(missing_docs)]
209 pub timestamp: alloy::sol_types::private::primitives::aliases::U256,
210 }
211 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
213 #[derive(Clone)]
214 pub struct requireTimeLteReturn {}
215 #[allow(
216 non_camel_case_types,
217 non_snake_case,
218 clippy::pub_underscore_fields,
219 clippy::style
220 )]
221 const _: () = {
222 use alloy::sol_types as alloy_sol_types;
223 {
224 #[doc(hidden)]
225 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
226 #[doc(hidden)]
227 type UnderlyingRustTuple<'a> = (
228 alloy::sol_types::private::primitives::aliases::U256,
229 );
230 #[cfg(test)]
231 #[allow(dead_code, unreachable_patterns)]
232 fn _type_assertion(
233 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
234 ) {
235 match _t {
236 alloy_sol_types::private::AssertTypeEq::<
237 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
238 >(_) => {}
239 }
240 }
241 #[automatically_derived]
242 #[doc(hidden)]
243 impl ::core::convert::From<requireTimeLteCall> for UnderlyingRustTuple<'_> {
244 fn from(value: requireTimeLteCall) -> Self {
245 (value.timestamp,)
246 }
247 }
248 #[automatically_derived]
249 #[doc(hidden)]
250 impl ::core::convert::From<UnderlyingRustTuple<'_>> for requireTimeLteCall {
251 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
252 Self { timestamp: tuple.0 }
253 }
254 }
255 }
256 {
257 #[doc(hidden)]
258 type UnderlyingSolTuple<'a> = ();
259 #[doc(hidden)]
260 type UnderlyingRustTuple<'a> = ();
261 #[cfg(test)]
262 #[allow(dead_code, unreachable_patterns)]
263 fn _type_assertion(
264 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
265 ) {
266 match _t {
267 alloy_sol_types::private::AssertTypeEq::<
268 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
269 >(_) => {}
270 }
271 }
272 #[automatically_derived]
273 #[doc(hidden)]
274 impl ::core::convert::From<requireTimeLteReturn>
275 for UnderlyingRustTuple<'_> {
276 fn from(value: requireTimeLteReturn) -> Self {
277 ()
278 }
279 }
280 #[automatically_derived]
281 #[doc(hidden)]
282 impl ::core::convert::From<UnderlyingRustTuple<'_>>
283 for requireTimeLteReturn {
284 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
285 Self {}
286 }
287 }
288 }
289 #[automatically_derived]
290 impl alloy_sol_types::SolCall for requireTimeLteCall {
291 type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,);
292 type Token<'a> = <Self::Parameters<
293 'a,
294 > as alloy_sol_types::SolType>::Token<'a>;
295 type Return = requireTimeLteReturn;
296 type ReturnTuple<'a> = ();
297 type ReturnToken<'a> = <Self::ReturnTuple<
298 'a,
299 > as alloy_sol_types::SolType>::Token<'a>;
300 const SIGNATURE: &'static str = "requireTimeLte(uint256)";
301 const SELECTOR: [u8; 4] = [133u8, 243u8, 195u8, 106u8];
302 #[inline]
303 fn new<'a>(
304 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
305 ) -> Self {
306 tuple.into()
307 }
308 #[inline]
309 fn tokenize(&self) -> Self::Token<'_> {
310 (
311 <alloy::sol_types::sol_data::Uint<
312 256,
313 > as alloy_sol_types::SolType>::tokenize(&self.timestamp),
314 )
315 }
316 #[inline]
317 fn abi_decode_returns(
318 data: &[u8],
319 validate: bool,
320 ) -> alloy_sol_types::Result<Self::Return> {
321 <Self::ReturnTuple<
322 '_,
323 > as alloy_sol_types::SolType>::abi_decode_sequence(data, validate)
324 .map(Into::into)
325 }
326 }
327 };
328 #[derive()]
330 pub enum IDeadlineCalls {
331 #[allow(missing_docs)]
332 requireTimeGte(requireTimeGteCall),
333 #[allow(missing_docs)]
334 requireTimeLte(requireTimeLteCall),
335 }
336 #[automatically_derived]
337 impl IDeadlineCalls {
338 pub const SELECTORS: &'static [[u8; 4usize]] = &[
345 [75u8, 180u8, 166u8, 39u8],
346 [133u8, 243u8, 195u8, 106u8],
347 ];
348 }
349 #[automatically_derived]
350 impl alloy_sol_types::SolInterface for IDeadlineCalls {
351 const NAME: &'static str = "IDeadlineCalls";
352 const MIN_DATA_LENGTH: usize = 32usize;
353 const COUNT: usize = 2usize;
354 #[inline]
355 fn selector(&self) -> [u8; 4] {
356 match self {
357 Self::requireTimeGte(_) => {
358 <requireTimeGteCall as alloy_sol_types::SolCall>::SELECTOR
359 }
360 Self::requireTimeLte(_) => {
361 <requireTimeLteCall as alloy_sol_types::SolCall>::SELECTOR
362 }
363 }
364 }
365 #[inline]
366 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
367 Self::SELECTORS.get(i).copied()
368 }
369 #[inline]
370 fn valid_selector(selector: [u8; 4]) -> bool {
371 Self::SELECTORS.binary_search(&selector).is_ok()
372 }
373 #[inline]
374 #[allow(non_snake_case)]
375 fn abi_decode_raw(
376 selector: [u8; 4],
377 data: &[u8],
378 validate: bool,
379 ) -> alloy_sol_types::Result<Self> {
380 static DECODE_SHIMS: &[fn(
381 &[u8],
382 bool,
383 ) -> alloy_sol_types::Result<IDeadlineCalls>] = &[
384 {
385 fn requireTimeGte(
386 data: &[u8],
387 validate: bool,
388 ) -> alloy_sol_types::Result<IDeadlineCalls> {
389 <requireTimeGteCall as alloy_sol_types::SolCall>::abi_decode_raw(
390 data,
391 validate,
392 )
393 .map(IDeadlineCalls::requireTimeGte)
394 }
395 requireTimeGte
396 },
397 {
398 fn requireTimeLte(
399 data: &[u8],
400 validate: bool,
401 ) -> alloy_sol_types::Result<IDeadlineCalls> {
402 <requireTimeLteCall as alloy_sol_types::SolCall>::abi_decode_raw(
403 data,
404 validate,
405 )
406 .map(IDeadlineCalls::requireTimeLte)
407 }
408 requireTimeLte
409 },
410 ];
411 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
412 return Err(
413 alloy_sol_types::Error::unknown_selector(
414 <Self as alloy_sol_types::SolInterface>::NAME,
415 selector,
416 ),
417 );
418 };
419 DECODE_SHIMS[idx](data, validate)
420 }
421 #[inline]
422 fn abi_encoded_size(&self) -> usize {
423 match self {
424 Self::requireTimeGte(inner) => {
425 <requireTimeGteCall as alloy_sol_types::SolCall>::abi_encoded_size(
426 inner,
427 )
428 }
429 Self::requireTimeLte(inner) => {
430 <requireTimeLteCall as alloy_sol_types::SolCall>::abi_encoded_size(
431 inner,
432 )
433 }
434 }
435 }
436 #[inline]
437 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
438 match self {
439 Self::requireTimeGte(inner) => {
440 <requireTimeGteCall as alloy_sol_types::SolCall>::abi_encode_raw(
441 inner,
442 out,
443 )
444 }
445 Self::requireTimeLte(inner) => {
446 <requireTimeLteCall as alloy_sol_types::SolCall>::abi_encode_raw(
447 inner,
448 out,
449 )
450 }
451 }
452 }
453 }
454 use alloy::contract as alloy_contract;
455 #[inline]
459 pub const fn new<
460 T: alloy_contract::private::Transport + ::core::clone::Clone,
461 P: alloy_contract::private::Provider<T, N>,
462 N: alloy_contract::private::Network,
463 >(
464 address: alloy_sol_types::private::Address,
465 provider: P,
466 ) -> IDeadlineInstance<T, P, N> {
467 IDeadlineInstance::<T, P, N>::new(address, provider)
468 }
469 #[inline]
475 pub fn deploy<
476 T: alloy_contract::private::Transport + ::core::clone::Clone,
477 P: alloy_contract::private::Provider<T, N>,
478 N: alloy_contract::private::Network,
479 >(
480 provider: P,
481 ) -> impl ::core::future::Future<
482 Output = alloy_contract::Result<IDeadlineInstance<T, P, N>>,
483 > {
484 IDeadlineInstance::<T, P, N>::deploy(provider)
485 }
486 #[inline]
492 pub fn deploy_builder<
493 T: alloy_contract::private::Transport + ::core::clone::Clone,
494 P: alloy_contract::private::Provider<T, N>,
495 N: alloy_contract::private::Network,
496 >(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
497 IDeadlineInstance::<T, P, N>::deploy_builder(provider)
498 }
499 #[derive(Clone)]
511 pub struct IDeadlineInstance<T, P, N = alloy_contract::private::Ethereum> {
512 address: alloy_sol_types::private::Address,
513 provider: P,
514 _network_transport: ::core::marker::PhantomData<(N, T)>,
515 }
516 #[automatically_derived]
517 impl<T, P, N> ::core::fmt::Debug for IDeadlineInstance<T, P, N> {
518 #[inline]
519 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
520 f.debug_tuple("IDeadlineInstance").field(&self.address).finish()
521 }
522 }
523 #[automatically_derived]
525 impl<
526 T: alloy_contract::private::Transport + ::core::clone::Clone,
527 P: alloy_contract::private::Provider<T, N>,
528 N: alloy_contract::private::Network,
529 > IDeadlineInstance<T, P, N> {
530 #[inline]
534 pub const fn new(
535 address: alloy_sol_types::private::Address,
536 provider: P,
537 ) -> Self {
538 Self {
539 address,
540 provider,
541 _network_transport: ::core::marker::PhantomData,
542 }
543 }
544 #[inline]
550 pub async fn deploy(
551 provider: P,
552 ) -> alloy_contract::Result<IDeadlineInstance<T, P, N>> {
553 let call_builder = Self::deploy_builder(provider);
554 let contract_address = call_builder.deploy().await?;
555 Ok(Self::new(contract_address, call_builder.provider))
556 }
557 #[inline]
563 pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
564 alloy_contract::RawCallBuilder::new_raw_deploy(
565 provider,
566 ::core::clone::Clone::clone(&BYTECODE),
567 )
568 }
569 #[inline]
571 pub const fn address(&self) -> &alloy_sol_types::private::Address {
572 &self.address
573 }
574 #[inline]
576 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
577 self.address = address;
578 }
579 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
581 self.set_address(address);
582 self
583 }
584 #[inline]
586 pub const fn provider(&self) -> &P {
587 &self.provider
588 }
589 }
590 impl<T, P: ::core::clone::Clone, N> IDeadlineInstance<T, &P, N> {
591 #[inline]
593 pub fn with_cloned_provider(self) -> IDeadlineInstance<T, P, N> {
594 IDeadlineInstance {
595 address: self.address,
596 provider: ::core::clone::Clone::clone(&self.provider),
597 _network_transport: ::core::marker::PhantomData,
598 }
599 }
600 }
601 #[automatically_derived]
603 impl<
604 T: alloy_contract::private::Transport + ::core::clone::Clone,
605 P: alloy_contract::private::Provider<T, N>,
606 N: alloy_contract::private::Network,
607 > IDeadlineInstance<T, P, N> {
608 pub fn call_builder<C: alloy_sol_types::SolCall>(
613 &self,
614 call: &C,
615 ) -> alloy_contract::SolCallBuilder<T, &P, C, N> {
616 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
617 }
618 pub fn requireTimeGte(
620 &self,
621 timestamp: alloy::sol_types::private::primitives::aliases::U256,
622 ) -> alloy_contract::SolCallBuilder<T, &P, requireTimeGteCall, N> {
623 self.call_builder(&requireTimeGteCall { timestamp })
624 }
625 pub fn requireTimeLte(
627 &self,
628 timestamp: alloy::sol_types::private::primitives::aliases::U256,
629 ) -> alloy_contract::SolCallBuilder<T, &P, requireTimeLteCall, N> {
630 self.call_builder(&requireTimeLteCall { timestamp })
631 }
632 }
633 #[automatically_derived]
635 impl<
636 T: alloy_contract::private::Transport + ::core::clone::Clone,
637 P: alloy_contract::private::Provider<T, N>,
638 N: alloy_contract::private::Network,
639 > IDeadlineInstance<T, P, N> {
640 pub fn event_filter<E: alloy_sol_types::SolEvent>(
645 &self,
646 ) -> alloy_contract::Event<T, &P, E, N> {
647 alloy_contract::Event::new_sol(&self.provider, &self.address)
648 }
649 }
650}