#[allow(non_camel_case_types, non_snake_case, clippy::style)]
pub mod IERC20 {
use super::*;
use alloy::sol_types as alloy_sol_types;
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
#[derive(Clone)]
pub struct Approval {
#[allow(missing_docs)]
pub owner: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub spender: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub value: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for Approval {
type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type DataToken<'a> = <Self::DataTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (
alloy_sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
);
const SIGNATURE: &'static str = "Approval(address,address,uint256)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 =
alloy_sol_types::private::B256::new([
140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8,
125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8,
91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8,
]);
const ANONYMOUS: bool = false;
#[allow(unused_variables)]
#[inline]
fn new(
topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
) -> Self {
Self {
owner: topics.1,
spender: topics.2,
value: data.0,
}
}
#[inline]
fn check_signature(
topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
) -> alloy_sol_types::Result<()> {
if topics.0 != Self::SIGNATURE_HASH {
return Err(alloy_sol_types::Error::invalid_event_signature_hash(
Self::SIGNATURE,
topics.0,
Self::SIGNATURE_HASH,
));
}
Ok(())
}
#[inline]
fn tokenize_body(&self) -> Self::DataToken<'_> {
(
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.value,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(
Self::SIGNATURE_HASH.into(),
self.owner.clone(),
self.spender.clone(),
)
}
#[inline]
fn encode_topics_raw(
&self,
out: &mut [alloy_sol_types::abi::token::WordToken],
) -> alloy_sol_types::Result<()> {
if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
return Err(alloy_sol_types::Error::Overrun);
}
out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH);
out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.owner,
);
out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.spender,
);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for Approval {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
From::from(self)
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
From::from(&self)
}
}
#[automatically_derived]
impl From<&Approval> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &Approval) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
#[derive(Clone)]
pub struct Transfer {
#[allow(missing_docs)]
pub from: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub to: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub value: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for Transfer {
type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type DataToken<'a> = <Self::DataTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (
alloy_sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
);
const SIGNATURE: &'static str = "Transfer(address,address,uint256)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 =
alloy_sol_types::private::B256::new([
221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8,
104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8,
161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8,
]);
const ANONYMOUS: bool = false;
#[allow(unused_variables)]
#[inline]
fn new(
topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
) -> Self {
Self {
from: topics.1,
to: topics.2,
value: data.0,
}
}
#[inline]
fn check_signature(
topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
) -> alloy_sol_types::Result<()> {
if topics.0 != Self::SIGNATURE_HASH {
return Err(alloy_sol_types::Error::invalid_event_signature_hash(
Self::SIGNATURE,
topics.0,
Self::SIGNATURE_HASH,
));
}
Ok(())
}
#[inline]
fn tokenize_body(&self) -> Self::DataToken<'_> {
(
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.value,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(
Self::SIGNATURE_HASH.into(),
self.from.clone(),
self.to.clone(),
)
}
#[inline]
fn encode_topics_raw(
&self,
out: &mut [alloy_sol_types::abi::token::WordToken],
) -> alloy_sol_types::Result<()> {
if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
return Err(alloy_sol_types::Error::Overrun);
}
out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH);
out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.from,
);
out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.to,
);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for Transfer {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
From::from(self)
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
From::from(&self)
}
}
#[automatically_derived]
impl From<&Transfer> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &Transfer) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct allowanceCall {
pub owner: alloy::sol_types::private::Address,
pub spender: alloy::sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct allowanceReturn {
pub _0: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::Address,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<allowanceCall> for UnderlyingRustTuple<'_> {
fn from(value: allowanceCall) -> Self {
(value.owner, value.spender)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for allowanceCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
owner: tuple.0,
spender: tuple.1,
}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<allowanceReturn> for UnderlyingRustTuple<'_> {
fn from(value: allowanceReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for allowanceReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for allowanceCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = allowanceReturn;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "allowance(address,address)";
const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.owner,
),
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.spender,
),
)
}
#[inline]
fn abi_decode_returns(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(
data, validate,
)
.map(Into::into)
}
}
};
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct approveCall {
pub spender: alloy::sol_types::private::Address,
pub amount: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct approveReturn {
pub _0: bool,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<approveCall> for UnderlyingRustTuple<'_> {
fn from(value: approveCall) -> Self {
(value.spender, value.amount)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for approveCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
spender: tuple.0,
amount: tuple.1,
}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (bool,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<approveReturn> for UnderlyingRustTuple<'_> {
fn from(value: approveReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for approveReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for approveCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = approveReturn;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "approve(address,uint256)";
const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.spender,
),
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.amount,
),
)
}
#[inline]
fn abi_decode_returns(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(
data, validate,
)
.map(Into::into)
}
}
};
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct balanceOfCall {
pub account: alloy::sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct balanceOfReturn {
pub _0: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<balanceOfCall> for UnderlyingRustTuple<'_> {
fn from(value: balanceOfCall) -> Self {
(value.account,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for balanceOfCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { account: tuple.0 }
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<balanceOfReturn> for UnderlyingRustTuple<'_> {
fn from(value: balanceOfReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for balanceOfReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for balanceOfCall {
type Parameters<'a> = (alloy::sol_types::sol_data::Address,);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = balanceOfReturn;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "balanceOf(address)";
const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.account,
),
)
}
#[inline]
fn abi_decode_returns(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(
data, validate,
)
.map(Into::into)
}
}
};
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct totalSupplyCall {}
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct totalSupplyReturn {
pub _0: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<totalSupplyCall> for UnderlyingRustTuple<'_> {
fn from(value: totalSupplyCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for totalSupplyCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<totalSupplyReturn> for UnderlyingRustTuple<'_> {
fn from(value: totalSupplyReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for totalSupplyReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for totalSupplyCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = totalSupplyReturn;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "totalSupply()";
const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[inline]
fn abi_decode_returns(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(
data, validate,
)
.map(Into::into)
}
}
};
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct transferCall {
pub to: alloy::sol_types::private::Address,
pub amount: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct transferReturn {
pub _0: bool,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<transferCall> for UnderlyingRustTuple<'_> {
fn from(value: transferCall) -> Self {
(value.to, value.amount)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
to: tuple.0,
amount: tuple.1,
}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (bool,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<transferReturn> for UnderlyingRustTuple<'_> {
fn from(value: transferReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for transferCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = transferReturn;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "transfer(address,uint256)";
const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.to,
),
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.amount,
),
)
}
#[inline]
fn abi_decode_returns(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(
data, validate,
)
.map(Into::into)
}
}
};
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct transferFromCall {
pub from: alloy::sol_types::private::Address,
pub to: alloy::sol_types::private::Address,
pub amount: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct transferFromReturn {
pub _0: bool,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<transferFromCall> for UnderlyingRustTuple<'_> {
fn from(value: transferFromCall) -> Self {
(value.from, value.to, value.amount)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferFromCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
from: tuple.0,
to: tuple.1,
amount: tuple.2,
}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (bool,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<transferFromReturn> for UnderlyingRustTuple<'_> {
fn from(value: transferFromReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferFromReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for transferFromCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = transferFromReturn;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "transferFrom(address,address,uint256)";
const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.from,
),
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.to,
),
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.amount,
),
)
}
#[inline]
fn abi_decode_returns(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(
data, validate,
)
.map(Into::into)
}
}
};
pub enum IERC20Calls {
allowance(allowanceCall),
approve(approveCall),
balanceOf(balanceOfCall),
totalSupply(totalSupplyCall),
transfer(transferCall),
transferFrom(transferFromCall),
}
#[automatically_derived]
impl IERC20Calls {
pub const SELECTORS: &'static [[u8; 4usize]] = &[
[9u8, 94u8, 167u8, 179u8],
[24u8, 22u8, 13u8, 221u8],
[35u8, 184u8, 114u8, 221u8],
[112u8, 160u8, 130u8, 49u8],
[169u8, 5u8, 156u8, 187u8],
[221u8, 98u8, 237u8, 62u8],
];
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for IERC20Calls {
const NAME: &'static str = "IERC20Calls";
const MIN_DATA_LENGTH: usize = 0usize;
const COUNT: usize = 6usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::allowance(_) => <allowanceCall as alloy_sol_types::SolCall>::SELECTOR,
Self::approve(_) => <approveCall as alloy_sol_types::SolCall>::SELECTOR,
Self::balanceOf(_) => <balanceOfCall as alloy_sol_types::SolCall>::SELECTOR,
Self::totalSupply(_) => <totalSupplyCall as alloy_sol_types::SolCall>::SELECTOR,
Self::transfer(_) => <transferCall as alloy_sol_types::SolCall>::SELECTOR,
Self::transferFrom(_) => <transferFromCall as alloy_sol_types::SolCall>::SELECTOR,
}
}
#[inline]
fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
Self::SELECTORS.get(i).copied()
}
#[inline]
fn valid_selector(selector: [u8; 4]) -> bool {
Self::SELECTORS.binary_search(&selector).is_ok()
}
#[inline]
#[allow(unsafe_code, non_snake_case)]
fn abi_decode_raw(
selector: [u8; 4],
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result<IERC20Calls>] = &[
{
fn approve(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<IERC20Calls> {
<approveCall as alloy_sol_types::SolCall>::abi_decode_raw(data, validate)
.map(IERC20Calls::approve)
}
approve
},
{
fn totalSupply(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<IERC20Calls> {
<totalSupplyCall as alloy_sol_types::SolCall>::abi_decode_raw(
data, validate,
)
.map(IERC20Calls::totalSupply)
}
totalSupply
},
{
fn transferFrom(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<IERC20Calls> {
<transferFromCall as alloy_sol_types::SolCall>::abi_decode_raw(
data, validate,
)
.map(IERC20Calls::transferFrom)
}
transferFrom
},
{
fn balanceOf(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<IERC20Calls> {
<balanceOfCall as alloy_sol_types::SolCall>::abi_decode_raw(data, validate)
.map(IERC20Calls::balanceOf)
}
balanceOf
},
{
fn transfer(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<IERC20Calls> {
<transferCall as alloy_sol_types::SolCall>::abi_decode_raw(data, validate)
.map(IERC20Calls::transfer)
}
transfer
},
{
fn allowance(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<IERC20Calls> {
<allowanceCall as alloy_sol_types::SolCall>::abi_decode_raw(data, validate)
.map(IERC20Calls::allowance)
}
allowance
},
];
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
return Err(alloy_sol_types::Error::unknown_selector(
<Self as alloy_sol_types::SolInterface>::NAME,
selector,
));
};
(unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate)
}
#[inline]
fn abi_encoded_size(&self) -> usize {
match self {
Self::allowance(inner) => {
<allowanceCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::approve(inner) => {
<approveCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::balanceOf(inner) => {
<balanceOfCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::totalSupply(inner) => {
<totalSupplyCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::transfer(inner) => {
<transferCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::transferFrom(inner) => {
<transferFromCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
}
}
#[inline]
fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
match self {
Self::allowance(inner) => {
<allowanceCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::approve(inner) => {
<approveCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::balanceOf(inner) => {
<balanceOfCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::totalSupply(inner) => {
<totalSupplyCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::transfer(inner) => {
<transferCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::transferFrom(inner) => {
<transferFromCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
}
}
}
pub enum IERC20Events {
Approval(Approval),
Transfer(Transfer),
}
#[automatically_derived]
impl IERC20Events {
pub const SELECTORS: &'static [[u8; 32usize]] = &[
[
140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8,
125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8,
32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8,
],
[
221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8,
252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8,
40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8,
],
];
}
#[automatically_derived]
impl alloy_sol_types::SolEventInterface for IERC20Events {
const NAME: &'static str = "IERC20Events";
const COUNT: usize = 2usize;
fn decode_raw_log(
topics: &[alloy_sol_types::Word],
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self> {
match topics.first().copied() {
Some(<Approval as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<Approval as alloy_sol_types::SolEvent>::decode_raw_log(topics, data, validate)
.map(Self::Approval)
}
Some(<Transfer as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<Transfer as alloy_sol_types::SolEvent>::decode_raw_log(topics, data, validate)
.map(Self::Transfer)
}
_ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
name: <Self as alloy_sol_types::SolEventInterface>::NAME,
log: alloy_sol_types::private::Box::new(
alloy_sol_types::private::LogData::new_unchecked(
topics.to_vec(),
data.to_vec().into(),
),
),
}),
}
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for IERC20Events {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner),
Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner),
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::Approval(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::Transfer(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
use alloy::contract as alloy_contract;
#[inline]
pub const fn new<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
>(
address: alloy_sol_types::private::Address,
provider: P,
) -> IERC20Instance<T, P, N> {
IERC20Instance::<T, P, N>::new(address, provider)
}
#[inline]
pub fn deploy<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
>(
provider: P,
) -> impl ::core::future::Future<Output = alloy_contract::Result<IERC20Instance<T, P, N>>> {
IERC20Instance::<T, P, N>::deploy(provider)
}
#[inline]
pub fn deploy_builder<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
>(
provider: P,
) -> alloy_contract::RawCallBuilder<T, P, N> {
IERC20Instance::<T, P, N>::deploy_builder(provider)
}
#[derive(Clone)]
pub struct IERC20Instance<T, P, N = alloy_contract::private::Ethereum> {
address: alloy_sol_types::private::Address,
provider: P,
_network_transport: ::core::marker::PhantomData<(N, T)>,
}
#[automatically_derived]
impl<T, P, N> ::core::fmt::Debug for IERC20Instance<T, P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IERC20Instance")
.field(&self.address)
.finish()
}
}
#[automatically_derived]
impl<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
> IERC20Instance<T, P, N>
{
#[inline]
pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self {
Self {
address,
provider,
_network_transport: ::core::marker::PhantomData,
}
}
#[inline]
pub async fn deploy(provider: P) -> alloy_contract::Result<IERC20Instance<T, P, N>> {
let call_builder = Self::deploy_builder(provider);
let contract_address = call_builder.deploy().await?;
Ok(Self::new(contract_address, call_builder.provider))
}
#[inline]
pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
alloy_contract::RawCallBuilder::new_raw_deploy(
provider,
::core::clone::Clone::clone(&BYTECODE),
)
}
#[inline]
pub const fn address(&self) -> &alloy_sol_types::private::Address {
&self.address
}
#[inline]
pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
self.address = address;
}
pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
self.set_address(address);
self
}
#[inline]
pub const fn provider(&self) -> &P {
&self.provider
}
}
impl<T, P: ::core::clone::Clone, N> IERC20Instance<T, &P, N> {
#[inline]
pub fn with_cloned_provider(self) -> IERC20Instance<T, P, N> {
IERC20Instance {
address: self.address,
provider: ::core::clone::Clone::clone(&self.provider),
_network_transport: ::core::marker::PhantomData,
}
}
}
#[automatically_derived]
impl<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
> IERC20Instance<T, P, N>
{
pub fn call_builder<C: alloy_sol_types::SolCall>(
&self,
call: &C,
) -> alloy_contract::SolCallBuilder<T, &P, C, N> {
alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
}
pub fn allowance(
&self,
owner: alloy::sol_types::private::Address,
spender: alloy::sol_types::private::Address,
) -> alloy_contract::SolCallBuilder<T, &P, allowanceCall, N> {
self.call_builder(&allowanceCall { owner, spender })
}
pub fn approve(
&self,
spender: alloy::sol_types::private::Address,
amount: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<T, &P, approveCall, N> {
self.call_builder(&approveCall { spender, amount })
}
pub fn balanceOf(
&self,
account: alloy::sol_types::private::Address,
) -> alloy_contract::SolCallBuilder<T, &P, balanceOfCall, N> {
self.call_builder(&balanceOfCall { account })
}
pub fn totalSupply(&self) -> alloy_contract::SolCallBuilder<T, &P, totalSupplyCall, N> {
self.call_builder(&totalSupplyCall {})
}
pub fn transfer(
&self,
to: alloy::sol_types::private::Address,
amount: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<T, &P, transferCall, N> {
self.call_builder(&transferCall { to, amount })
}
pub fn transferFrom(
&self,
from: alloy::sol_types::private::Address,
to: alloy::sol_types::private::Address,
amount: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<T, &P, transferFromCall, N> {
self.call_builder(&transferFromCall { from, to, amount })
}
}
#[automatically_derived]
impl<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
> IERC20Instance<T, P, N>
{
pub fn event_filter<E: alloy_sol_types::SolEvent>(
&self,
) -> alloy_contract::Event<T, &P, E, N> {
alloy_contract::Event::new_sol(&self.provider, &self.address)
}
pub fn Approval_filter(&self) -> alloy_contract::Event<T, &P, Approval, N> {
self.event_filter::<Approval>()
}
pub fn Transfer_filter(&self) -> alloy_contract::Event<T, &P, Transfer, N> {
self.event_filter::<Transfer>()
}
}
}