1#[allow(
207 non_camel_case_types,
208 non_snake_case,
209 clippy::pub_underscore_fields,
210 clippy::style,
211 clippy::empty_structs_with_brackets
212)]
213pub mod IERC20 {
214 use super::*;
215 use alloy::sol_types as alloy_sol_types;
216 #[rustfmt::skip]
222 #[allow(clippy::all)]
223 pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
224 b"",
225 );
226 #[rustfmt::skip]
232 #[allow(clippy::all)]
233 pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
234 b"",
235 );
236 #[allow(
241 non_camel_case_types,
242 non_snake_case,
243 clippy::pub_underscore_fields,
244 clippy::style
245 )]
246 #[derive(Clone)]
247 pub struct Approval {
248 #[allow(missing_docs)]
249 pub owner: alloy::sol_types::private::Address,
250 #[allow(missing_docs)]
251 pub spender: alloy::sol_types::private::Address,
252 #[allow(missing_docs)]
253 pub value: alloy::sol_types::private::primitives::aliases::U256,
254 }
255 #[allow(
256 non_camel_case_types,
257 non_snake_case,
258 clippy::pub_underscore_fields,
259 clippy::style
260 )]
261 const _: () = {
262 use alloy::sol_types as alloy_sol_types;
263 #[automatically_derived]
264 impl alloy_sol_types::SolEvent for Approval {
265 type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
266 type DataToken<'a> = <Self::DataTuple<
267 'a,
268 > as alloy_sol_types::SolType>::Token<'a>;
269 type TopicList = (
270 alloy_sol_types::sol_data::FixedBytes<32>,
271 alloy::sol_types::sol_data::Address,
272 alloy::sol_types::sol_data::Address,
273 );
274 const SIGNATURE: &'static str = "Approval(address,address,uint256)";
275 const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
276 140u8,
277 91u8,
278 225u8,
279 229u8,
280 235u8,
281 236u8,
282 125u8,
283 91u8,
284 209u8,
285 79u8,
286 113u8,
287 66u8,
288 125u8,
289 30u8,
290 132u8,
291 243u8,
292 221u8,
293 3u8,
294 20u8,
295 192u8,
296 247u8,
297 178u8,
298 41u8,
299 30u8,
300 91u8,
301 32u8,
302 10u8,
303 200u8,
304 199u8,
305 195u8,
306 185u8,
307 37u8,
308 ]);
309 const ANONYMOUS: bool = false;
310 #[allow(unused_variables)]
311 #[inline]
312 fn new(
313 topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
314 data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
315 ) -> Self {
316 Self {
317 owner: topics.1,
318 spender: topics.2,
319 value: data.0,
320 }
321 }
322 #[inline]
323 fn check_signature(
324 topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
325 ) -> alloy_sol_types::Result<()> {
326 if topics.0 != Self::SIGNATURE_HASH {
327 return Err(
328 alloy_sol_types::Error::invalid_event_signature_hash(
329 Self::SIGNATURE,
330 topics.0,
331 Self::SIGNATURE_HASH,
332 ),
333 );
334 }
335 Ok(())
336 }
337 #[inline]
338 fn tokenize_body(&self) -> Self::DataToken<'_> {
339 (
340 <alloy::sol_types::sol_data::Uint<
341 256,
342 > as alloy_sol_types::SolType>::tokenize(&self.value),
343 )
344 }
345 #[inline]
346 fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
347 (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone())
348 }
349 #[inline]
350 fn encode_topics_raw(
351 &self,
352 out: &mut [alloy_sol_types::abi::token::WordToken],
353 ) -> alloy_sol_types::Result<()> {
354 if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
355 return Err(alloy_sol_types::Error::Overrun);
356 }
357 out[0usize] = alloy_sol_types::abi::token::WordToken(
358 Self::SIGNATURE_HASH,
359 );
360 out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
361 &self.owner,
362 );
363 out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
364 &self.spender,
365 );
366 Ok(())
367 }
368 }
369 #[automatically_derived]
370 impl alloy_sol_types::private::IntoLogData for Approval {
371 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
372 From::from(self)
373 }
374 fn into_log_data(self) -> alloy_sol_types::private::LogData {
375 From::from(&self)
376 }
377 }
378 #[automatically_derived]
379 impl From<&Approval> for alloy_sol_types::private::LogData {
380 #[inline]
381 fn from(this: &Approval) -> alloy_sol_types::private::LogData {
382 alloy_sol_types::SolEvent::encode_log_data(this)
383 }
384 }
385 };
386 #[allow(
391 non_camel_case_types,
392 non_snake_case,
393 clippy::pub_underscore_fields,
394 clippy::style
395 )]
396 #[derive(Clone)]
397 pub struct Transfer {
398 #[allow(missing_docs)]
399 pub from: alloy::sol_types::private::Address,
400 #[allow(missing_docs)]
401 pub to: alloy::sol_types::private::Address,
402 #[allow(missing_docs)]
403 pub value: alloy::sol_types::private::primitives::aliases::U256,
404 }
405 #[allow(
406 non_camel_case_types,
407 non_snake_case,
408 clippy::pub_underscore_fields,
409 clippy::style
410 )]
411 const _: () = {
412 use alloy::sol_types as alloy_sol_types;
413 #[automatically_derived]
414 impl alloy_sol_types::SolEvent for Transfer {
415 type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
416 type DataToken<'a> = <Self::DataTuple<
417 'a,
418 > as alloy_sol_types::SolType>::Token<'a>;
419 type TopicList = (
420 alloy_sol_types::sol_data::FixedBytes<32>,
421 alloy::sol_types::sol_data::Address,
422 alloy::sol_types::sol_data::Address,
423 );
424 const SIGNATURE: &'static str = "Transfer(address,address,uint256)";
425 const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
426 221u8,
427 242u8,
428 82u8,
429 173u8,
430 27u8,
431 226u8,
432 200u8,
433 155u8,
434 105u8,
435 194u8,
436 176u8,
437 104u8,
438 252u8,
439 55u8,
440 141u8,
441 170u8,
442 149u8,
443 43u8,
444 167u8,
445 241u8,
446 99u8,
447 196u8,
448 161u8,
449 22u8,
450 40u8,
451 245u8,
452 90u8,
453 77u8,
454 245u8,
455 35u8,
456 179u8,
457 239u8,
458 ]);
459 const ANONYMOUS: bool = false;
460 #[allow(unused_variables)]
461 #[inline]
462 fn new(
463 topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
464 data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
465 ) -> Self {
466 Self {
467 from: topics.1,
468 to: topics.2,
469 value: data.0,
470 }
471 }
472 #[inline]
473 fn check_signature(
474 topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
475 ) -> alloy_sol_types::Result<()> {
476 if topics.0 != Self::SIGNATURE_HASH {
477 return Err(
478 alloy_sol_types::Error::invalid_event_signature_hash(
479 Self::SIGNATURE,
480 topics.0,
481 Self::SIGNATURE_HASH,
482 ),
483 );
484 }
485 Ok(())
486 }
487 #[inline]
488 fn tokenize_body(&self) -> Self::DataToken<'_> {
489 (
490 <alloy::sol_types::sol_data::Uint<
491 256,
492 > as alloy_sol_types::SolType>::tokenize(&self.value),
493 )
494 }
495 #[inline]
496 fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
497 (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone())
498 }
499 #[inline]
500 fn encode_topics_raw(
501 &self,
502 out: &mut [alloy_sol_types::abi::token::WordToken],
503 ) -> alloy_sol_types::Result<()> {
504 if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
505 return Err(alloy_sol_types::Error::Overrun);
506 }
507 out[0usize] = alloy_sol_types::abi::token::WordToken(
508 Self::SIGNATURE_HASH,
509 );
510 out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
511 &self.from,
512 );
513 out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
514 &self.to,
515 );
516 Ok(())
517 }
518 }
519 #[automatically_derived]
520 impl alloy_sol_types::private::IntoLogData for Transfer {
521 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
522 From::from(self)
523 }
524 fn into_log_data(self) -> alloy_sol_types::private::LogData {
525 From::from(&self)
526 }
527 }
528 #[automatically_derived]
529 impl From<&Transfer> for alloy_sol_types::private::LogData {
530 #[inline]
531 fn from(this: &Transfer) -> alloy_sol_types::private::LogData {
532 alloy_sol_types::SolEvent::encode_log_data(this)
533 }
534 }
535 };
536 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
541 #[derive(Clone)]
542 pub struct allowanceCall {
543 #[allow(missing_docs)]
544 pub owner: alloy::sol_types::private::Address,
545 #[allow(missing_docs)]
546 pub spender: alloy::sol_types::private::Address,
547 }
548 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
550 #[derive(Clone)]
551 pub struct allowanceReturn {
552 #[allow(missing_docs)]
553 pub _0: alloy::sol_types::private::primitives::aliases::U256,
554 }
555 #[allow(
556 non_camel_case_types,
557 non_snake_case,
558 clippy::pub_underscore_fields,
559 clippy::style
560 )]
561 const _: () = {
562 use alloy::sol_types as alloy_sol_types;
563 {
564 #[doc(hidden)]
565 type UnderlyingSolTuple<'a> = (
566 alloy::sol_types::sol_data::Address,
567 alloy::sol_types::sol_data::Address,
568 );
569 #[doc(hidden)]
570 type UnderlyingRustTuple<'a> = (
571 alloy::sol_types::private::Address,
572 alloy::sol_types::private::Address,
573 );
574 #[cfg(test)]
575 #[allow(dead_code, unreachable_patterns)]
576 fn _type_assertion(
577 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
578 ) {
579 match _t {
580 alloy_sol_types::private::AssertTypeEq::<
581 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
582 >(_) => {}
583 }
584 }
585 #[automatically_derived]
586 #[doc(hidden)]
587 impl ::core::convert::From<allowanceCall> for UnderlyingRustTuple<'_> {
588 fn from(value: allowanceCall) -> Self {
589 (value.owner, value.spender)
590 }
591 }
592 #[automatically_derived]
593 #[doc(hidden)]
594 impl ::core::convert::From<UnderlyingRustTuple<'_>> for allowanceCall {
595 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
596 Self {
597 owner: tuple.0,
598 spender: tuple.1,
599 }
600 }
601 }
602 }
603 {
604 #[doc(hidden)]
605 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
606 #[doc(hidden)]
607 type UnderlyingRustTuple<'a> = (
608 alloy::sol_types::private::primitives::aliases::U256,
609 );
610 #[cfg(test)]
611 #[allow(dead_code, unreachable_patterns)]
612 fn _type_assertion(
613 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
614 ) {
615 match _t {
616 alloy_sol_types::private::AssertTypeEq::<
617 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
618 >(_) => {}
619 }
620 }
621 #[automatically_derived]
622 #[doc(hidden)]
623 impl ::core::convert::From<allowanceReturn> for UnderlyingRustTuple<'_> {
624 fn from(value: allowanceReturn) -> Self {
625 (value._0,)
626 }
627 }
628 #[automatically_derived]
629 #[doc(hidden)]
630 impl ::core::convert::From<UnderlyingRustTuple<'_>> for allowanceReturn {
631 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
632 Self { _0: tuple.0 }
633 }
634 }
635 }
636 #[automatically_derived]
637 impl alloy_sol_types::SolCall for allowanceCall {
638 type Parameters<'a> = (
639 alloy::sol_types::sol_data::Address,
640 alloy::sol_types::sol_data::Address,
641 );
642 type Token<'a> = <Self::Parameters<
643 'a,
644 > as alloy_sol_types::SolType>::Token<'a>;
645 type Return = allowanceReturn;
646 type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
647 type ReturnToken<'a> = <Self::ReturnTuple<
648 'a,
649 > as alloy_sol_types::SolType>::Token<'a>;
650 const SIGNATURE: &'static str = "allowance(address,address)";
651 const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8];
652 #[inline]
653 fn new<'a>(
654 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
655 ) -> Self {
656 tuple.into()
657 }
658 #[inline]
659 fn tokenize(&self) -> Self::Token<'_> {
660 (
661 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
662 &self.owner,
663 ),
664 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
665 &self.spender,
666 ),
667 )
668 }
669 #[inline]
670 fn abi_decode_returns(
671 data: &[u8],
672 validate: bool,
673 ) -> alloy_sol_types::Result<Self::Return> {
674 <Self::ReturnTuple<
675 '_,
676 > as alloy_sol_types::SolType>::abi_decode_sequence(data, validate)
677 .map(Into::into)
678 }
679 }
680 };
681 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
686 #[derive(Clone)]
687 pub struct approveCall {
688 #[allow(missing_docs)]
689 pub spender: alloy::sol_types::private::Address,
690 #[allow(missing_docs)]
691 pub value: alloy::sol_types::private::primitives::aliases::U256,
692 }
693 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
695 #[derive(Clone)]
696 pub struct approveReturn {
697 #[allow(missing_docs)]
698 pub _0: bool,
699 }
700 #[allow(
701 non_camel_case_types,
702 non_snake_case,
703 clippy::pub_underscore_fields,
704 clippy::style
705 )]
706 const _: () = {
707 use alloy::sol_types as alloy_sol_types;
708 {
709 #[doc(hidden)]
710 type UnderlyingSolTuple<'a> = (
711 alloy::sol_types::sol_data::Address,
712 alloy::sol_types::sol_data::Uint<256>,
713 );
714 #[doc(hidden)]
715 type UnderlyingRustTuple<'a> = (
716 alloy::sol_types::private::Address,
717 alloy::sol_types::private::primitives::aliases::U256,
718 );
719 #[cfg(test)]
720 #[allow(dead_code, unreachable_patterns)]
721 fn _type_assertion(
722 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
723 ) {
724 match _t {
725 alloy_sol_types::private::AssertTypeEq::<
726 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
727 >(_) => {}
728 }
729 }
730 #[automatically_derived]
731 #[doc(hidden)]
732 impl ::core::convert::From<approveCall> for UnderlyingRustTuple<'_> {
733 fn from(value: approveCall) -> Self {
734 (value.spender, value.value)
735 }
736 }
737 #[automatically_derived]
738 #[doc(hidden)]
739 impl ::core::convert::From<UnderlyingRustTuple<'_>> for approveCall {
740 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
741 Self {
742 spender: tuple.0,
743 value: tuple.1,
744 }
745 }
746 }
747 }
748 {
749 #[doc(hidden)]
750 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
751 #[doc(hidden)]
752 type UnderlyingRustTuple<'a> = (bool,);
753 #[cfg(test)]
754 #[allow(dead_code, unreachable_patterns)]
755 fn _type_assertion(
756 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
757 ) {
758 match _t {
759 alloy_sol_types::private::AssertTypeEq::<
760 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
761 >(_) => {}
762 }
763 }
764 #[automatically_derived]
765 #[doc(hidden)]
766 impl ::core::convert::From<approveReturn> for UnderlyingRustTuple<'_> {
767 fn from(value: approveReturn) -> Self {
768 (value._0,)
769 }
770 }
771 #[automatically_derived]
772 #[doc(hidden)]
773 impl ::core::convert::From<UnderlyingRustTuple<'_>> for approveReturn {
774 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
775 Self { _0: tuple.0 }
776 }
777 }
778 }
779 #[automatically_derived]
780 impl alloy_sol_types::SolCall for approveCall {
781 type Parameters<'a> = (
782 alloy::sol_types::sol_data::Address,
783 alloy::sol_types::sol_data::Uint<256>,
784 );
785 type Token<'a> = <Self::Parameters<
786 'a,
787 > as alloy_sol_types::SolType>::Token<'a>;
788 type Return = approveReturn;
789 type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,);
790 type ReturnToken<'a> = <Self::ReturnTuple<
791 'a,
792 > as alloy_sol_types::SolType>::Token<'a>;
793 const SIGNATURE: &'static str = "approve(address,uint256)";
794 const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8];
795 #[inline]
796 fn new<'a>(
797 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
798 ) -> Self {
799 tuple.into()
800 }
801 #[inline]
802 fn tokenize(&self) -> Self::Token<'_> {
803 (
804 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
805 &self.spender,
806 ),
807 <alloy::sol_types::sol_data::Uint<
808 256,
809 > as alloy_sol_types::SolType>::tokenize(&self.value),
810 )
811 }
812 #[inline]
813 fn abi_decode_returns(
814 data: &[u8],
815 validate: bool,
816 ) -> alloy_sol_types::Result<Self::Return> {
817 <Self::ReturnTuple<
818 '_,
819 > as alloy_sol_types::SolType>::abi_decode_sequence(data, validate)
820 .map(Into::into)
821 }
822 }
823 };
824 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
829 #[derive(Clone)]
830 pub struct balanceOfCall {
831 #[allow(missing_docs)]
832 pub account: alloy::sol_types::private::Address,
833 }
834 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
836 #[derive(Clone)]
837 pub struct balanceOfReturn {
838 #[allow(missing_docs)]
839 pub _0: alloy::sol_types::private::primitives::aliases::U256,
840 }
841 #[allow(
842 non_camel_case_types,
843 non_snake_case,
844 clippy::pub_underscore_fields,
845 clippy::style
846 )]
847 const _: () = {
848 use alloy::sol_types as alloy_sol_types;
849 {
850 #[doc(hidden)]
851 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
852 #[doc(hidden)]
853 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
854 #[cfg(test)]
855 #[allow(dead_code, unreachable_patterns)]
856 fn _type_assertion(
857 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
858 ) {
859 match _t {
860 alloy_sol_types::private::AssertTypeEq::<
861 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
862 >(_) => {}
863 }
864 }
865 #[automatically_derived]
866 #[doc(hidden)]
867 impl ::core::convert::From<balanceOfCall> for UnderlyingRustTuple<'_> {
868 fn from(value: balanceOfCall) -> Self {
869 (value.account,)
870 }
871 }
872 #[automatically_derived]
873 #[doc(hidden)]
874 impl ::core::convert::From<UnderlyingRustTuple<'_>> for balanceOfCall {
875 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
876 Self { account: tuple.0 }
877 }
878 }
879 }
880 {
881 #[doc(hidden)]
882 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
883 #[doc(hidden)]
884 type UnderlyingRustTuple<'a> = (
885 alloy::sol_types::private::primitives::aliases::U256,
886 );
887 #[cfg(test)]
888 #[allow(dead_code, unreachable_patterns)]
889 fn _type_assertion(
890 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
891 ) {
892 match _t {
893 alloy_sol_types::private::AssertTypeEq::<
894 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
895 >(_) => {}
896 }
897 }
898 #[automatically_derived]
899 #[doc(hidden)]
900 impl ::core::convert::From<balanceOfReturn> for UnderlyingRustTuple<'_> {
901 fn from(value: balanceOfReturn) -> Self {
902 (value._0,)
903 }
904 }
905 #[automatically_derived]
906 #[doc(hidden)]
907 impl ::core::convert::From<UnderlyingRustTuple<'_>> for balanceOfReturn {
908 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
909 Self { _0: tuple.0 }
910 }
911 }
912 }
913 #[automatically_derived]
914 impl alloy_sol_types::SolCall for balanceOfCall {
915 type Parameters<'a> = (alloy::sol_types::sol_data::Address,);
916 type Token<'a> = <Self::Parameters<
917 'a,
918 > as alloy_sol_types::SolType>::Token<'a>;
919 type Return = balanceOfReturn;
920 type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
921 type ReturnToken<'a> = <Self::ReturnTuple<
922 'a,
923 > as alloy_sol_types::SolType>::Token<'a>;
924 const SIGNATURE: &'static str = "balanceOf(address)";
925 const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8];
926 #[inline]
927 fn new<'a>(
928 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
929 ) -> Self {
930 tuple.into()
931 }
932 #[inline]
933 fn tokenize(&self) -> Self::Token<'_> {
934 (
935 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
936 &self.account,
937 ),
938 )
939 }
940 #[inline]
941 fn abi_decode_returns(
942 data: &[u8],
943 validate: bool,
944 ) -> alloy_sol_types::Result<Self::Return> {
945 <Self::ReturnTuple<
946 '_,
947 > as alloy_sol_types::SolType>::abi_decode_sequence(data, validate)
948 .map(Into::into)
949 }
950 }
951 };
952 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
957 #[derive(Clone)]
958 pub struct totalSupplyCall {}
959 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
961 #[derive(Clone)]
962 pub struct totalSupplyReturn {
963 #[allow(missing_docs)]
964 pub _0: alloy::sol_types::private::primitives::aliases::U256,
965 }
966 #[allow(
967 non_camel_case_types,
968 non_snake_case,
969 clippy::pub_underscore_fields,
970 clippy::style
971 )]
972 const _: () = {
973 use alloy::sol_types as alloy_sol_types;
974 {
975 #[doc(hidden)]
976 type UnderlyingSolTuple<'a> = ();
977 #[doc(hidden)]
978 type UnderlyingRustTuple<'a> = ();
979 #[cfg(test)]
980 #[allow(dead_code, unreachable_patterns)]
981 fn _type_assertion(
982 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
983 ) {
984 match _t {
985 alloy_sol_types::private::AssertTypeEq::<
986 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
987 >(_) => {}
988 }
989 }
990 #[automatically_derived]
991 #[doc(hidden)]
992 impl ::core::convert::From<totalSupplyCall> for UnderlyingRustTuple<'_> {
993 fn from(value: totalSupplyCall) -> Self {
994 ()
995 }
996 }
997 #[automatically_derived]
998 #[doc(hidden)]
999 impl ::core::convert::From<UnderlyingRustTuple<'_>> for totalSupplyCall {
1000 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
1001 Self {}
1002 }
1003 }
1004 }
1005 {
1006 #[doc(hidden)]
1007 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
1008 #[doc(hidden)]
1009 type UnderlyingRustTuple<'a> = (
1010 alloy::sol_types::private::primitives::aliases::U256,
1011 );
1012 #[cfg(test)]
1013 #[allow(dead_code, unreachable_patterns)]
1014 fn _type_assertion(
1015 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
1016 ) {
1017 match _t {
1018 alloy_sol_types::private::AssertTypeEq::<
1019 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
1020 >(_) => {}
1021 }
1022 }
1023 #[automatically_derived]
1024 #[doc(hidden)]
1025 impl ::core::convert::From<totalSupplyReturn> for UnderlyingRustTuple<'_> {
1026 fn from(value: totalSupplyReturn) -> Self {
1027 (value._0,)
1028 }
1029 }
1030 #[automatically_derived]
1031 #[doc(hidden)]
1032 impl ::core::convert::From<UnderlyingRustTuple<'_>> for totalSupplyReturn {
1033 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
1034 Self { _0: tuple.0 }
1035 }
1036 }
1037 }
1038 #[automatically_derived]
1039 impl alloy_sol_types::SolCall for totalSupplyCall {
1040 type Parameters<'a> = ();
1041 type Token<'a> = <Self::Parameters<
1042 'a,
1043 > as alloy_sol_types::SolType>::Token<'a>;
1044 type Return = totalSupplyReturn;
1045 type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
1046 type ReturnToken<'a> = <Self::ReturnTuple<
1047 'a,
1048 > as alloy_sol_types::SolType>::Token<'a>;
1049 const SIGNATURE: &'static str = "totalSupply()";
1050 const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8];
1051 #[inline]
1052 fn new<'a>(
1053 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
1054 ) -> Self {
1055 tuple.into()
1056 }
1057 #[inline]
1058 fn tokenize(&self) -> Self::Token<'_> {
1059 ()
1060 }
1061 #[inline]
1062 fn abi_decode_returns(
1063 data: &[u8],
1064 validate: bool,
1065 ) -> alloy_sol_types::Result<Self::Return> {
1066 <Self::ReturnTuple<
1067 '_,
1068 > as alloy_sol_types::SolType>::abi_decode_sequence(data, validate)
1069 .map(Into::into)
1070 }
1071 }
1072 };
1073 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
1078 #[derive(Clone)]
1079 pub struct transferCall {
1080 #[allow(missing_docs)]
1081 pub to: alloy::sol_types::private::Address,
1082 #[allow(missing_docs)]
1083 pub value: alloy::sol_types::private::primitives::aliases::U256,
1084 }
1085 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
1087 #[derive(Clone)]
1088 pub struct transferReturn {
1089 #[allow(missing_docs)]
1090 pub _0: bool,
1091 }
1092 #[allow(
1093 non_camel_case_types,
1094 non_snake_case,
1095 clippy::pub_underscore_fields,
1096 clippy::style
1097 )]
1098 const _: () = {
1099 use alloy::sol_types as alloy_sol_types;
1100 {
1101 #[doc(hidden)]
1102 type UnderlyingSolTuple<'a> = (
1103 alloy::sol_types::sol_data::Address,
1104 alloy::sol_types::sol_data::Uint<256>,
1105 );
1106 #[doc(hidden)]
1107 type UnderlyingRustTuple<'a> = (
1108 alloy::sol_types::private::Address,
1109 alloy::sol_types::private::primitives::aliases::U256,
1110 );
1111 #[cfg(test)]
1112 #[allow(dead_code, unreachable_patterns)]
1113 fn _type_assertion(
1114 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
1115 ) {
1116 match _t {
1117 alloy_sol_types::private::AssertTypeEq::<
1118 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
1119 >(_) => {}
1120 }
1121 }
1122 #[automatically_derived]
1123 #[doc(hidden)]
1124 impl ::core::convert::From<transferCall> for UnderlyingRustTuple<'_> {
1125 fn from(value: transferCall) -> Self {
1126 (value.to, value.value)
1127 }
1128 }
1129 #[automatically_derived]
1130 #[doc(hidden)]
1131 impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferCall {
1132 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
1133 Self {
1134 to: tuple.0,
1135 value: tuple.1,
1136 }
1137 }
1138 }
1139 }
1140 {
1141 #[doc(hidden)]
1142 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
1143 #[doc(hidden)]
1144 type UnderlyingRustTuple<'a> = (bool,);
1145 #[cfg(test)]
1146 #[allow(dead_code, unreachable_patterns)]
1147 fn _type_assertion(
1148 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
1149 ) {
1150 match _t {
1151 alloy_sol_types::private::AssertTypeEq::<
1152 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
1153 >(_) => {}
1154 }
1155 }
1156 #[automatically_derived]
1157 #[doc(hidden)]
1158 impl ::core::convert::From<transferReturn> for UnderlyingRustTuple<'_> {
1159 fn from(value: transferReturn) -> Self {
1160 (value._0,)
1161 }
1162 }
1163 #[automatically_derived]
1164 #[doc(hidden)]
1165 impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferReturn {
1166 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
1167 Self { _0: tuple.0 }
1168 }
1169 }
1170 }
1171 #[automatically_derived]
1172 impl alloy_sol_types::SolCall for transferCall {
1173 type Parameters<'a> = (
1174 alloy::sol_types::sol_data::Address,
1175 alloy::sol_types::sol_data::Uint<256>,
1176 );
1177 type Token<'a> = <Self::Parameters<
1178 'a,
1179 > as alloy_sol_types::SolType>::Token<'a>;
1180 type Return = transferReturn;
1181 type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,);
1182 type ReturnToken<'a> = <Self::ReturnTuple<
1183 'a,
1184 > as alloy_sol_types::SolType>::Token<'a>;
1185 const SIGNATURE: &'static str = "transfer(address,uint256)";
1186 const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8];
1187 #[inline]
1188 fn new<'a>(
1189 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
1190 ) -> Self {
1191 tuple.into()
1192 }
1193 #[inline]
1194 fn tokenize(&self) -> Self::Token<'_> {
1195 (
1196 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
1197 &self.to,
1198 ),
1199 <alloy::sol_types::sol_data::Uint<
1200 256,
1201 > as alloy_sol_types::SolType>::tokenize(&self.value),
1202 )
1203 }
1204 #[inline]
1205 fn abi_decode_returns(
1206 data: &[u8],
1207 validate: bool,
1208 ) -> alloy_sol_types::Result<Self::Return> {
1209 <Self::ReturnTuple<
1210 '_,
1211 > as alloy_sol_types::SolType>::abi_decode_sequence(data, validate)
1212 .map(Into::into)
1213 }
1214 }
1215 };
1216 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
1221 #[derive(Clone)]
1222 pub struct transferFromCall {
1223 #[allow(missing_docs)]
1224 pub from: alloy::sol_types::private::Address,
1225 #[allow(missing_docs)]
1226 pub to: alloy::sol_types::private::Address,
1227 #[allow(missing_docs)]
1228 pub value: alloy::sol_types::private::primitives::aliases::U256,
1229 }
1230 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
1232 #[derive(Clone)]
1233 pub struct transferFromReturn {
1234 #[allow(missing_docs)]
1235 pub _0: bool,
1236 }
1237 #[allow(
1238 non_camel_case_types,
1239 non_snake_case,
1240 clippy::pub_underscore_fields,
1241 clippy::style
1242 )]
1243 const _: () = {
1244 use alloy::sol_types as alloy_sol_types;
1245 {
1246 #[doc(hidden)]
1247 type UnderlyingSolTuple<'a> = (
1248 alloy::sol_types::sol_data::Address,
1249 alloy::sol_types::sol_data::Address,
1250 alloy::sol_types::sol_data::Uint<256>,
1251 );
1252 #[doc(hidden)]
1253 type UnderlyingRustTuple<'a> = (
1254 alloy::sol_types::private::Address,
1255 alloy::sol_types::private::Address,
1256 alloy::sol_types::private::primitives::aliases::U256,
1257 );
1258 #[cfg(test)]
1259 #[allow(dead_code, unreachable_patterns)]
1260 fn _type_assertion(
1261 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
1262 ) {
1263 match _t {
1264 alloy_sol_types::private::AssertTypeEq::<
1265 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
1266 >(_) => {}
1267 }
1268 }
1269 #[automatically_derived]
1270 #[doc(hidden)]
1271 impl ::core::convert::From<transferFromCall> for UnderlyingRustTuple<'_> {
1272 fn from(value: transferFromCall) -> Self {
1273 (value.from, value.to, value.value)
1274 }
1275 }
1276 #[automatically_derived]
1277 #[doc(hidden)]
1278 impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferFromCall {
1279 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
1280 Self {
1281 from: tuple.0,
1282 to: tuple.1,
1283 value: tuple.2,
1284 }
1285 }
1286 }
1287 }
1288 {
1289 #[doc(hidden)]
1290 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
1291 #[doc(hidden)]
1292 type UnderlyingRustTuple<'a> = (bool,);
1293 #[cfg(test)]
1294 #[allow(dead_code, unreachable_patterns)]
1295 fn _type_assertion(
1296 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
1297 ) {
1298 match _t {
1299 alloy_sol_types::private::AssertTypeEq::<
1300 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
1301 >(_) => {}
1302 }
1303 }
1304 #[automatically_derived]
1305 #[doc(hidden)]
1306 impl ::core::convert::From<transferFromReturn> for UnderlyingRustTuple<'_> {
1307 fn from(value: transferFromReturn) -> Self {
1308 (value._0,)
1309 }
1310 }
1311 #[automatically_derived]
1312 #[doc(hidden)]
1313 impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferFromReturn {
1314 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
1315 Self { _0: tuple.0 }
1316 }
1317 }
1318 }
1319 #[automatically_derived]
1320 impl alloy_sol_types::SolCall for transferFromCall {
1321 type Parameters<'a> = (
1322 alloy::sol_types::sol_data::Address,
1323 alloy::sol_types::sol_data::Address,
1324 alloy::sol_types::sol_data::Uint<256>,
1325 );
1326 type Token<'a> = <Self::Parameters<
1327 'a,
1328 > as alloy_sol_types::SolType>::Token<'a>;
1329 type Return = transferFromReturn;
1330 type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,);
1331 type ReturnToken<'a> = <Self::ReturnTuple<
1332 'a,
1333 > as alloy_sol_types::SolType>::Token<'a>;
1334 const SIGNATURE: &'static str = "transferFrom(address,address,uint256)";
1335 const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8];
1336 #[inline]
1337 fn new<'a>(
1338 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
1339 ) -> Self {
1340 tuple.into()
1341 }
1342 #[inline]
1343 fn tokenize(&self) -> Self::Token<'_> {
1344 (
1345 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
1346 &self.from,
1347 ),
1348 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
1349 &self.to,
1350 ),
1351 <alloy::sol_types::sol_data::Uint<
1352 256,
1353 > as alloy_sol_types::SolType>::tokenize(&self.value),
1354 )
1355 }
1356 #[inline]
1357 fn abi_decode_returns(
1358 data: &[u8],
1359 validate: bool,
1360 ) -> alloy_sol_types::Result<Self::Return> {
1361 <Self::ReturnTuple<
1362 '_,
1363 > as alloy_sol_types::SolType>::abi_decode_sequence(data, validate)
1364 .map(Into::into)
1365 }
1366 }
1367 };
1368 pub enum IERC20Calls {
1370 #[allow(missing_docs)]
1371 allowance(allowanceCall),
1372 #[allow(missing_docs)]
1373 approve(approveCall),
1374 #[allow(missing_docs)]
1375 balanceOf(balanceOfCall),
1376 #[allow(missing_docs)]
1377 totalSupply(totalSupplyCall),
1378 #[allow(missing_docs)]
1379 transfer(transferCall),
1380 #[allow(missing_docs)]
1381 transferFrom(transferFromCall),
1382 }
1383 #[automatically_derived]
1384 impl IERC20Calls {
1385 pub const SELECTORS: &'static [[u8; 4usize]] = &[
1392 [9u8, 94u8, 167u8, 179u8],
1393 [24u8, 22u8, 13u8, 221u8],
1394 [35u8, 184u8, 114u8, 221u8],
1395 [112u8, 160u8, 130u8, 49u8],
1396 [169u8, 5u8, 156u8, 187u8],
1397 [221u8, 98u8, 237u8, 62u8],
1398 ];
1399 }
1400 #[automatically_derived]
1401 impl alloy_sol_types::SolInterface for IERC20Calls {
1402 const NAME: &'static str = "IERC20Calls";
1403 const MIN_DATA_LENGTH: usize = 0usize;
1404 const COUNT: usize = 6usize;
1405 #[inline]
1406 fn selector(&self) -> [u8; 4] {
1407 match self {
1408 Self::allowance(_) => {
1409 <allowanceCall as alloy_sol_types::SolCall>::SELECTOR
1410 }
1411 Self::approve(_) => <approveCall as alloy_sol_types::SolCall>::SELECTOR,
1412 Self::balanceOf(_) => {
1413 <balanceOfCall as alloy_sol_types::SolCall>::SELECTOR
1414 }
1415 Self::totalSupply(_) => {
1416 <totalSupplyCall as alloy_sol_types::SolCall>::SELECTOR
1417 }
1418 Self::transfer(_) => <transferCall as alloy_sol_types::SolCall>::SELECTOR,
1419 Self::transferFrom(_) => {
1420 <transferFromCall as alloy_sol_types::SolCall>::SELECTOR
1421 }
1422 }
1423 }
1424 #[inline]
1425 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
1426 Self::SELECTORS.get(i).copied()
1427 }
1428 #[inline]
1429 fn valid_selector(selector: [u8; 4]) -> bool {
1430 Self::SELECTORS.binary_search(&selector).is_ok()
1431 }
1432 #[inline]
1433 #[allow(non_snake_case)]
1434 fn abi_decode_raw(
1435 selector: [u8; 4],
1436 data: &[u8],
1437 validate: bool,
1438 ) -> alloy_sol_types::Result<Self> {
1439 static DECODE_SHIMS: &[fn(
1440 &[u8],
1441 bool,
1442 ) -> alloy_sol_types::Result<IERC20Calls>] = &[
1443 {
1444 fn approve(
1445 data: &[u8],
1446 validate: bool,
1447 ) -> alloy_sol_types::Result<IERC20Calls> {
1448 <approveCall as alloy_sol_types::SolCall>::abi_decode_raw(
1449 data,
1450 validate,
1451 )
1452 .map(IERC20Calls::approve)
1453 }
1454 approve
1455 },
1456 {
1457 fn totalSupply(
1458 data: &[u8],
1459 validate: bool,
1460 ) -> alloy_sol_types::Result<IERC20Calls> {
1461 <totalSupplyCall as alloy_sol_types::SolCall>::abi_decode_raw(
1462 data,
1463 validate,
1464 )
1465 .map(IERC20Calls::totalSupply)
1466 }
1467 totalSupply
1468 },
1469 {
1470 fn transferFrom(
1471 data: &[u8],
1472 validate: bool,
1473 ) -> alloy_sol_types::Result<IERC20Calls> {
1474 <transferFromCall as alloy_sol_types::SolCall>::abi_decode_raw(
1475 data,
1476 validate,
1477 )
1478 .map(IERC20Calls::transferFrom)
1479 }
1480 transferFrom
1481 },
1482 {
1483 fn balanceOf(
1484 data: &[u8],
1485 validate: bool,
1486 ) -> alloy_sol_types::Result<IERC20Calls> {
1487 <balanceOfCall as alloy_sol_types::SolCall>::abi_decode_raw(
1488 data,
1489 validate,
1490 )
1491 .map(IERC20Calls::balanceOf)
1492 }
1493 balanceOf
1494 },
1495 {
1496 fn transfer(
1497 data: &[u8],
1498 validate: bool,
1499 ) -> alloy_sol_types::Result<IERC20Calls> {
1500 <transferCall as alloy_sol_types::SolCall>::abi_decode_raw(
1501 data,
1502 validate,
1503 )
1504 .map(IERC20Calls::transfer)
1505 }
1506 transfer
1507 },
1508 {
1509 fn allowance(
1510 data: &[u8],
1511 validate: bool,
1512 ) -> alloy_sol_types::Result<IERC20Calls> {
1513 <allowanceCall as alloy_sol_types::SolCall>::abi_decode_raw(
1514 data,
1515 validate,
1516 )
1517 .map(IERC20Calls::allowance)
1518 }
1519 allowance
1520 },
1521 ];
1522 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
1523 return Err(
1524 alloy_sol_types::Error::unknown_selector(
1525 <Self as alloy_sol_types::SolInterface>::NAME,
1526 selector,
1527 ),
1528 );
1529 };
1530 DECODE_SHIMS[idx](data, validate)
1531 }
1532 #[inline]
1533 fn abi_encoded_size(&self) -> usize {
1534 match self {
1535 Self::allowance(inner) => {
1536 <allowanceCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
1537 }
1538 Self::approve(inner) => {
1539 <approveCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
1540 }
1541 Self::balanceOf(inner) => {
1542 <balanceOfCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
1543 }
1544 Self::totalSupply(inner) => {
1545 <totalSupplyCall as alloy_sol_types::SolCall>::abi_encoded_size(
1546 inner,
1547 )
1548 }
1549 Self::transfer(inner) => {
1550 <transferCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
1551 }
1552 Self::transferFrom(inner) => {
1553 <transferFromCall as alloy_sol_types::SolCall>::abi_encoded_size(
1554 inner,
1555 )
1556 }
1557 }
1558 }
1559 #[inline]
1560 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
1561 match self {
1562 Self::allowance(inner) => {
1563 <allowanceCall as alloy_sol_types::SolCall>::abi_encode_raw(
1564 inner,
1565 out,
1566 )
1567 }
1568 Self::approve(inner) => {
1569 <approveCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
1570 }
1571 Self::balanceOf(inner) => {
1572 <balanceOfCall as alloy_sol_types::SolCall>::abi_encode_raw(
1573 inner,
1574 out,
1575 )
1576 }
1577 Self::totalSupply(inner) => {
1578 <totalSupplyCall as alloy_sol_types::SolCall>::abi_encode_raw(
1579 inner,
1580 out,
1581 )
1582 }
1583 Self::transfer(inner) => {
1584 <transferCall as alloy_sol_types::SolCall>::abi_encode_raw(
1585 inner,
1586 out,
1587 )
1588 }
1589 Self::transferFrom(inner) => {
1590 <transferFromCall as alloy_sol_types::SolCall>::abi_encode_raw(
1591 inner,
1592 out,
1593 )
1594 }
1595 }
1596 }
1597 }
1598 pub enum IERC20Events {
1600 #[allow(missing_docs)]
1601 Approval(Approval),
1602 #[allow(missing_docs)]
1603 Transfer(Transfer),
1604 }
1605 #[automatically_derived]
1606 impl IERC20Events {
1607 pub const SELECTORS: &'static [[u8; 32usize]] = &[
1614 [
1615 140u8,
1616 91u8,
1617 225u8,
1618 229u8,
1619 235u8,
1620 236u8,
1621 125u8,
1622 91u8,
1623 209u8,
1624 79u8,
1625 113u8,
1626 66u8,
1627 125u8,
1628 30u8,
1629 132u8,
1630 243u8,
1631 221u8,
1632 3u8,
1633 20u8,
1634 192u8,
1635 247u8,
1636 178u8,
1637 41u8,
1638 30u8,
1639 91u8,
1640 32u8,
1641 10u8,
1642 200u8,
1643 199u8,
1644 195u8,
1645 185u8,
1646 37u8,
1647 ],
1648 [
1649 221u8,
1650 242u8,
1651 82u8,
1652 173u8,
1653 27u8,
1654 226u8,
1655 200u8,
1656 155u8,
1657 105u8,
1658 194u8,
1659 176u8,
1660 104u8,
1661 252u8,
1662 55u8,
1663 141u8,
1664 170u8,
1665 149u8,
1666 43u8,
1667 167u8,
1668 241u8,
1669 99u8,
1670 196u8,
1671 161u8,
1672 22u8,
1673 40u8,
1674 245u8,
1675 90u8,
1676 77u8,
1677 245u8,
1678 35u8,
1679 179u8,
1680 239u8,
1681 ],
1682 ];
1683 }
1684 #[automatically_derived]
1685 impl alloy_sol_types::SolEventInterface for IERC20Events {
1686 const NAME: &'static str = "IERC20Events";
1687 const COUNT: usize = 2usize;
1688 fn decode_raw_log(
1689 topics: &[alloy_sol_types::Word],
1690 data: &[u8],
1691 validate: bool,
1692 ) -> alloy_sol_types::Result<Self> {
1693 match topics.first().copied() {
1694 Some(<Approval as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
1695 <Approval as alloy_sol_types::SolEvent>::decode_raw_log(
1696 topics,
1697 data,
1698 validate,
1699 )
1700 .map(Self::Approval)
1701 }
1702 Some(<Transfer as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
1703 <Transfer as alloy_sol_types::SolEvent>::decode_raw_log(
1704 topics,
1705 data,
1706 validate,
1707 )
1708 .map(Self::Transfer)
1709 }
1710 _ => {
1711 alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
1712 name: <Self as alloy_sol_types::SolEventInterface>::NAME,
1713 log: alloy_sol_types::private::Box::new(
1714 alloy_sol_types::private::LogData::new_unchecked(
1715 topics.to_vec(),
1716 data.to_vec().into(),
1717 ),
1718 ),
1719 })
1720 }
1721 }
1722 }
1723 }
1724 #[automatically_derived]
1725 impl alloy_sol_types::private::IntoLogData for IERC20Events {
1726 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
1727 match self {
1728 Self::Approval(inner) => {
1729 alloy_sol_types::private::IntoLogData::to_log_data(inner)
1730 }
1731 Self::Transfer(inner) => {
1732 alloy_sol_types::private::IntoLogData::to_log_data(inner)
1733 }
1734 }
1735 }
1736 fn into_log_data(self) -> alloy_sol_types::private::LogData {
1737 match self {
1738 Self::Approval(inner) => {
1739 alloy_sol_types::private::IntoLogData::into_log_data(inner)
1740 }
1741 Self::Transfer(inner) => {
1742 alloy_sol_types::private::IntoLogData::into_log_data(inner)
1743 }
1744 }
1745 }
1746 }
1747 use alloy::contract as alloy_contract;
1748 #[inline]
1752 pub const fn new<
1753 T: alloy_contract::private::Transport + ::core::clone::Clone,
1754 P: alloy_contract::private::Provider<T, N>,
1755 N: alloy_contract::private::Network,
1756 >(
1757 address: alloy_sol_types::private::Address,
1758 provider: P,
1759 ) -> IERC20Instance<T, P, N> {
1760 IERC20Instance::<T, P, N>::new(address, provider)
1761 }
1762 #[inline]
1768 pub fn deploy<
1769 T: alloy_contract::private::Transport + ::core::clone::Clone,
1770 P: alloy_contract::private::Provider<T, N>,
1771 N: alloy_contract::private::Network,
1772 >(
1773 provider: P,
1774 ) -> impl ::core::future::Future<
1775 Output = alloy_contract::Result<IERC20Instance<T, P, N>>,
1776 > {
1777 IERC20Instance::<T, P, N>::deploy(provider)
1778 }
1779 #[inline]
1785 pub fn deploy_builder<
1786 T: alloy_contract::private::Transport + ::core::clone::Clone,
1787 P: alloy_contract::private::Provider<T, N>,
1788 N: alloy_contract::private::Network,
1789 >(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
1790 IERC20Instance::<T, P, N>::deploy_builder(provider)
1791 }
1792 #[derive(Clone)]
1804 pub struct IERC20Instance<T, P, N = alloy_contract::private::Ethereum> {
1805 address: alloy_sol_types::private::Address,
1806 provider: P,
1807 _network_transport: ::core::marker::PhantomData<(N, T)>,
1808 }
1809 #[automatically_derived]
1810 impl<T, P, N> ::core::fmt::Debug for IERC20Instance<T, P, N> {
1811 #[inline]
1812 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1813 f.debug_tuple("IERC20Instance").field(&self.address).finish()
1814 }
1815 }
1816 #[automatically_derived]
1818 impl<
1819 T: alloy_contract::private::Transport + ::core::clone::Clone,
1820 P: alloy_contract::private::Provider<T, N>,
1821 N: alloy_contract::private::Network,
1822 > IERC20Instance<T, P, N> {
1823 #[inline]
1827 pub const fn new(
1828 address: alloy_sol_types::private::Address,
1829 provider: P,
1830 ) -> Self {
1831 Self {
1832 address,
1833 provider,
1834 _network_transport: ::core::marker::PhantomData,
1835 }
1836 }
1837 #[inline]
1843 pub async fn deploy(
1844 provider: P,
1845 ) -> alloy_contract::Result<IERC20Instance<T, P, N>> {
1846 let call_builder = Self::deploy_builder(provider);
1847 let contract_address = call_builder.deploy().await?;
1848 Ok(Self::new(contract_address, call_builder.provider))
1849 }
1850 #[inline]
1856 pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
1857 alloy_contract::RawCallBuilder::new_raw_deploy(
1858 provider,
1859 ::core::clone::Clone::clone(&BYTECODE),
1860 )
1861 }
1862 #[inline]
1864 pub const fn address(&self) -> &alloy_sol_types::private::Address {
1865 &self.address
1866 }
1867 #[inline]
1869 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
1870 self.address = address;
1871 }
1872 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
1874 self.set_address(address);
1875 self
1876 }
1877 #[inline]
1879 pub const fn provider(&self) -> &P {
1880 &self.provider
1881 }
1882 }
1883 impl<T, P: ::core::clone::Clone, N> IERC20Instance<T, &P, N> {
1884 #[inline]
1886 pub fn with_cloned_provider(self) -> IERC20Instance<T, P, N> {
1887 IERC20Instance {
1888 address: self.address,
1889 provider: ::core::clone::Clone::clone(&self.provider),
1890 _network_transport: ::core::marker::PhantomData,
1891 }
1892 }
1893 }
1894 #[automatically_derived]
1896 impl<
1897 T: alloy_contract::private::Transport + ::core::clone::Clone,
1898 P: alloy_contract::private::Provider<T, N>,
1899 N: alloy_contract::private::Network,
1900 > IERC20Instance<T, P, N> {
1901 pub fn call_builder<C: alloy_sol_types::SolCall>(
1906 &self,
1907 call: &C,
1908 ) -> alloy_contract::SolCallBuilder<T, &P, C, N> {
1909 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
1910 }
1911 pub fn allowance(
1913 &self,
1914 owner: alloy::sol_types::private::Address,
1915 spender: alloy::sol_types::private::Address,
1916 ) -> alloy_contract::SolCallBuilder<T, &P, allowanceCall, N> {
1917 self.call_builder(&allowanceCall { owner, spender })
1918 }
1919 pub fn approve(
1921 &self,
1922 spender: alloy::sol_types::private::Address,
1923 value: alloy::sol_types::private::primitives::aliases::U256,
1924 ) -> alloy_contract::SolCallBuilder<T, &P, approveCall, N> {
1925 self.call_builder(&approveCall { spender, value })
1926 }
1927 pub fn balanceOf(
1929 &self,
1930 account: alloy::sol_types::private::Address,
1931 ) -> alloy_contract::SolCallBuilder<T, &P, balanceOfCall, N> {
1932 self.call_builder(&balanceOfCall { account })
1933 }
1934 pub fn totalSupply(
1936 &self,
1937 ) -> alloy_contract::SolCallBuilder<T, &P, totalSupplyCall, N> {
1938 self.call_builder(&totalSupplyCall {})
1939 }
1940 pub fn transfer(
1942 &self,
1943 to: alloy::sol_types::private::Address,
1944 value: alloy::sol_types::private::primitives::aliases::U256,
1945 ) -> alloy_contract::SolCallBuilder<T, &P, transferCall, N> {
1946 self.call_builder(&transferCall { to, value })
1947 }
1948 pub fn transferFrom(
1950 &self,
1951 from: alloy::sol_types::private::Address,
1952 to: alloy::sol_types::private::Address,
1953 value: alloy::sol_types::private::primitives::aliases::U256,
1954 ) -> alloy_contract::SolCallBuilder<T, &P, transferFromCall, N> {
1955 self.call_builder(
1956 &transferFromCall {
1957 from,
1958 to,
1959 value,
1960 },
1961 )
1962 }
1963 }
1964 #[automatically_derived]
1966 impl<
1967 T: alloy_contract::private::Transport + ::core::clone::Clone,
1968 P: alloy_contract::private::Provider<T, N>,
1969 N: alloy_contract::private::Network,
1970 > IERC20Instance<T, P, N> {
1971 pub fn event_filter<E: alloy_sol_types::SolEvent>(
1976 &self,
1977 ) -> alloy_contract::Event<T, &P, E, N> {
1978 alloy_contract::Event::new_sol(&self.provider, &self.address)
1979 }
1980 pub fn Approval_filter(&self) -> alloy_contract::Event<T, &P, Approval, N> {
1982 self.event_filter::<Approval>()
1983 }
1984 pub fn Transfer_filter(&self) -> alloy_contract::Event<T, &P, Transfer, N> {
1986 self.event_filter::<Transfer>()
1987 }
1988 }
1989}