1#[allow(
114 non_camel_case_types,
115 non_snake_case,
116 clippy::pub_underscore_fields,
117 clippy::style,
118 clippy::empty_structs_with_brackets
119)]
120pub mod IRewardClaim {
121 use super::*;
122 use alloy::sol_types as alloy_sol_types;
123 #[rustfmt::skip]
129 #[allow(clippy::all)]
130 pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
131 b"",
132 );
133 #[rustfmt::skip]
139 #[allow(clippy::all)]
140 pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
141 b"",
142 );
143 #[derive(serde::Serialize, serde::Deserialize)]
144 #[derive(Default, Debug, PartialEq, Eq, Hash)]
145 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
150 #[derive(Clone)]
151 pub struct AlreadyClaimed;
152 #[allow(
153 non_camel_case_types,
154 non_snake_case,
155 clippy::pub_underscore_fields,
156 clippy::style
157 )]
158 const _: () = {
159 use alloy::sol_types as alloy_sol_types;
160 #[doc(hidden)]
161 #[allow(dead_code)]
162 type UnderlyingSolTuple<'a> = ();
163 #[doc(hidden)]
164 type UnderlyingRustTuple<'a> = ();
165 #[cfg(test)]
166 #[allow(dead_code, unreachable_patterns)]
167 fn _type_assertion(
168 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
169 ) {
170 match _t {
171 alloy_sol_types::private::AssertTypeEq::<
172 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
173 >(_) => {}
174 }
175 }
176 #[automatically_derived]
177 #[doc(hidden)]
178 impl ::core::convert::From<AlreadyClaimed> for UnderlyingRustTuple<'_> {
179 fn from(value: AlreadyClaimed) -> Self {
180 ()
181 }
182 }
183 #[automatically_derived]
184 #[doc(hidden)]
185 impl ::core::convert::From<UnderlyingRustTuple<'_>> for AlreadyClaimed {
186 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
187 Self
188 }
189 }
190 #[automatically_derived]
191 impl alloy_sol_types::SolError for AlreadyClaimed {
192 type Parameters<'a> = UnderlyingSolTuple<'a>;
193 type Token<'a> = <Self::Parameters<
194 'a,
195 > as alloy_sol_types::SolType>::Token<'a>;
196 const SIGNATURE: &'static str = "AlreadyClaimed()";
197 const SELECTOR: [u8; 4] = [100u8, 108u8, 245u8, 88u8];
198 #[inline]
199 fn new<'a>(
200 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
201 ) -> Self {
202 tuple.into()
203 }
204 #[inline]
205 fn tokenize(&self) -> Self::Token<'_> {
206 ()
207 }
208 #[inline]
209 fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
210 <Self::Parameters<
211 '_,
212 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
213 .map(Self::new)
214 }
215 }
216 };
217 #[derive(serde::Serialize, serde::Deserialize)]
218 #[derive(Default, Debug, PartialEq, Eq, Hash)]
219 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
224 #[derive(Clone)]
225 pub struct DailyLimitExceeded;
226 #[allow(
227 non_camel_case_types,
228 non_snake_case,
229 clippy::pub_underscore_fields,
230 clippy::style
231 )]
232 const _: () = {
233 use alloy::sol_types as alloy_sol_types;
234 #[doc(hidden)]
235 #[allow(dead_code)]
236 type UnderlyingSolTuple<'a> = ();
237 #[doc(hidden)]
238 type UnderlyingRustTuple<'a> = ();
239 #[cfg(test)]
240 #[allow(dead_code, unreachable_patterns)]
241 fn _type_assertion(
242 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
243 ) {
244 match _t {
245 alloy_sol_types::private::AssertTypeEq::<
246 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
247 >(_) => {}
248 }
249 }
250 #[automatically_derived]
251 #[doc(hidden)]
252 impl ::core::convert::From<DailyLimitExceeded> for UnderlyingRustTuple<'_> {
253 fn from(value: DailyLimitExceeded) -> Self {
254 ()
255 }
256 }
257 #[automatically_derived]
258 #[doc(hidden)]
259 impl ::core::convert::From<UnderlyingRustTuple<'_>> for DailyLimitExceeded {
260 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
261 Self
262 }
263 }
264 #[automatically_derived]
265 impl alloy_sol_types::SolError for DailyLimitExceeded {
266 type Parameters<'a> = UnderlyingSolTuple<'a>;
267 type Token<'a> = <Self::Parameters<
268 'a,
269 > as alloy_sol_types::SolType>::Token<'a>;
270 const SIGNATURE: &'static str = "DailyLimitExceeded()";
271 const SELECTOR: [u8; 4] = [25u8, 75u8, 211u8, 20u8];
272 #[inline]
273 fn new<'a>(
274 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
275 ) -> Self {
276 tuple.into()
277 }
278 #[inline]
279 fn tokenize(&self) -> Self::Token<'_> {
280 ()
281 }
282 #[inline]
283 fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
284 <Self::Parameters<
285 '_,
286 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
287 .map(Self::new)
288 }
289 }
290 };
291 #[derive(serde::Serialize, serde::Deserialize)]
292 #[derive(Default, Debug, PartialEq, Eq, Hash)]
293 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
298 #[derive(Clone)]
299 pub struct InvalidAuthRoot;
300 #[allow(
301 non_camel_case_types,
302 non_snake_case,
303 clippy::pub_underscore_fields,
304 clippy::style
305 )]
306 const _: () = {
307 use alloy::sol_types as alloy_sol_types;
308 #[doc(hidden)]
309 #[allow(dead_code)]
310 type UnderlyingSolTuple<'a> = ();
311 #[doc(hidden)]
312 type UnderlyingRustTuple<'a> = ();
313 #[cfg(test)]
314 #[allow(dead_code, unreachable_patterns)]
315 fn _type_assertion(
316 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
317 ) {
318 match _t {
319 alloy_sol_types::private::AssertTypeEq::<
320 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
321 >(_) => {}
322 }
323 }
324 #[automatically_derived]
325 #[doc(hidden)]
326 impl ::core::convert::From<InvalidAuthRoot> for UnderlyingRustTuple<'_> {
327 fn from(value: InvalidAuthRoot) -> Self {
328 ()
329 }
330 }
331 #[automatically_derived]
332 #[doc(hidden)]
333 impl ::core::convert::From<UnderlyingRustTuple<'_>> for InvalidAuthRoot {
334 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
335 Self
336 }
337 }
338 #[automatically_derived]
339 impl alloy_sol_types::SolError for InvalidAuthRoot {
340 type Parameters<'a> = UnderlyingSolTuple<'a>;
341 type Token<'a> = <Self::Parameters<
342 'a,
343 > as alloy_sol_types::SolType>::Token<'a>;
344 const SIGNATURE: &'static str = "InvalidAuthRoot()";
345 const SELECTOR: [u8; 4] = [50u8, 139u8, 136u8, 120u8];
346 #[inline]
347 fn new<'a>(
348 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
349 ) -> Self {
350 tuple.into()
351 }
352 #[inline]
353 fn tokenize(&self) -> Self::Token<'_> {
354 ()
355 }
356 #[inline]
357 fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
358 <Self::Parameters<
359 '_,
360 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
361 .map(Self::new)
362 }
363 }
364 };
365 #[derive(serde::Serialize, serde::Deserialize)]
366 #[derive(Default, Debug, PartialEq, Eq, Hash)]
367 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
372 #[derive(Clone)]
373 pub struct InvalidRewardAmount;
374 #[allow(
375 non_camel_case_types,
376 non_snake_case,
377 clippy::pub_underscore_fields,
378 clippy::style
379 )]
380 const _: () = {
381 use alloy::sol_types as alloy_sol_types;
382 #[doc(hidden)]
383 #[allow(dead_code)]
384 type UnderlyingSolTuple<'a> = ();
385 #[doc(hidden)]
386 type UnderlyingRustTuple<'a> = ();
387 #[cfg(test)]
388 #[allow(dead_code, unreachable_patterns)]
389 fn _type_assertion(
390 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
391 ) {
392 match _t {
393 alloy_sol_types::private::AssertTypeEq::<
394 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
395 >(_) => {}
396 }
397 }
398 #[automatically_derived]
399 #[doc(hidden)]
400 impl ::core::convert::From<InvalidRewardAmount> for UnderlyingRustTuple<'_> {
401 fn from(value: InvalidRewardAmount) -> Self {
402 ()
403 }
404 }
405 #[automatically_derived]
406 #[doc(hidden)]
407 impl ::core::convert::From<UnderlyingRustTuple<'_>> for InvalidRewardAmount {
408 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
409 Self
410 }
411 }
412 #[automatically_derived]
413 impl alloy_sol_types::SolError for InvalidRewardAmount {
414 type Parameters<'a> = UnderlyingSolTuple<'a>;
415 type Token<'a> = <Self::Parameters<
416 'a,
417 > as alloy_sol_types::SolType>::Token<'a>;
418 const SIGNATURE: &'static str = "InvalidRewardAmount()";
419 const SELECTOR: [u8; 4] = [56u8, 83u8, 152u8, 101u8];
420 #[inline]
421 fn new<'a>(
422 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
423 ) -> Self {
424 tuple.into()
425 }
426 #[inline]
427 fn tokenize(&self) -> Self::Token<'_> {
428 ()
429 }
430 #[inline]
431 fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
432 <Self::Parameters<
433 '_,
434 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
435 .map(Self::new)
436 }
437 }
438 };
439 #[derive(serde::Serialize, serde::Deserialize)]
440 #[derive(Default, Debug, PartialEq, Eq, Hash)]
441 #[allow(
446 non_camel_case_types,
447 non_snake_case,
448 clippy::pub_underscore_fields,
449 clippy::style
450 )]
451 #[derive(Clone)]
452 pub struct RewardsClaimed {
453 #[allow(missing_docs)]
454 pub user: alloy::sol_types::private::Address,
455 #[allow(missing_docs)]
456 pub amount: alloy::sol_types::private::primitives::aliases::U256,
457 }
458 #[allow(
459 non_camel_case_types,
460 non_snake_case,
461 clippy::pub_underscore_fields,
462 clippy::style
463 )]
464 const _: () = {
465 use alloy::sol_types as alloy_sol_types;
466 #[automatically_derived]
467 impl alloy_sol_types::SolEvent for RewardsClaimed {
468 type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
469 type DataToken<'a> = <Self::DataTuple<
470 'a,
471 > as alloy_sol_types::SolType>::Token<'a>;
472 type TopicList = (
473 alloy_sol_types::sol_data::FixedBytes<32>,
474 alloy::sol_types::sol_data::Address,
475 );
476 const SIGNATURE: &'static str = "RewardsClaimed(address,uint256)";
477 const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
478 252u8, 48u8, 205u8, 222u8, 163u8, 142u8, 43u8, 244u8, 214u8, 234u8,
479 125u8, 63u8, 158u8, 211u8, 182u8, 173u8, 127u8, 23u8, 100u8, 25u8, 244u8,
480 150u8, 59u8, 216u8, 19u8, 24u8, 6u8, 122u8, 74u8, 238u8, 115u8, 254u8,
481 ]);
482 const ANONYMOUS: bool = false;
483 #[allow(unused_variables)]
484 #[inline]
485 fn new(
486 topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
487 data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
488 ) -> Self {
489 Self {
490 user: topics.1,
491 amount: data.0,
492 }
493 }
494 #[inline]
495 fn check_signature(
496 topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
497 ) -> alloy_sol_types::Result<()> {
498 if topics.0 != Self::SIGNATURE_HASH {
499 return Err(
500 alloy_sol_types::Error::invalid_event_signature_hash(
501 Self::SIGNATURE,
502 topics.0,
503 Self::SIGNATURE_HASH,
504 ),
505 );
506 }
507 Ok(())
508 }
509 #[inline]
510 fn tokenize_body(&self) -> Self::DataToken<'_> {
511 (
512 <alloy::sol_types::sol_data::Uint<
513 256,
514 > as alloy_sol_types::SolType>::tokenize(&self.amount),
515 )
516 }
517 #[inline]
518 fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
519 (Self::SIGNATURE_HASH.into(), self.user.clone())
520 }
521 #[inline]
522 fn encode_topics_raw(
523 &self,
524 out: &mut [alloy_sol_types::abi::token::WordToken],
525 ) -> alloy_sol_types::Result<()> {
526 if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
527 return Err(alloy_sol_types::Error::Overrun);
528 }
529 out[0usize] = alloy_sol_types::abi::token::WordToken(
530 Self::SIGNATURE_HASH,
531 );
532 out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
533 &self.user,
534 );
535 Ok(())
536 }
537 }
538 #[automatically_derived]
539 impl alloy_sol_types::private::IntoLogData for RewardsClaimed {
540 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
541 From::from(self)
542 }
543 fn into_log_data(self) -> alloy_sol_types::private::LogData {
544 From::from(&self)
545 }
546 }
547 #[automatically_derived]
548 impl From<&RewardsClaimed> for alloy_sol_types::private::LogData {
549 #[inline]
550 fn from(this: &RewardsClaimed) -> alloy_sol_types::private::LogData {
551 alloy_sol_types::SolEvent::encode_log_data(this)
552 }
553 }
554 };
555 #[derive(serde::Serialize, serde::Deserialize)]
556 #[derive(Default, Debug, PartialEq, Eq, Hash)]
557 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
562 #[derive(Clone)]
563 pub struct claimRewardsCall {
564 #[allow(missing_docs)]
565 pub lifetimeRewards: alloy::sol_types::private::primitives::aliases::U256,
566 #[allow(missing_docs)]
567 pub authData: alloy::sol_types::private::Bytes,
568 }
569 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
571 #[derive(Clone)]
572 pub struct claimRewardsReturn {}
573 #[allow(
574 non_camel_case_types,
575 non_snake_case,
576 clippy::pub_underscore_fields,
577 clippy::style
578 )]
579 const _: () = {
580 use alloy::sol_types as alloy_sol_types;
581 {
582 #[doc(hidden)]
583 #[allow(dead_code)]
584 type UnderlyingSolTuple<'a> = (
585 alloy::sol_types::sol_data::Uint<256>,
586 alloy::sol_types::sol_data::Bytes,
587 );
588 #[doc(hidden)]
589 type UnderlyingRustTuple<'a> = (
590 alloy::sol_types::private::primitives::aliases::U256,
591 alloy::sol_types::private::Bytes,
592 );
593 #[cfg(test)]
594 #[allow(dead_code, unreachable_patterns)]
595 fn _type_assertion(
596 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
597 ) {
598 match _t {
599 alloy_sol_types::private::AssertTypeEq::<
600 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
601 >(_) => {}
602 }
603 }
604 #[automatically_derived]
605 #[doc(hidden)]
606 impl ::core::convert::From<claimRewardsCall> for UnderlyingRustTuple<'_> {
607 fn from(value: claimRewardsCall) -> Self {
608 (value.lifetimeRewards, value.authData)
609 }
610 }
611 #[automatically_derived]
612 #[doc(hidden)]
613 impl ::core::convert::From<UnderlyingRustTuple<'_>> for claimRewardsCall {
614 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
615 Self {
616 lifetimeRewards: tuple.0,
617 authData: tuple.1,
618 }
619 }
620 }
621 }
622 {
623 #[doc(hidden)]
624 #[allow(dead_code)]
625 type UnderlyingSolTuple<'a> = ();
626 #[doc(hidden)]
627 type UnderlyingRustTuple<'a> = ();
628 #[cfg(test)]
629 #[allow(dead_code, unreachable_patterns)]
630 fn _type_assertion(
631 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
632 ) {
633 match _t {
634 alloy_sol_types::private::AssertTypeEq::<
635 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
636 >(_) => {}
637 }
638 }
639 #[automatically_derived]
640 #[doc(hidden)]
641 impl ::core::convert::From<claimRewardsReturn> for UnderlyingRustTuple<'_> {
642 fn from(value: claimRewardsReturn) -> Self {
643 ()
644 }
645 }
646 #[automatically_derived]
647 #[doc(hidden)]
648 impl ::core::convert::From<UnderlyingRustTuple<'_>> for claimRewardsReturn {
649 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
650 Self {}
651 }
652 }
653 }
654 impl claimRewardsReturn {
655 fn _tokenize(
656 &self,
657 ) -> <claimRewardsCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
658 ()
659 }
660 }
661 #[automatically_derived]
662 impl alloy_sol_types::SolCall for claimRewardsCall {
663 type Parameters<'a> = (
664 alloy::sol_types::sol_data::Uint<256>,
665 alloy::sol_types::sol_data::Bytes,
666 );
667 type Token<'a> = <Self::Parameters<
668 'a,
669 > as alloy_sol_types::SolType>::Token<'a>;
670 type Return = claimRewardsReturn;
671 type ReturnTuple<'a> = ();
672 type ReturnToken<'a> = <Self::ReturnTuple<
673 'a,
674 > as alloy_sol_types::SolType>::Token<'a>;
675 const SIGNATURE: &'static str = "claimRewards(uint256,bytes)";
676 const SELECTOR: [u8; 4] = [84u8, 157u8, 216u8, 195u8];
677 #[inline]
678 fn new<'a>(
679 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
680 ) -> Self {
681 tuple.into()
682 }
683 #[inline]
684 fn tokenize(&self) -> Self::Token<'_> {
685 (
686 <alloy::sol_types::sol_data::Uint<
687 256,
688 > as alloy_sol_types::SolType>::tokenize(&self.lifetimeRewards),
689 <alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
690 &self.authData,
691 ),
692 )
693 }
694 #[inline]
695 fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
696 claimRewardsReturn::_tokenize(ret)
697 }
698 #[inline]
699 fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
700 <Self::ReturnTuple<
701 '_,
702 > as alloy_sol_types::SolType>::abi_decode_sequence(data)
703 .map(Into::into)
704 }
705 #[inline]
706 fn abi_decode_returns_validate(
707 data: &[u8],
708 ) -> alloy_sol_types::Result<Self::Return> {
709 <Self::ReturnTuple<
710 '_,
711 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
712 .map(Into::into)
713 }
714 }
715 };
716 #[derive(serde::Serialize, serde::Deserialize)]
717 #[derive(Default, Debug, PartialEq, Eq, Hash)]
718 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
723 #[derive(Clone)]
724 pub struct claimedRewardsCall {
725 #[allow(missing_docs)]
726 pub claimer: alloy::sol_types::private::Address,
727 }
728 #[derive(serde::Serialize, serde::Deserialize)]
729 #[derive(Default, Debug, PartialEq, Eq, Hash)]
730 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
732 #[derive(Clone)]
733 pub struct claimedRewardsReturn {
734 #[allow(missing_docs)]
735 pub _0: alloy::sol_types::private::primitives::aliases::U256,
736 }
737 #[allow(
738 non_camel_case_types,
739 non_snake_case,
740 clippy::pub_underscore_fields,
741 clippy::style
742 )]
743 const _: () = {
744 use alloy::sol_types as alloy_sol_types;
745 {
746 #[doc(hidden)]
747 #[allow(dead_code)]
748 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
749 #[doc(hidden)]
750 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
751 #[cfg(test)]
752 #[allow(dead_code, unreachable_patterns)]
753 fn _type_assertion(
754 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
755 ) {
756 match _t {
757 alloy_sol_types::private::AssertTypeEq::<
758 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
759 >(_) => {}
760 }
761 }
762 #[automatically_derived]
763 #[doc(hidden)]
764 impl ::core::convert::From<claimedRewardsCall> for UnderlyingRustTuple<'_> {
765 fn from(value: claimedRewardsCall) -> Self {
766 (value.claimer,)
767 }
768 }
769 #[automatically_derived]
770 #[doc(hidden)]
771 impl ::core::convert::From<UnderlyingRustTuple<'_>> for claimedRewardsCall {
772 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
773 Self { claimer: tuple.0 }
774 }
775 }
776 }
777 {
778 #[doc(hidden)]
779 #[allow(dead_code)]
780 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
781 #[doc(hidden)]
782 type UnderlyingRustTuple<'a> = (
783 alloy::sol_types::private::primitives::aliases::U256,
784 );
785 #[cfg(test)]
786 #[allow(dead_code, unreachable_patterns)]
787 fn _type_assertion(
788 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
789 ) {
790 match _t {
791 alloy_sol_types::private::AssertTypeEq::<
792 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
793 >(_) => {}
794 }
795 }
796 #[automatically_derived]
797 #[doc(hidden)]
798 impl ::core::convert::From<claimedRewardsReturn>
799 for UnderlyingRustTuple<'_> {
800 fn from(value: claimedRewardsReturn) -> Self {
801 (value._0,)
802 }
803 }
804 #[automatically_derived]
805 #[doc(hidden)]
806 impl ::core::convert::From<UnderlyingRustTuple<'_>>
807 for claimedRewardsReturn {
808 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
809 Self { _0: tuple.0 }
810 }
811 }
812 }
813 #[automatically_derived]
814 impl alloy_sol_types::SolCall for claimedRewardsCall {
815 type Parameters<'a> = (alloy::sol_types::sol_data::Address,);
816 type Token<'a> = <Self::Parameters<
817 'a,
818 > as alloy_sol_types::SolType>::Token<'a>;
819 type Return = alloy::sol_types::private::primitives::aliases::U256;
820 type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
821 type ReturnToken<'a> = <Self::ReturnTuple<
822 'a,
823 > as alloy_sol_types::SolType>::Token<'a>;
824 const SIGNATURE: &'static str = "claimedRewards(address)";
825 const SELECTOR: [u8; 4] = [189u8, 131u8, 67u8, 69u8];
826 #[inline]
827 fn new<'a>(
828 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
829 ) -> Self {
830 tuple.into()
831 }
832 #[inline]
833 fn tokenize(&self) -> Self::Token<'_> {
834 (
835 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
836 &self.claimer,
837 ),
838 )
839 }
840 #[inline]
841 fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
842 (
843 <alloy::sol_types::sol_data::Uint<
844 256,
845 > as alloy_sol_types::SolType>::tokenize(ret),
846 )
847 }
848 #[inline]
849 fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
850 <Self::ReturnTuple<
851 '_,
852 > as alloy_sol_types::SolType>::abi_decode_sequence(data)
853 .map(|r| {
854 let r: claimedRewardsReturn = r.into();
855 r._0
856 })
857 }
858 #[inline]
859 fn abi_decode_returns_validate(
860 data: &[u8],
861 ) -> alloy_sol_types::Result<Self::Return> {
862 <Self::ReturnTuple<
863 '_,
864 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
865 .map(|r| {
866 let r: claimedRewardsReturn = r.into();
867 r._0
868 })
869 }
870 }
871 };
872 #[derive(serde::Serialize, serde::Deserialize)]
873 #[derive(Default, Debug, PartialEq, Eq, Hash)]
874 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
879 #[derive(Clone)]
880 pub struct totalClaimedCall;
881 #[derive(serde::Serialize, serde::Deserialize)]
882 #[derive(Default, Debug, PartialEq, Eq, Hash)]
883 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
885 #[derive(Clone)]
886 pub struct totalClaimedReturn {
887 #[allow(missing_docs)]
888 pub _0: alloy::sol_types::private::primitives::aliases::U256,
889 }
890 #[allow(
891 non_camel_case_types,
892 non_snake_case,
893 clippy::pub_underscore_fields,
894 clippy::style
895 )]
896 const _: () = {
897 use alloy::sol_types as alloy_sol_types;
898 {
899 #[doc(hidden)]
900 #[allow(dead_code)]
901 type UnderlyingSolTuple<'a> = ();
902 #[doc(hidden)]
903 type UnderlyingRustTuple<'a> = ();
904 #[cfg(test)]
905 #[allow(dead_code, unreachable_patterns)]
906 fn _type_assertion(
907 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
908 ) {
909 match _t {
910 alloy_sol_types::private::AssertTypeEq::<
911 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
912 >(_) => {}
913 }
914 }
915 #[automatically_derived]
916 #[doc(hidden)]
917 impl ::core::convert::From<totalClaimedCall> for UnderlyingRustTuple<'_> {
918 fn from(value: totalClaimedCall) -> Self {
919 ()
920 }
921 }
922 #[automatically_derived]
923 #[doc(hidden)]
924 impl ::core::convert::From<UnderlyingRustTuple<'_>> for totalClaimedCall {
925 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
926 Self
927 }
928 }
929 }
930 {
931 #[doc(hidden)]
932 #[allow(dead_code)]
933 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
934 #[doc(hidden)]
935 type UnderlyingRustTuple<'a> = (
936 alloy::sol_types::private::primitives::aliases::U256,
937 );
938 #[cfg(test)]
939 #[allow(dead_code, unreachable_patterns)]
940 fn _type_assertion(
941 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
942 ) {
943 match _t {
944 alloy_sol_types::private::AssertTypeEq::<
945 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
946 >(_) => {}
947 }
948 }
949 #[automatically_derived]
950 #[doc(hidden)]
951 impl ::core::convert::From<totalClaimedReturn> for UnderlyingRustTuple<'_> {
952 fn from(value: totalClaimedReturn) -> Self {
953 (value._0,)
954 }
955 }
956 #[automatically_derived]
957 #[doc(hidden)]
958 impl ::core::convert::From<UnderlyingRustTuple<'_>> for totalClaimedReturn {
959 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
960 Self { _0: tuple.0 }
961 }
962 }
963 }
964 #[automatically_derived]
965 impl alloy_sol_types::SolCall for totalClaimedCall {
966 type Parameters<'a> = ();
967 type Token<'a> = <Self::Parameters<
968 'a,
969 > as alloy_sol_types::SolType>::Token<'a>;
970 type Return = alloy::sol_types::private::primitives::aliases::U256;
971 type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
972 type ReturnToken<'a> = <Self::ReturnTuple<
973 'a,
974 > as alloy_sol_types::SolType>::Token<'a>;
975 const SIGNATURE: &'static str = "totalClaimed()";
976 const SELECTOR: [u8; 4] = [213u8, 74u8, 210u8, 161u8];
977 #[inline]
978 fn new<'a>(
979 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
980 ) -> Self {
981 tuple.into()
982 }
983 #[inline]
984 fn tokenize(&self) -> Self::Token<'_> {
985 ()
986 }
987 #[inline]
988 fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
989 (
990 <alloy::sol_types::sol_data::Uint<
991 256,
992 > as alloy_sol_types::SolType>::tokenize(ret),
993 )
994 }
995 #[inline]
996 fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
997 <Self::ReturnTuple<
998 '_,
999 > as alloy_sol_types::SolType>::abi_decode_sequence(data)
1000 .map(|r| {
1001 let r: totalClaimedReturn = r.into();
1002 r._0
1003 })
1004 }
1005 #[inline]
1006 fn abi_decode_returns_validate(
1007 data: &[u8],
1008 ) -> alloy_sol_types::Result<Self::Return> {
1009 <Self::ReturnTuple<
1010 '_,
1011 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
1012 .map(|r| {
1013 let r: totalClaimedReturn = r.into();
1014 r._0
1015 })
1016 }
1017 }
1018 };
1019 #[derive(Clone)]
1021 #[derive(serde::Serialize, serde::Deserialize)]
1022 #[derive()]
1023 pub enum IRewardClaimCalls {
1024 #[allow(missing_docs)]
1025 claimRewards(claimRewardsCall),
1026 #[allow(missing_docs)]
1027 claimedRewards(claimedRewardsCall),
1028 #[allow(missing_docs)]
1029 totalClaimed(totalClaimedCall),
1030 }
1031 impl IRewardClaimCalls {
1032 pub const SELECTORS: &'static [[u8; 4usize]] = &[
1039 [84u8, 157u8, 216u8, 195u8],
1040 [189u8, 131u8, 67u8, 69u8],
1041 [213u8, 74u8, 210u8, 161u8],
1042 ];
1043 pub const VARIANT_NAMES: &'static [&'static str] = &[
1045 ::core::stringify!(claimRewards),
1046 ::core::stringify!(claimedRewards),
1047 ::core::stringify!(totalClaimed),
1048 ];
1049 pub const SIGNATURES: &'static [&'static str] = &[
1051 <claimRewardsCall as alloy_sol_types::SolCall>::SIGNATURE,
1052 <claimedRewardsCall as alloy_sol_types::SolCall>::SIGNATURE,
1053 <totalClaimedCall as alloy_sol_types::SolCall>::SIGNATURE,
1054 ];
1055 #[inline]
1057 pub fn signature_by_selector(
1058 selector: [u8; 4usize],
1059 ) -> ::core::option::Option<&'static str> {
1060 match Self::SELECTORS.binary_search(&selector) {
1061 ::core::result::Result::Ok(idx) => {
1062 ::core::option::Option::Some(Self::SIGNATURES[idx])
1063 }
1064 ::core::result::Result::Err(_) => ::core::option::Option::None,
1065 }
1066 }
1067 #[inline]
1069 pub fn name_by_selector(
1070 selector: [u8; 4usize],
1071 ) -> ::core::option::Option<&'static str> {
1072 let sig = Self::signature_by_selector(selector)?;
1073 sig.split_once('(').map(|(name, _)| name)
1074 }
1075 }
1076 #[automatically_derived]
1077 impl alloy_sol_types::SolInterface for IRewardClaimCalls {
1078 const NAME: &'static str = "IRewardClaimCalls";
1079 const MIN_DATA_LENGTH: usize = 0usize;
1080 const COUNT: usize = 3usize;
1081 #[inline]
1082 fn selector(&self) -> [u8; 4] {
1083 match self {
1084 Self::claimRewards(_) => {
1085 <claimRewardsCall as alloy_sol_types::SolCall>::SELECTOR
1086 }
1087 Self::claimedRewards(_) => {
1088 <claimedRewardsCall as alloy_sol_types::SolCall>::SELECTOR
1089 }
1090 Self::totalClaimed(_) => {
1091 <totalClaimedCall as alloy_sol_types::SolCall>::SELECTOR
1092 }
1093 }
1094 }
1095 #[inline]
1096 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
1097 Self::SELECTORS.get(i).copied()
1098 }
1099 #[inline]
1100 fn valid_selector(selector: [u8; 4]) -> bool {
1101 Self::SELECTORS.binary_search(&selector).is_ok()
1102 }
1103 #[inline]
1104 #[allow(non_snake_case)]
1105 fn abi_decode_raw(
1106 selector: [u8; 4],
1107 data: &[u8],
1108 ) -> alloy_sol_types::Result<Self> {
1109 static DECODE_SHIMS: &[fn(
1110 &[u8],
1111 ) -> alloy_sol_types::Result<IRewardClaimCalls>] = &[
1112 {
1113 fn claimRewards(
1114 data: &[u8],
1115 ) -> alloy_sol_types::Result<IRewardClaimCalls> {
1116 <claimRewardsCall as alloy_sol_types::SolCall>::abi_decode_raw(
1117 data,
1118 )
1119 .map(IRewardClaimCalls::claimRewards)
1120 }
1121 claimRewards
1122 },
1123 {
1124 fn claimedRewards(
1125 data: &[u8],
1126 ) -> alloy_sol_types::Result<IRewardClaimCalls> {
1127 <claimedRewardsCall as alloy_sol_types::SolCall>::abi_decode_raw(
1128 data,
1129 )
1130 .map(IRewardClaimCalls::claimedRewards)
1131 }
1132 claimedRewards
1133 },
1134 {
1135 fn totalClaimed(
1136 data: &[u8],
1137 ) -> alloy_sol_types::Result<IRewardClaimCalls> {
1138 <totalClaimedCall as alloy_sol_types::SolCall>::abi_decode_raw(
1139 data,
1140 )
1141 .map(IRewardClaimCalls::totalClaimed)
1142 }
1143 totalClaimed
1144 },
1145 ];
1146 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
1147 return Err(
1148 alloy_sol_types::Error::unknown_selector(
1149 <Self as alloy_sol_types::SolInterface>::NAME,
1150 selector,
1151 ),
1152 );
1153 };
1154 DECODE_SHIMS[idx](data)
1155 }
1156 #[inline]
1157 #[allow(non_snake_case)]
1158 fn abi_decode_raw_validate(
1159 selector: [u8; 4],
1160 data: &[u8],
1161 ) -> alloy_sol_types::Result<Self> {
1162 static DECODE_VALIDATE_SHIMS: &[fn(
1163 &[u8],
1164 ) -> alloy_sol_types::Result<IRewardClaimCalls>] = &[
1165 {
1166 fn claimRewards(
1167 data: &[u8],
1168 ) -> alloy_sol_types::Result<IRewardClaimCalls> {
1169 <claimRewardsCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
1170 data,
1171 )
1172 .map(IRewardClaimCalls::claimRewards)
1173 }
1174 claimRewards
1175 },
1176 {
1177 fn claimedRewards(
1178 data: &[u8],
1179 ) -> alloy_sol_types::Result<IRewardClaimCalls> {
1180 <claimedRewardsCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
1181 data,
1182 )
1183 .map(IRewardClaimCalls::claimedRewards)
1184 }
1185 claimedRewards
1186 },
1187 {
1188 fn totalClaimed(
1189 data: &[u8],
1190 ) -> alloy_sol_types::Result<IRewardClaimCalls> {
1191 <totalClaimedCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
1192 data,
1193 )
1194 .map(IRewardClaimCalls::totalClaimed)
1195 }
1196 totalClaimed
1197 },
1198 ];
1199 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
1200 return Err(
1201 alloy_sol_types::Error::unknown_selector(
1202 <Self as alloy_sol_types::SolInterface>::NAME,
1203 selector,
1204 ),
1205 );
1206 };
1207 DECODE_VALIDATE_SHIMS[idx](data)
1208 }
1209 #[inline]
1210 fn abi_encoded_size(&self) -> usize {
1211 match self {
1212 Self::claimRewards(inner) => {
1213 <claimRewardsCall as alloy_sol_types::SolCall>::abi_encoded_size(
1214 inner,
1215 )
1216 }
1217 Self::claimedRewards(inner) => {
1218 <claimedRewardsCall as alloy_sol_types::SolCall>::abi_encoded_size(
1219 inner,
1220 )
1221 }
1222 Self::totalClaimed(inner) => {
1223 <totalClaimedCall as alloy_sol_types::SolCall>::abi_encoded_size(
1224 inner,
1225 )
1226 }
1227 }
1228 }
1229 #[inline]
1230 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
1231 match self {
1232 Self::claimRewards(inner) => {
1233 <claimRewardsCall as alloy_sol_types::SolCall>::abi_encode_raw(
1234 inner,
1235 out,
1236 )
1237 }
1238 Self::claimedRewards(inner) => {
1239 <claimedRewardsCall as alloy_sol_types::SolCall>::abi_encode_raw(
1240 inner,
1241 out,
1242 )
1243 }
1244 Self::totalClaimed(inner) => {
1245 <totalClaimedCall as alloy_sol_types::SolCall>::abi_encode_raw(
1246 inner,
1247 out,
1248 )
1249 }
1250 }
1251 }
1252 }
1253 #[derive(Clone)]
1255 #[derive(serde::Serialize, serde::Deserialize)]
1256 #[derive(Debug, PartialEq, Eq, Hash)]
1257 pub enum IRewardClaimErrors {
1258 #[allow(missing_docs)]
1259 AlreadyClaimed(AlreadyClaimed),
1260 #[allow(missing_docs)]
1261 DailyLimitExceeded(DailyLimitExceeded),
1262 #[allow(missing_docs)]
1263 InvalidAuthRoot(InvalidAuthRoot),
1264 #[allow(missing_docs)]
1265 InvalidRewardAmount(InvalidRewardAmount),
1266 }
1267 impl IRewardClaimErrors {
1268 pub const SELECTORS: &'static [[u8; 4usize]] = &[
1275 [25u8, 75u8, 211u8, 20u8],
1276 [50u8, 139u8, 136u8, 120u8],
1277 [56u8, 83u8, 152u8, 101u8],
1278 [100u8, 108u8, 245u8, 88u8],
1279 ];
1280 pub const VARIANT_NAMES: &'static [&'static str] = &[
1282 ::core::stringify!(DailyLimitExceeded),
1283 ::core::stringify!(InvalidAuthRoot),
1284 ::core::stringify!(InvalidRewardAmount),
1285 ::core::stringify!(AlreadyClaimed),
1286 ];
1287 pub const SIGNATURES: &'static [&'static str] = &[
1289 <DailyLimitExceeded as alloy_sol_types::SolError>::SIGNATURE,
1290 <InvalidAuthRoot as alloy_sol_types::SolError>::SIGNATURE,
1291 <InvalidRewardAmount as alloy_sol_types::SolError>::SIGNATURE,
1292 <AlreadyClaimed as alloy_sol_types::SolError>::SIGNATURE,
1293 ];
1294 #[inline]
1296 pub fn signature_by_selector(
1297 selector: [u8; 4usize],
1298 ) -> ::core::option::Option<&'static str> {
1299 match Self::SELECTORS.binary_search(&selector) {
1300 ::core::result::Result::Ok(idx) => {
1301 ::core::option::Option::Some(Self::SIGNATURES[idx])
1302 }
1303 ::core::result::Result::Err(_) => ::core::option::Option::None,
1304 }
1305 }
1306 #[inline]
1308 pub fn name_by_selector(
1309 selector: [u8; 4usize],
1310 ) -> ::core::option::Option<&'static str> {
1311 let sig = Self::signature_by_selector(selector)?;
1312 sig.split_once('(').map(|(name, _)| name)
1313 }
1314 }
1315 #[automatically_derived]
1316 impl alloy_sol_types::SolInterface for IRewardClaimErrors {
1317 const NAME: &'static str = "IRewardClaimErrors";
1318 const MIN_DATA_LENGTH: usize = 0usize;
1319 const COUNT: usize = 4usize;
1320 #[inline]
1321 fn selector(&self) -> [u8; 4] {
1322 match self {
1323 Self::AlreadyClaimed(_) => {
1324 <AlreadyClaimed as alloy_sol_types::SolError>::SELECTOR
1325 }
1326 Self::DailyLimitExceeded(_) => {
1327 <DailyLimitExceeded as alloy_sol_types::SolError>::SELECTOR
1328 }
1329 Self::InvalidAuthRoot(_) => {
1330 <InvalidAuthRoot as alloy_sol_types::SolError>::SELECTOR
1331 }
1332 Self::InvalidRewardAmount(_) => {
1333 <InvalidRewardAmount as alloy_sol_types::SolError>::SELECTOR
1334 }
1335 }
1336 }
1337 #[inline]
1338 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
1339 Self::SELECTORS.get(i).copied()
1340 }
1341 #[inline]
1342 fn valid_selector(selector: [u8; 4]) -> bool {
1343 Self::SELECTORS.binary_search(&selector).is_ok()
1344 }
1345 #[inline]
1346 #[allow(non_snake_case)]
1347 fn abi_decode_raw(
1348 selector: [u8; 4],
1349 data: &[u8],
1350 ) -> alloy_sol_types::Result<Self> {
1351 static DECODE_SHIMS: &[fn(
1352 &[u8],
1353 ) -> alloy_sol_types::Result<IRewardClaimErrors>] = &[
1354 {
1355 fn DailyLimitExceeded(
1356 data: &[u8],
1357 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1358 <DailyLimitExceeded as alloy_sol_types::SolError>::abi_decode_raw(
1359 data,
1360 )
1361 .map(IRewardClaimErrors::DailyLimitExceeded)
1362 }
1363 DailyLimitExceeded
1364 },
1365 {
1366 fn InvalidAuthRoot(
1367 data: &[u8],
1368 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1369 <InvalidAuthRoot as alloy_sol_types::SolError>::abi_decode_raw(
1370 data,
1371 )
1372 .map(IRewardClaimErrors::InvalidAuthRoot)
1373 }
1374 InvalidAuthRoot
1375 },
1376 {
1377 fn InvalidRewardAmount(
1378 data: &[u8],
1379 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1380 <InvalidRewardAmount as alloy_sol_types::SolError>::abi_decode_raw(
1381 data,
1382 )
1383 .map(IRewardClaimErrors::InvalidRewardAmount)
1384 }
1385 InvalidRewardAmount
1386 },
1387 {
1388 fn AlreadyClaimed(
1389 data: &[u8],
1390 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1391 <AlreadyClaimed as alloy_sol_types::SolError>::abi_decode_raw(
1392 data,
1393 )
1394 .map(IRewardClaimErrors::AlreadyClaimed)
1395 }
1396 AlreadyClaimed
1397 },
1398 ];
1399 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
1400 return Err(
1401 alloy_sol_types::Error::unknown_selector(
1402 <Self as alloy_sol_types::SolInterface>::NAME,
1403 selector,
1404 ),
1405 );
1406 };
1407 DECODE_SHIMS[idx](data)
1408 }
1409 #[inline]
1410 #[allow(non_snake_case)]
1411 fn abi_decode_raw_validate(
1412 selector: [u8; 4],
1413 data: &[u8],
1414 ) -> alloy_sol_types::Result<Self> {
1415 static DECODE_VALIDATE_SHIMS: &[fn(
1416 &[u8],
1417 ) -> alloy_sol_types::Result<IRewardClaimErrors>] = &[
1418 {
1419 fn DailyLimitExceeded(
1420 data: &[u8],
1421 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1422 <DailyLimitExceeded as alloy_sol_types::SolError>::abi_decode_raw_validate(
1423 data,
1424 )
1425 .map(IRewardClaimErrors::DailyLimitExceeded)
1426 }
1427 DailyLimitExceeded
1428 },
1429 {
1430 fn InvalidAuthRoot(
1431 data: &[u8],
1432 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1433 <InvalidAuthRoot as alloy_sol_types::SolError>::abi_decode_raw_validate(
1434 data,
1435 )
1436 .map(IRewardClaimErrors::InvalidAuthRoot)
1437 }
1438 InvalidAuthRoot
1439 },
1440 {
1441 fn InvalidRewardAmount(
1442 data: &[u8],
1443 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1444 <InvalidRewardAmount as alloy_sol_types::SolError>::abi_decode_raw_validate(
1445 data,
1446 )
1447 .map(IRewardClaimErrors::InvalidRewardAmount)
1448 }
1449 InvalidRewardAmount
1450 },
1451 {
1452 fn AlreadyClaimed(
1453 data: &[u8],
1454 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1455 <AlreadyClaimed as alloy_sol_types::SolError>::abi_decode_raw_validate(
1456 data,
1457 )
1458 .map(IRewardClaimErrors::AlreadyClaimed)
1459 }
1460 AlreadyClaimed
1461 },
1462 ];
1463 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
1464 return Err(
1465 alloy_sol_types::Error::unknown_selector(
1466 <Self as alloy_sol_types::SolInterface>::NAME,
1467 selector,
1468 ),
1469 );
1470 };
1471 DECODE_VALIDATE_SHIMS[idx](data)
1472 }
1473 #[inline]
1474 fn abi_encoded_size(&self) -> usize {
1475 match self {
1476 Self::AlreadyClaimed(inner) => {
1477 <AlreadyClaimed as alloy_sol_types::SolError>::abi_encoded_size(
1478 inner,
1479 )
1480 }
1481 Self::DailyLimitExceeded(inner) => {
1482 <DailyLimitExceeded as alloy_sol_types::SolError>::abi_encoded_size(
1483 inner,
1484 )
1485 }
1486 Self::InvalidAuthRoot(inner) => {
1487 <InvalidAuthRoot as alloy_sol_types::SolError>::abi_encoded_size(
1488 inner,
1489 )
1490 }
1491 Self::InvalidRewardAmount(inner) => {
1492 <InvalidRewardAmount as alloy_sol_types::SolError>::abi_encoded_size(
1493 inner,
1494 )
1495 }
1496 }
1497 }
1498 #[inline]
1499 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
1500 match self {
1501 Self::AlreadyClaimed(inner) => {
1502 <AlreadyClaimed as alloy_sol_types::SolError>::abi_encode_raw(
1503 inner,
1504 out,
1505 )
1506 }
1507 Self::DailyLimitExceeded(inner) => {
1508 <DailyLimitExceeded as alloy_sol_types::SolError>::abi_encode_raw(
1509 inner,
1510 out,
1511 )
1512 }
1513 Self::InvalidAuthRoot(inner) => {
1514 <InvalidAuthRoot as alloy_sol_types::SolError>::abi_encode_raw(
1515 inner,
1516 out,
1517 )
1518 }
1519 Self::InvalidRewardAmount(inner) => {
1520 <InvalidRewardAmount as alloy_sol_types::SolError>::abi_encode_raw(
1521 inner,
1522 out,
1523 )
1524 }
1525 }
1526 }
1527 }
1528 #[derive(Clone)]
1530 #[derive(serde::Serialize, serde::Deserialize)]
1531 #[derive(Debug, PartialEq, Eq, Hash)]
1532 pub enum IRewardClaimEvents {
1533 #[allow(missing_docs)]
1534 RewardsClaimed(RewardsClaimed),
1535 }
1536 impl IRewardClaimEvents {
1537 pub const SELECTORS: &'static [[u8; 32usize]] = &[
1544 [
1545 252u8, 48u8, 205u8, 222u8, 163u8, 142u8, 43u8, 244u8, 214u8, 234u8,
1546 125u8, 63u8, 158u8, 211u8, 182u8, 173u8, 127u8, 23u8, 100u8, 25u8, 244u8,
1547 150u8, 59u8, 216u8, 19u8, 24u8, 6u8, 122u8, 74u8, 238u8, 115u8, 254u8,
1548 ],
1549 ];
1550 pub const VARIANT_NAMES: &'static [&'static str] = &[
1552 ::core::stringify!(RewardsClaimed),
1553 ];
1554 pub const SIGNATURES: &'static [&'static str] = &[
1556 <RewardsClaimed as alloy_sol_types::SolEvent>::SIGNATURE,
1557 ];
1558 #[inline]
1560 pub fn signature_by_selector(
1561 selector: [u8; 32usize],
1562 ) -> ::core::option::Option<&'static str> {
1563 match Self::SELECTORS.binary_search(&selector) {
1564 ::core::result::Result::Ok(idx) => {
1565 ::core::option::Option::Some(Self::SIGNATURES[idx])
1566 }
1567 ::core::result::Result::Err(_) => ::core::option::Option::None,
1568 }
1569 }
1570 #[inline]
1572 pub fn name_by_selector(
1573 selector: [u8; 32usize],
1574 ) -> ::core::option::Option<&'static str> {
1575 let sig = Self::signature_by_selector(selector)?;
1576 sig.split_once('(').map(|(name, _)| name)
1577 }
1578 }
1579 #[automatically_derived]
1580 impl alloy_sol_types::SolEventInterface for IRewardClaimEvents {
1581 const NAME: &'static str = "IRewardClaimEvents";
1582 const COUNT: usize = 1usize;
1583 fn decode_raw_log(
1584 topics: &[alloy_sol_types::Word],
1585 data: &[u8],
1586 ) -> alloy_sol_types::Result<Self> {
1587 match topics.first().copied() {
1588 Some(<RewardsClaimed as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
1589 <RewardsClaimed as alloy_sol_types::SolEvent>::decode_raw_log(
1590 topics,
1591 data,
1592 )
1593 .map(Self::RewardsClaimed)
1594 }
1595 _ => {
1596 alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
1597 name: <Self as alloy_sol_types::SolEventInterface>::NAME,
1598 log: alloy_sol_types::private::Box::new(
1599 alloy_sol_types::private::LogData::new_unchecked(
1600 topics.to_vec(),
1601 data.to_vec().into(),
1602 ),
1603 ),
1604 })
1605 }
1606 }
1607 }
1608 }
1609 #[automatically_derived]
1610 impl alloy_sol_types::private::IntoLogData for IRewardClaimEvents {
1611 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
1612 match self {
1613 Self::RewardsClaimed(inner) => {
1614 alloy_sol_types::private::IntoLogData::to_log_data(inner)
1615 }
1616 }
1617 }
1618 fn into_log_data(self) -> alloy_sol_types::private::LogData {
1619 match self {
1620 Self::RewardsClaimed(inner) => {
1621 alloy_sol_types::private::IntoLogData::into_log_data(inner)
1622 }
1623 }
1624 }
1625 }
1626 use alloy::contract as alloy_contract;
1627 #[inline]
1631 pub const fn new<
1632 P: alloy_contract::private::Provider<N>,
1633 N: alloy_contract::private::Network,
1634 >(
1635 address: alloy_sol_types::private::Address,
1636 __provider: P,
1637 ) -> IRewardClaimInstance<P, N> {
1638 IRewardClaimInstance::<P, N>::new(address, __provider)
1639 }
1640 #[inline]
1646 pub fn deploy<
1647 P: alloy_contract::private::Provider<N>,
1648 N: alloy_contract::private::Network,
1649 >(
1650 __provider: P,
1651 ) -> impl ::core::future::Future<
1652 Output = alloy_contract::Result<IRewardClaimInstance<P, N>>,
1653 > {
1654 IRewardClaimInstance::<P, N>::deploy(__provider)
1655 }
1656 #[inline]
1662 pub fn deploy_builder<
1663 P: alloy_contract::private::Provider<N>,
1664 N: alloy_contract::private::Network,
1665 >(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
1666 IRewardClaimInstance::<P, N>::deploy_builder(__provider)
1667 }
1668 #[derive(Clone)]
1680 pub struct IRewardClaimInstance<P, N = alloy_contract::private::Ethereum> {
1681 address: alloy_sol_types::private::Address,
1682 provider: P,
1683 _network: ::core::marker::PhantomData<N>,
1684 }
1685 #[automatically_derived]
1686 impl<P, N> ::core::fmt::Debug for IRewardClaimInstance<P, N> {
1687 #[inline]
1688 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1689 f.debug_tuple("IRewardClaimInstance").field(&self.address).finish()
1690 }
1691 }
1692 impl<
1694 P: alloy_contract::private::Provider<N>,
1695 N: alloy_contract::private::Network,
1696 > IRewardClaimInstance<P, N> {
1697 #[inline]
1701 pub const fn new(
1702 address: alloy_sol_types::private::Address,
1703 __provider: P,
1704 ) -> Self {
1705 Self {
1706 address,
1707 provider: __provider,
1708 _network: ::core::marker::PhantomData,
1709 }
1710 }
1711 #[inline]
1717 pub async fn deploy(
1718 __provider: P,
1719 ) -> alloy_contract::Result<IRewardClaimInstance<P, N>> {
1720 let call_builder = Self::deploy_builder(__provider);
1721 let contract_address = call_builder.deploy().await?;
1722 Ok(Self::new(contract_address, call_builder.provider))
1723 }
1724 #[inline]
1730 pub fn deploy_builder(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
1731 alloy_contract::RawCallBuilder::new_raw_deploy(
1732 __provider,
1733 ::core::clone::Clone::clone(&BYTECODE),
1734 )
1735 }
1736 #[inline]
1738 pub const fn address(&self) -> &alloy_sol_types::private::Address {
1739 &self.address
1740 }
1741 #[inline]
1743 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
1744 self.address = address;
1745 }
1746 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
1748 self.set_address(address);
1749 self
1750 }
1751 #[inline]
1753 pub const fn provider(&self) -> &P {
1754 &self.provider
1755 }
1756 }
1757 impl<P: ::core::clone::Clone, N> IRewardClaimInstance<&P, N> {
1758 #[inline]
1760 pub fn with_cloned_provider(self) -> IRewardClaimInstance<P, N> {
1761 IRewardClaimInstance {
1762 address: self.address,
1763 provider: ::core::clone::Clone::clone(&self.provider),
1764 _network: ::core::marker::PhantomData,
1765 }
1766 }
1767 }
1768 impl<
1770 P: alloy_contract::private::Provider<N>,
1771 N: alloy_contract::private::Network,
1772 > IRewardClaimInstance<P, N> {
1773 pub fn call_builder<C: alloy_sol_types::SolCall>(
1778 &self,
1779 call: &C,
1780 ) -> alloy_contract::SolCallBuilder<&P, C, N> {
1781 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
1782 }
1783 pub fn claimRewards(
1785 &self,
1786 lifetimeRewards: alloy::sol_types::private::primitives::aliases::U256,
1787 authData: alloy::sol_types::private::Bytes,
1788 ) -> alloy_contract::SolCallBuilder<&P, claimRewardsCall, N> {
1789 self.call_builder(
1790 &claimRewardsCall {
1791 lifetimeRewards,
1792 authData,
1793 },
1794 )
1795 }
1796 pub fn claimedRewards(
1798 &self,
1799 claimer: alloy::sol_types::private::Address,
1800 ) -> alloy_contract::SolCallBuilder<&P, claimedRewardsCall, N> {
1801 self.call_builder(&claimedRewardsCall { claimer })
1802 }
1803 pub fn totalClaimed(
1805 &self,
1806 ) -> alloy_contract::SolCallBuilder<&P, totalClaimedCall, N> {
1807 self.call_builder(&totalClaimedCall)
1808 }
1809 }
1810 impl<
1812 P: alloy_contract::private::Provider<N>,
1813 N: alloy_contract::private::Network,
1814 > IRewardClaimInstance<P, N> {
1815 pub fn event_filter<E: alloy_sol_types::SolEvent>(
1820 &self,
1821 ) -> alloy_contract::Event<&P, E, N> {
1822 alloy_contract::Event::new_sol(&self.provider, &self.address)
1823 }
1824 pub fn RewardsClaimed_filter(
1826 &self,
1827 ) -> alloy_contract::Event<&P, RewardsClaimed, N> {
1828 self.event_filter::<RewardsClaimed>()
1829 }
1830 }
1831}