1#[allow(
94 non_camel_case_types,
95 non_snake_case,
96 clippy::pub_underscore_fields,
97 clippy::style,
98 clippy::empty_structs_with_brackets
99)]
100pub mod IRewardClaim {
101 use super::*;
102 use alloy::sol_types as alloy_sol_types;
103 #[rustfmt::skip]
109 #[allow(clippy::all)]
110 pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
111 b"",
112 );
113 #[rustfmt::skip]
119 #[allow(clippy::all)]
120 pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
121 b"",
122 );
123 #[derive(serde::Serialize, serde::Deserialize)]
124 #[derive(Default, Debug, PartialEq, Eq, Hash)]
125 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
130 #[derive(Clone)]
131 pub struct AlreadyClaimed;
132 #[allow(
133 non_camel_case_types,
134 non_snake_case,
135 clippy::pub_underscore_fields,
136 clippy::style
137 )]
138 const _: () = {
139 use alloy::sol_types as alloy_sol_types;
140 #[doc(hidden)]
141 #[allow(dead_code)]
142 type UnderlyingSolTuple<'a> = ();
143 #[doc(hidden)]
144 type UnderlyingRustTuple<'a> = ();
145 #[cfg(test)]
146 #[allow(dead_code, unreachable_patterns)]
147 fn _type_assertion(
148 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
149 ) {
150 match _t {
151 alloy_sol_types::private::AssertTypeEq::<
152 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
153 >(_) => {}
154 }
155 }
156 #[automatically_derived]
157 #[doc(hidden)]
158 impl ::core::convert::From<AlreadyClaimed> for UnderlyingRustTuple<'_> {
159 fn from(value: AlreadyClaimed) -> Self {
160 ()
161 }
162 }
163 #[automatically_derived]
164 #[doc(hidden)]
165 impl ::core::convert::From<UnderlyingRustTuple<'_>> for AlreadyClaimed {
166 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
167 Self
168 }
169 }
170 #[automatically_derived]
171 impl alloy_sol_types::SolError for AlreadyClaimed {
172 type Parameters<'a> = UnderlyingSolTuple<'a>;
173 type Token<'a> = <Self::Parameters<
174 'a,
175 > as alloy_sol_types::SolType>::Token<'a>;
176 const SIGNATURE: &'static str = "AlreadyClaimed()";
177 const SELECTOR: [u8; 4] = [100u8, 108u8, 245u8, 88u8];
178 #[inline]
179 fn new<'a>(
180 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
181 ) -> Self {
182 tuple.into()
183 }
184 #[inline]
185 fn tokenize(&self) -> Self::Token<'_> {
186 ()
187 }
188 #[inline]
189 fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
190 <Self::Parameters<
191 '_,
192 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
193 .map(Self::new)
194 }
195 }
196 };
197 #[derive(serde::Serialize, serde::Deserialize)]
198 #[derive(Default, Debug, PartialEq, Eq, Hash)]
199 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
204 #[derive(Clone)]
205 pub struct InvalidAuthRoot;
206 #[allow(
207 non_camel_case_types,
208 non_snake_case,
209 clippy::pub_underscore_fields,
210 clippy::style
211 )]
212 const _: () = {
213 use alloy::sol_types as alloy_sol_types;
214 #[doc(hidden)]
215 #[allow(dead_code)]
216 type UnderlyingSolTuple<'a> = ();
217 #[doc(hidden)]
218 type UnderlyingRustTuple<'a> = ();
219 #[cfg(test)]
220 #[allow(dead_code, unreachable_patterns)]
221 fn _type_assertion(
222 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
223 ) {
224 match _t {
225 alloy_sol_types::private::AssertTypeEq::<
226 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
227 >(_) => {}
228 }
229 }
230 #[automatically_derived]
231 #[doc(hidden)]
232 impl ::core::convert::From<InvalidAuthRoot> for UnderlyingRustTuple<'_> {
233 fn from(value: InvalidAuthRoot) -> Self {
234 ()
235 }
236 }
237 #[automatically_derived]
238 #[doc(hidden)]
239 impl ::core::convert::From<UnderlyingRustTuple<'_>> for InvalidAuthRoot {
240 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
241 Self
242 }
243 }
244 #[automatically_derived]
245 impl alloy_sol_types::SolError for InvalidAuthRoot {
246 type Parameters<'a> = UnderlyingSolTuple<'a>;
247 type Token<'a> = <Self::Parameters<
248 'a,
249 > as alloy_sol_types::SolType>::Token<'a>;
250 const SIGNATURE: &'static str = "InvalidAuthRoot()";
251 const SELECTOR: [u8; 4] = [50u8, 139u8, 136u8, 120u8];
252 #[inline]
253 fn new<'a>(
254 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
255 ) -> Self {
256 tuple.into()
257 }
258 #[inline]
259 fn tokenize(&self) -> Self::Token<'_> {
260 ()
261 }
262 #[inline]
263 fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
264 <Self::Parameters<
265 '_,
266 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
267 .map(Self::new)
268 }
269 }
270 };
271 #[derive(serde::Serialize, serde::Deserialize)]
272 #[derive(Default, Debug, PartialEq, Eq, Hash)]
273 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
278 #[derive(Clone)]
279 pub struct InvalidRewardAmount;
280 #[allow(
281 non_camel_case_types,
282 non_snake_case,
283 clippy::pub_underscore_fields,
284 clippy::style
285 )]
286 const _: () = {
287 use alloy::sol_types as alloy_sol_types;
288 #[doc(hidden)]
289 #[allow(dead_code)]
290 type UnderlyingSolTuple<'a> = ();
291 #[doc(hidden)]
292 type UnderlyingRustTuple<'a> = ();
293 #[cfg(test)]
294 #[allow(dead_code, unreachable_patterns)]
295 fn _type_assertion(
296 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
297 ) {
298 match _t {
299 alloy_sol_types::private::AssertTypeEq::<
300 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
301 >(_) => {}
302 }
303 }
304 #[automatically_derived]
305 #[doc(hidden)]
306 impl ::core::convert::From<InvalidRewardAmount> for UnderlyingRustTuple<'_> {
307 fn from(value: InvalidRewardAmount) -> Self {
308 ()
309 }
310 }
311 #[automatically_derived]
312 #[doc(hidden)]
313 impl ::core::convert::From<UnderlyingRustTuple<'_>> for InvalidRewardAmount {
314 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
315 Self
316 }
317 }
318 #[automatically_derived]
319 impl alloy_sol_types::SolError for InvalidRewardAmount {
320 type Parameters<'a> = UnderlyingSolTuple<'a>;
321 type Token<'a> = <Self::Parameters<
322 'a,
323 > as alloy_sol_types::SolType>::Token<'a>;
324 const SIGNATURE: &'static str = "InvalidRewardAmount()";
325 const SELECTOR: [u8; 4] = [56u8, 83u8, 152u8, 101u8];
326 #[inline]
327 fn new<'a>(
328 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
329 ) -> Self {
330 tuple.into()
331 }
332 #[inline]
333 fn tokenize(&self) -> Self::Token<'_> {
334 ()
335 }
336 #[inline]
337 fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
338 <Self::Parameters<
339 '_,
340 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
341 .map(Self::new)
342 }
343 }
344 };
345 #[derive(serde::Serialize, serde::Deserialize)]
346 #[derive(Default, Debug, PartialEq, Eq, Hash)]
347 #[allow(
352 non_camel_case_types,
353 non_snake_case,
354 clippy::pub_underscore_fields,
355 clippy::style
356 )]
357 #[derive(Clone)]
358 pub struct RewardsClaimed {
359 #[allow(missing_docs)]
360 pub user: alloy::sol_types::private::Address,
361 #[allow(missing_docs)]
362 pub amount: alloy::sol_types::private::primitives::aliases::U256,
363 }
364 #[allow(
365 non_camel_case_types,
366 non_snake_case,
367 clippy::pub_underscore_fields,
368 clippy::style
369 )]
370 const _: () = {
371 use alloy::sol_types as alloy_sol_types;
372 #[automatically_derived]
373 impl alloy_sol_types::SolEvent for RewardsClaimed {
374 type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
375 type DataToken<'a> = <Self::DataTuple<
376 'a,
377 > as alloy_sol_types::SolType>::Token<'a>;
378 type TopicList = (
379 alloy_sol_types::sol_data::FixedBytes<32>,
380 alloy::sol_types::sol_data::Address,
381 );
382 const SIGNATURE: &'static str = "RewardsClaimed(address,uint256)";
383 const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
384 252u8, 48u8, 205u8, 222u8, 163u8, 142u8, 43u8, 244u8, 214u8, 234u8,
385 125u8, 63u8, 158u8, 211u8, 182u8, 173u8, 127u8, 23u8, 100u8, 25u8, 244u8,
386 150u8, 59u8, 216u8, 19u8, 24u8, 6u8, 122u8, 74u8, 238u8, 115u8, 254u8,
387 ]);
388 const ANONYMOUS: bool = false;
389 #[allow(unused_variables)]
390 #[inline]
391 fn new(
392 topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
393 data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
394 ) -> Self {
395 Self {
396 user: topics.1,
397 amount: data.0,
398 }
399 }
400 #[inline]
401 fn check_signature(
402 topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
403 ) -> alloy_sol_types::Result<()> {
404 if topics.0 != Self::SIGNATURE_HASH {
405 return Err(
406 alloy_sol_types::Error::invalid_event_signature_hash(
407 Self::SIGNATURE,
408 topics.0,
409 Self::SIGNATURE_HASH,
410 ),
411 );
412 }
413 Ok(())
414 }
415 #[inline]
416 fn tokenize_body(&self) -> Self::DataToken<'_> {
417 (
418 <alloy::sol_types::sol_data::Uint<
419 256,
420 > as alloy_sol_types::SolType>::tokenize(&self.amount),
421 )
422 }
423 #[inline]
424 fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
425 (Self::SIGNATURE_HASH.into(), self.user.clone())
426 }
427 #[inline]
428 fn encode_topics_raw(
429 &self,
430 out: &mut [alloy_sol_types::abi::token::WordToken],
431 ) -> alloy_sol_types::Result<()> {
432 if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
433 return Err(alloy_sol_types::Error::Overrun);
434 }
435 out[0usize] = alloy_sol_types::abi::token::WordToken(
436 Self::SIGNATURE_HASH,
437 );
438 out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
439 &self.user,
440 );
441 Ok(())
442 }
443 }
444 #[automatically_derived]
445 impl alloy_sol_types::private::IntoLogData for RewardsClaimed {
446 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
447 From::from(self)
448 }
449 fn into_log_data(self) -> alloy_sol_types::private::LogData {
450 From::from(&self)
451 }
452 }
453 #[automatically_derived]
454 impl From<&RewardsClaimed> for alloy_sol_types::private::LogData {
455 #[inline]
456 fn from(this: &RewardsClaimed) -> alloy_sol_types::private::LogData {
457 alloy_sol_types::SolEvent::encode_log_data(this)
458 }
459 }
460 };
461 #[derive(serde::Serialize, serde::Deserialize)]
462 #[derive(Default, Debug, PartialEq, Eq, Hash)]
463 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
468 #[derive(Clone)]
469 pub struct claimRewardsCall {
470 #[allow(missing_docs)]
471 pub lifetimeRewards: alloy::sol_types::private::primitives::aliases::U256,
472 #[allow(missing_docs)]
473 pub authData: alloy::sol_types::private::Bytes,
474 }
475 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
477 #[derive(Clone)]
478 pub struct claimRewardsReturn {}
479 #[allow(
480 non_camel_case_types,
481 non_snake_case,
482 clippy::pub_underscore_fields,
483 clippy::style
484 )]
485 const _: () = {
486 use alloy::sol_types as alloy_sol_types;
487 {
488 #[doc(hidden)]
489 #[allow(dead_code)]
490 type UnderlyingSolTuple<'a> = (
491 alloy::sol_types::sol_data::Uint<256>,
492 alloy::sol_types::sol_data::Bytes,
493 );
494 #[doc(hidden)]
495 type UnderlyingRustTuple<'a> = (
496 alloy::sol_types::private::primitives::aliases::U256,
497 alloy::sol_types::private::Bytes,
498 );
499 #[cfg(test)]
500 #[allow(dead_code, unreachable_patterns)]
501 fn _type_assertion(
502 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
503 ) {
504 match _t {
505 alloy_sol_types::private::AssertTypeEq::<
506 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
507 >(_) => {}
508 }
509 }
510 #[automatically_derived]
511 #[doc(hidden)]
512 impl ::core::convert::From<claimRewardsCall> for UnderlyingRustTuple<'_> {
513 fn from(value: claimRewardsCall) -> Self {
514 (value.lifetimeRewards, value.authData)
515 }
516 }
517 #[automatically_derived]
518 #[doc(hidden)]
519 impl ::core::convert::From<UnderlyingRustTuple<'_>> for claimRewardsCall {
520 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
521 Self {
522 lifetimeRewards: tuple.0,
523 authData: tuple.1,
524 }
525 }
526 }
527 }
528 {
529 #[doc(hidden)]
530 #[allow(dead_code)]
531 type UnderlyingSolTuple<'a> = ();
532 #[doc(hidden)]
533 type UnderlyingRustTuple<'a> = ();
534 #[cfg(test)]
535 #[allow(dead_code, unreachable_patterns)]
536 fn _type_assertion(
537 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
538 ) {
539 match _t {
540 alloy_sol_types::private::AssertTypeEq::<
541 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
542 >(_) => {}
543 }
544 }
545 #[automatically_derived]
546 #[doc(hidden)]
547 impl ::core::convert::From<claimRewardsReturn> for UnderlyingRustTuple<'_> {
548 fn from(value: claimRewardsReturn) -> Self {
549 ()
550 }
551 }
552 #[automatically_derived]
553 #[doc(hidden)]
554 impl ::core::convert::From<UnderlyingRustTuple<'_>> for claimRewardsReturn {
555 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
556 Self {}
557 }
558 }
559 }
560 impl claimRewardsReturn {
561 fn _tokenize(
562 &self,
563 ) -> <claimRewardsCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
564 ()
565 }
566 }
567 #[automatically_derived]
568 impl alloy_sol_types::SolCall for claimRewardsCall {
569 type Parameters<'a> = (
570 alloy::sol_types::sol_data::Uint<256>,
571 alloy::sol_types::sol_data::Bytes,
572 );
573 type Token<'a> = <Self::Parameters<
574 'a,
575 > as alloy_sol_types::SolType>::Token<'a>;
576 type Return = claimRewardsReturn;
577 type ReturnTuple<'a> = ();
578 type ReturnToken<'a> = <Self::ReturnTuple<
579 'a,
580 > as alloy_sol_types::SolType>::Token<'a>;
581 const SIGNATURE: &'static str = "claimRewards(uint256,bytes)";
582 const SELECTOR: [u8; 4] = [84u8, 157u8, 216u8, 195u8];
583 #[inline]
584 fn new<'a>(
585 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
586 ) -> Self {
587 tuple.into()
588 }
589 #[inline]
590 fn tokenize(&self) -> Self::Token<'_> {
591 (
592 <alloy::sol_types::sol_data::Uint<
593 256,
594 > as alloy_sol_types::SolType>::tokenize(&self.lifetimeRewards),
595 <alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
596 &self.authData,
597 ),
598 )
599 }
600 #[inline]
601 fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
602 claimRewardsReturn::_tokenize(ret)
603 }
604 #[inline]
605 fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
606 <Self::ReturnTuple<
607 '_,
608 > as alloy_sol_types::SolType>::abi_decode_sequence(data)
609 .map(Into::into)
610 }
611 #[inline]
612 fn abi_decode_returns_validate(
613 data: &[u8],
614 ) -> alloy_sol_types::Result<Self::Return> {
615 <Self::ReturnTuple<
616 '_,
617 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
618 .map(Into::into)
619 }
620 }
621 };
622 #[derive(serde::Serialize, serde::Deserialize)]
623 #[derive(Default, Debug, PartialEq, Eq, Hash)]
624 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
629 #[derive(Clone)]
630 pub struct claimedRewardsCall {
631 #[allow(missing_docs)]
632 pub claimer: alloy::sol_types::private::Address,
633 }
634 #[derive(serde::Serialize, serde::Deserialize)]
635 #[derive(Default, Debug, PartialEq, Eq, Hash)]
636 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
638 #[derive(Clone)]
639 pub struct claimedRewardsReturn {
640 #[allow(missing_docs)]
641 pub _0: alloy::sol_types::private::primitives::aliases::U256,
642 }
643 #[allow(
644 non_camel_case_types,
645 non_snake_case,
646 clippy::pub_underscore_fields,
647 clippy::style
648 )]
649 const _: () = {
650 use alloy::sol_types as alloy_sol_types;
651 {
652 #[doc(hidden)]
653 #[allow(dead_code)]
654 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
655 #[doc(hidden)]
656 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
657 #[cfg(test)]
658 #[allow(dead_code, unreachable_patterns)]
659 fn _type_assertion(
660 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
661 ) {
662 match _t {
663 alloy_sol_types::private::AssertTypeEq::<
664 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
665 >(_) => {}
666 }
667 }
668 #[automatically_derived]
669 #[doc(hidden)]
670 impl ::core::convert::From<claimedRewardsCall> for UnderlyingRustTuple<'_> {
671 fn from(value: claimedRewardsCall) -> Self {
672 (value.claimer,)
673 }
674 }
675 #[automatically_derived]
676 #[doc(hidden)]
677 impl ::core::convert::From<UnderlyingRustTuple<'_>> for claimedRewardsCall {
678 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
679 Self { claimer: tuple.0 }
680 }
681 }
682 }
683 {
684 #[doc(hidden)]
685 #[allow(dead_code)]
686 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
687 #[doc(hidden)]
688 type UnderlyingRustTuple<'a> = (
689 alloy::sol_types::private::primitives::aliases::U256,
690 );
691 #[cfg(test)]
692 #[allow(dead_code, unreachable_patterns)]
693 fn _type_assertion(
694 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
695 ) {
696 match _t {
697 alloy_sol_types::private::AssertTypeEq::<
698 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
699 >(_) => {}
700 }
701 }
702 #[automatically_derived]
703 #[doc(hidden)]
704 impl ::core::convert::From<claimedRewardsReturn>
705 for UnderlyingRustTuple<'_> {
706 fn from(value: claimedRewardsReturn) -> Self {
707 (value._0,)
708 }
709 }
710 #[automatically_derived]
711 #[doc(hidden)]
712 impl ::core::convert::From<UnderlyingRustTuple<'_>>
713 for claimedRewardsReturn {
714 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
715 Self { _0: tuple.0 }
716 }
717 }
718 }
719 #[automatically_derived]
720 impl alloy_sol_types::SolCall for claimedRewardsCall {
721 type Parameters<'a> = (alloy::sol_types::sol_data::Address,);
722 type Token<'a> = <Self::Parameters<
723 'a,
724 > as alloy_sol_types::SolType>::Token<'a>;
725 type Return = alloy::sol_types::private::primitives::aliases::U256;
726 type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
727 type ReturnToken<'a> = <Self::ReturnTuple<
728 'a,
729 > as alloy_sol_types::SolType>::Token<'a>;
730 const SIGNATURE: &'static str = "claimedRewards(address)";
731 const SELECTOR: [u8; 4] = [189u8, 131u8, 67u8, 69u8];
732 #[inline]
733 fn new<'a>(
734 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
735 ) -> Self {
736 tuple.into()
737 }
738 #[inline]
739 fn tokenize(&self) -> Self::Token<'_> {
740 (
741 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
742 &self.claimer,
743 ),
744 )
745 }
746 #[inline]
747 fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
748 (
749 <alloy::sol_types::sol_data::Uint<
750 256,
751 > as alloy_sol_types::SolType>::tokenize(ret),
752 )
753 }
754 #[inline]
755 fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
756 <Self::ReturnTuple<
757 '_,
758 > as alloy_sol_types::SolType>::abi_decode_sequence(data)
759 .map(|r| {
760 let r: claimedRewardsReturn = r.into();
761 r._0
762 })
763 }
764 #[inline]
765 fn abi_decode_returns_validate(
766 data: &[u8],
767 ) -> alloy_sol_types::Result<Self::Return> {
768 <Self::ReturnTuple<
769 '_,
770 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
771 .map(|r| {
772 let r: claimedRewardsReturn = r.into();
773 r._0
774 })
775 }
776 }
777 };
778 #[derive(serde::Serialize, serde::Deserialize)]
780 #[derive()]
781 pub enum IRewardClaimCalls {
782 #[allow(missing_docs)]
783 claimRewards(claimRewardsCall),
784 #[allow(missing_docs)]
785 claimedRewards(claimedRewardsCall),
786 }
787 #[automatically_derived]
788 impl IRewardClaimCalls {
789 pub const SELECTORS: &'static [[u8; 4usize]] = &[
796 [84u8, 157u8, 216u8, 195u8],
797 [189u8, 131u8, 67u8, 69u8],
798 ];
799 }
800 #[automatically_derived]
801 impl alloy_sol_types::SolInterface for IRewardClaimCalls {
802 const NAME: &'static str = "IRewardClaimCalls";
803 const MIN_DATA_LENGTH: usize = 32usize;
804 const COUNT: usize = 2usize;
805 #[inline]
806 fn selector(&self) -> [u8; 4] {
807 match self {
808 Self::claimRewards(_) => {
809 <claimRewardsCall as alloy_sol_types::SolCall>::SELECTOR
810 }
811 Self::claimedRewards(_) => {
812 <claimedRewardsCall as alloy_sol_types::SolCall>::SELECTOR
813 }
814 }
815 }
816 #[inline]
817 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
818 Self::SELECTORS.get(i).copied()
819 }
820 #[inline]
821 fn valid_selector(selector: [u8; 4]) -> bool {
822 Self::SELECTORS.binary_search(&selector).is_ok()
823 }
824 #[inline]
825 #[allow(non_snake_case)]
826 fn abi_decode_raw(
827 selector: [u8; 4],
828 data: &[u8],
829 ) -> alloy_sol_types::Result<Self> {
830 static DECODE_SHIMS: &[fn(
831 &[u8],
832 ) -> alloy_sol_types::Result<IRewardClaimCalls>] = &[
833 {
834 fn claimRewards(
835 data: &[u8],
836 ) -> alloy_sol_types::Result<IRewardClaimCalls> {
837 <claimRewardsCall as alloy_sol_types::SolCall>::abi_decode_raw(
838 data,
839 )
840 .map(IRewardClaimCalls::claimRewards)
841 }
842 claimRewards
843 },
844 {
845 fn claimedRewards(
846 data: &[u8],
847 ) -> alloy_sol_types::Result<IRewardClaimCalls> {
848 <claimedRewardsCall as alloy_sol_types::SolCall>::abi_decode_raw(
849 data,
850 )
851 .map(IRewardClaimCalls::claimedRewards)
852 }
853 claimedRewards
854 },
855 ];
856 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
857 return Err(
858 alloy_sol_types::Error::unknown_selector(
859 <Self as alloy_sol_types::SolInterface>::NAME,
860 selector,
861 ),
862 );
863 };
864 DECODE_SHIMS[idx](data)
865 }
866 #[inline]
867 #[allow(non_snake_case)]
868 fn abi_decode_raw_validate(
869 selector: [u8; 4],
870 data: &[u8],
871 ) -> alloy_sol_types::Result<Self> {
872 static DECODE_VALIDATE_SHIMS: &[fn(
873 &[u8],
874 ) -> alloy_sol_types::Result<IRewardClaimCalls>] = &[
875 {
876 fn claimRewards(
877 data: &[u8],
878 ) -> alloy_sol_types::Result<IRewardClaimCalls> {
879 <claimRewardsCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
880 data,
881 )
882 .map(IRewardClaimCalls::claimRewards)
883 }
884 claimRewards
885 },
886 {
887 fn claimedRewards(
888 data: &[u8],
889 ) -> alloy_sol_types::Result<IRewardClaimCalls> {
890 <claimedRewardsCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
891 data,
892 )
893 .map(IRewardClaimCalls::claimedRewards)
894 }
895 claimedRewards
896 },
897 ];
898 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
899 return Err(
900 alloy_sol_types::Error::unknown_selector(
901 <Self as alloy_sol_types::SolInterface>::NAME,
902 selector,
903 ),
904 );
905 };
906 DECODE_VALIDATE_SHIMS[idx](data)
907 }
908 #[inline]
909 fn abi_encoded_size(&self) -> usize {
910 match self {
911 Self::claimRewards(inner) => {
912 <claimRewardsCall as alloy_sol_types::SolCall>::abi_encoded_size(
913 inner,
914 )
915 }
916 Self::claimedRewards(inner) => {
917 <claimedRewardsCall as alloy_sol_types::SolCall>::abi_encoded_size(
918 inner,
919 )
920 }
921 }
922 }
923 #[inline]
924 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
925 match self {
926 Self::claimRewards(inner) => {
927 <claimRewardsCall as alloy_sol_types::SolCall>::abi_encode_raw(
928 inner,
929 out,
930 )
931 }
932 Self::claimedRewards(inner) => {
933 <claimedRewardsCall as alloy_sol_types::SolCall>::abi_encode_raw(
934 inner,
935 out,
936 )
937 }
938 }
939 }
940 }
941 #[derive(serde::Serialize, serde::Deserialize)]
943 #[derive(Debug, PartialEq, Eq, Hash)]
944 pub enum IRewardClaimErrors {
945 #[allow(missing_docs)]
946 AlreadyClaimed(AlreadyClaimed),
947 #[allow(missing_docs)]
948 InvalidAuthRoot(InvalidAuthRoot),
949 #[allow(missing_docs)]
950 InvalidRewardAmount(InvalidRewardAmount),
951 }
952 #[automatically_derived]
953 impl IRewardClaimErrors {
954 pub const SELECTORS: &'static [[u8; 4usize]] = &[
961 [50u8, 139u8, 136u8, 120u8],
962 [56u8, 83u8, 152u8, 101u8],
963 [100u8, 108u8, 245u8, 88u8],
964 ];
965 }
966 #[automatically_derived]
967 impl alloy_sol_types::SolInterface for IRewardClaimErrors {
968 const NAME: &'static str = "IRewardClaimErrors";
969 const MIN_DATA_LENGTH: usize = 0usize;
970 const COUNT: usize = 3usize;
971 #[inline]
972 fn selector(&self) -> [u8; 4] {
973 match self {
974 Self::AlreadyClaimed(_) => {
975 <AlreadyClaimed as alloy_sol_types::SolError>::SELECTOR
976 }
977 Self::InvalidAuthRoot(_) => {
978 <InvalidAuthRoot as alloy_sol_types::SolError>::SELECTOR
979 }
980 Self::InvalidRewardAmount(_) => {
981 <InvalidRewardAmount as alloy_sol_types::SolError>::SELECTOR
982 }
983 }
984 }
985 #[inline]
986 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
987 Self::SELECTORS.get(i).copied()
988 }
989 #[inline]
990 fn valid_selector(selector: [u8; 4]) -> bool {
991 Self::SELECTORS.binary_search(&selector).is_ok()
992 }
993 #[inline]
994 #[allow(non_snake_case)]
995 fn abi_decode_raw(
996 selector: [u8; 4],
997 data: &[u8],
998 ) -> alloy_sol_types::Result<Self> {
999 static DECODE_SHIMS: &[fn(
1000 &[u8],
1001 ) -> alloy_sol_types::Result<IRewardClaimErrors>] = &[
1002 {
1003 fn InvalidAuthRoot(
1004 data: &[u8],
1005 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1006 <InvalidAuthRoot as alloy_sol_types::SolError>::abi_decode_raw(
1007 data,
1008 )
1009 .map(IRewardClaimErrors::InvalidAuthRoot)
1010 }
1011 InvalidAuthRoot
1012 },
1013 {
1014 fn InvalidRewardAmount(
1015 data: &[u8],
1016 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1017 <InvalidRewardAmount as alloy_sol_types::SolError>::abi_decode_raw(
1018 data,
1019 )
1020 .map(IRewardClaimErrors::InvalidRewardAmount)
1021 }
1022 InvalidRewardAmount
1023 },
1024 {
1025 fn AlreadyClaimed(
1026 data: &[u8],
1027 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1028 <AlreadyClaimed as alloy_sol_types::SolError>::abi_decode_raw(
1029 data,
1030 )
1031 .map(IRewardClaimErrors::AlreadyClaimed)
1032 }
1033 AlreadyClaimed
1034 },
1035 ];
1036 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
1037 return Err(
1038 alloy_sol_types::Error::unknown_selector(
1039 <Self as alloy_sol_types::SolInterface>::NAME,
1040 selector,
1041 ),
1042 );
1043 };
1044 DECODE_SHIMS[idx](data)
1045 }
1046 #[inline]
1047 #[allow(non_snake_case)]
1048 fn abi_decode_raw_validate(
1049 selector: [u8; 4],
1050 data: &[u8],
1051 ) -> alloy_sol_types::Result<Self> {
1052 static DECODE_VALIDATE_SHIMS: &[fn(
1053 &[u8],
1054 ) -> alloy_sol_types::Result<IRewardClaimErrors>] = &[
1055 {
1056 fn InvalidAuthRoot(
1057 data: &[u8],
1058 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1059 <InvalidAuthRoot as alloy_sol_types::SolError>::abi_decode_raw_validate(
1060 data,
1061 )
1062 .map(IRewardClaimErrors::InvalidAuthRoot)
1063 }
1064 InvalidAuthRoot
1065 },
1066 {
1067 fn InvalidRewardAmount(
1068 data: &[u8],
1069 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1070 <InvalidRewardAmount as alloy_sol_types::SolError>::abi_decode_raw_validate(
1071 data,
1072 )
1073 .map(IRewardClaimErrors::InvalidRewardAmount)
1074 }
1075 InvalidRewardAmount
1076 },
1077 {
1078 fn AlreadyClaimed(
1079 data: &[u8],
1080 ) -> alloy_sol_types::Result<IRewardClaimErrors> {
1081 <AlreadyClaimed as alloy_sol_types::SolError>::abi_decode_raw_validate(
1082 data,
1083 )
1084 .map(IRewardClaimErrors::AlreadyClaimed)
1085 }
1086 AlreadyClaimed
1087 },
1088 ];
1089 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
1090 return Err(
1091 alloy_sol_types::Error::unknown_selector(
1092 <Self as alloy_sol_types::SolInterface>::NAME,
1093 selector,
1094 ),
1095 );
1096 };
1097 DECODE_VALIDATE_SHIMS[idx](data)
1098 }
1099 #[inline]
1100 fn abi_encoded_size(&self) -> usize {
1101 match self {
1102 Self::AlreadyClaimed(inner) => {
1103 <AlreadyClaimed as alloy_sol_types::SolError>::abi_encoded_size(
1104 inner,
1105 )
1106 }
1107 Self::InvalidAuthRoot(inner) => {
1108 <InvalidAuthRoot as alloy_sol_types::SolError>::abi_encoded_size(
1109 inner,
1110 )
1111 }
1112 Self::InvalidRewardAmount(inner) => {
1113 <InvalidRewardAmount as alloy_sol_types::SolError>::abi_encoded_size(
1114 inner,
1115 )
1116 }
1117 }
1118 }
1119 #[inline]
1120 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
1121 match self {
1122 Self::AlreadyClaimed(inner) => {
1123 <AlreadyClaimed as alloy_sol_types::SolError>::abi_encode_raw(
1124 inner,
1125 out,
1126 )
1127 }
1128 Self::InvalidAuthRoot(inner) => {
1129 <InvalidAuthRoot as alloy_sol_types::SolError>::abi_encode_raw(
1130 inner,
1131 out,
1132 )
1133 }
1134 Self::InvalidRewardAmount(inner) => {
1135 <InvalidRewardAmount as alloy_sol_types::SolError>::abi_encode_raw(
1136 inner,
1137 out,
1138 )
1139 }
1140 }
1141 }
1142 }
1143 #[derive(serde::Serialize, serde::Deserialize)]
1145 #[derive(Debug, PartialEq, Eq, Hash)]
1146 pub enum IRewardClaimEvents {
1147 #[allow(missing_docs)]
1148 RewardsClaimed(RewardsClaimed),
1149 }
1150 #[automatically_derived]
1151 impl IRewardClaimEvents {
1152 pub const SELECTORS: &'static [[u8; 32usize]] = &[
1159 [
1160 252u8, 48u8, 205u8, 222u8, 163u8, 142u8, 43u8, 244u8, 214u8, 234u8,
1161 125u8, 63u8, 158u8, 211u8, 182u8, 173u8, 127u8, 23u8, 100u8, 25u8, 244u8,
1162 150u8, 59u8, 216u8, 19u8, 24u8, 6u8, 122u8, 74u8, 238u8, 115u8, 254u8,
1163 ],
1164 ];
1165 }
1166 #[automatically_derived]
1167 impl alloy_sol_types::SolEventInterface for IRewardClaimEvents {
1168 const NAME: &'static str = "IRewardClaimEvents";
1169 const COUNT: usize = 1usize;
1170 fn decode_raw_log(
1171 topics: &[alloy_sol_types::Word],
1172 data: &[u8],
1173 ) -> alloy_sol_types::Result<Self> {
1174 match topics.first().copied() {
1175 Some(<RewardsClaimed as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
1176 <RewardsClaimed as alloy_sol_types::SolEvent>::decode_raw_log(
1177 topics,
1178 data,
1179 )
1180 .map(Self::RewardsClaimed)
1181 }
1182 _ => {
1183 alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
1184 name: <Self as alloy_sol_types::SolEventInterface>::NAME,
1185 log: alloy_sol_types::private::Box::new(
1186 alloy_sol_types::private::LogData::new_unchecked(
1187 topics.to_vec(),
1188 data.to_vec().into(),
1189 ),
1190 ),
1191 })
1192 }
1193 }
1194 }
1195 }
1196 #[automatically_derived]
1197 impl alloy_sol_types::private::IntoLogData for IRewardClaimEvents {
1198 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
1199 match self {
1200 Self::RewardsClaimed(inner) => {
1201 alloy_sol_types::private::IntoLogData::to_log_data(inner)
1202 }
1203 }
1204 }
1205 fn into_log_data(self) -> alloy_sol_types::private::LogData {
1206 match self {
1207 Self::RewardsClaimed(inner) => {
1208 alloy_sol_types::private::IntoLogData::into_log_data(inner)
1209 }
1210 }
1211 }
1212 }
1213 use alloy::contract as alloy_contract;
1214 #[inline]
1218 pub const fn new<
1219 P: alloy_contract::private::Provider<N>,
1220 N: alloy_contract::private::Network,
1221 >(
1222 address: alloy_sol_types::private::Address,
1223 __provider: P,
1224 ) -> IRewardClaimInstance<P, N> {
1225 IRewardClaimInstance::<P, N>::new(address, __provider)
1226 }
1227 #[inline]
1233 pub fn deploy<
1234 P: alloy_contract::private::Provider<N>,
1235 N: alloy_contract::private::Network,
1236 >(
1237 __provider: P,
1238 ) -> impl ::core::future::Future<
1239 Output = alloy_contract::Result<IRewardClaimInstance<P, N>>,
1240 > {
1241 IRewardClaimInstance::<P, N>::deploy(__provider)
1242 }
1243 #[inline]
1249 pub fn deploy_builder<
1250 P: alloy_contract::private::Provider<N>,
1251 N: alloy_contract::private::Network,
1252 >(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
1253 IRewardClaimInstance::<P, N>::deploy_builder(__provider)
1254 }
1255 #[derive(Clone)]
1267 pub struct IRewardClaimInstance<P, N = alloy_contract::private::Ethereum> {
1268 address: alloy_sol_types::private::Address,
1269 provider: P,
1270 _network: ::core::marker::PhantomData<N>,
1271 }
1272 #[automatically_derived]
1273 impl<P, N> ::core::fmt::Debug for IRewardClaimInstance<P, N> {
1274 #[inline]
1275 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1276 f.debug_tuple("IRewardClaimInstance").field(&self.address).finish()
1277 }
1278 }
1279 #[automatically_derived]
1281 impl<
1282 P: alloy_contract::private::Provider<N>,
1283 N: alloy_contract::private::Network,
1284 > IRewardClaimInstance<P, N> {
1285 #[inline]
1289 pub const fn new(
1290 address: alloy_sol_types::private::Address,
1291 __provider: P,
1292 ) -> Self {
1293 Self {
1294 address,
1295 provider: __provider,
1296 _network: ::core::marker::PhantomData,
1297 }
1298 }
1299 #[inline]
1305 pub async fn deploy(
1306 __provider: P,
1307 ) -> alloy_contract::Result<IRewardClaimInstance<P, N>> {
1308 let call_builder = Self::deploy_builder(__provider);
1309 let contract_address = call_builder.deploy().await?;
1310 Ok(Self::new(contract_address, call_builder.provider))
1311 }
1312 #[inline]
1318 pub fn deploy_builder(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
1319 alloy_contract::RawCallBuilder::new_raw_deploy(
1320 __provider,
1321 ::core::clone::Clone::clone(&BYTECODE),
1322 )
1323 }
1324 #[inline]
1326 pub const fn address(&self) -> &alloy_sol_types::private::Address {
1327 &self.address
1328 }
1329 #[inline]
1331 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
1332 self.address = address;
1333 }
1334 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
1336 self.set_address(address);
1337 self
1338 }
1339 #[inline]
1341 pub const fn provider(&self) -> &P {
1342 &self.provider
1343 }
1344 }
1345 impl<P: ::core::clone::Clone, N> IRewardClaimInstance<&P, N> {
1346 #[inline]
1348 pub fn with_cloned_provider(self) -> IRewardClaimInstance<P, N> {
1349 IRewardClaimInstance {
1350 address: self.address,
1351 provider: ::core::clone::Clone::clone(&self.provider),
1352 _network: ::core::marker::PhantomData,
1353 }
1354 }
1355 }
1356 #[automatically_derived]
1358 impl<
1359 P: alloy_contract::private::Provider<N>,
1360 N: alloy_contract::private::Network,
1361 > IRewardClaimInstance<P, N> {
1362 pub fn call_builder<C: alloy_sol_types::SolCall>(
1367 &self,
1368 call: &C,
1369 ) -> alloy_contract::SolCallBuilder<&P, C, N> {
1370 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
1371 }
1372 pub fn claimRewards(
1374 &self,
1375 lifetimeRewards: alloy::sol_types::private::primitives::aliases::U256,
1376 authData: alloy::sol_types::private::Bytes,
1377 ) -> alloy_contract::SolCallBuilder<&P, claimRewardsCall, N> {
1378 self.call_builder(
1379 &claimRewardsCall {
1380 lifetimeRewards,
1381 authData,
1382 },
1383 )
1384 }
1385 pub fn claimedRewards(
1387 &self,
1388 claimer: alloy::sol_types::private::Address,
1389 ) -> alloy_contract::SolCallBuilder<&P, claimedRewardsCall, N> {
1390 self.call_builder(&claimedRewardsCall { claimer })
1391 }
1392 }
1393 #[automatically_derived]
1395 impl<
1396 P: alloy_contract::private::Provider<N>,
1397 N: alloy_contract::private::Network,
1398 > IRewardClaimInstance<P, N> {
1399 pub fn event_filter<E: alloy_sol_types::SolEvent>(
1404 &self,
1405 ) -> alloy_contract::Event<&P, E, N> {
1406 alloy_contract::Event::new_sol(&self.provider, &self.address)
1407 }
1408 pub fn RewardsClaimed_filter(
1410 &self,
1411 ) -> alloy_contract::Event<&P, RewardsClaimed, N> {
1412 self.event_filter::<RewardsClaimed>()
1413 }
1414 }
1415}