#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style,
clippy::empty_structs_with_brackets
)]
pub mod IERC1155MetadataURI {
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"",
);
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct ApprovalForAll {
#[allow(missing_docs)]
pub account: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub operator: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub approved: bool,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for ApprovalForAll {
type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,);
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 = "ApprovalForAll(address,address,bool)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8,
69u8, 173u8, 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8,
146u8, 4u8, 137u8, 202u8, 43u8, 89u8, 55u8, 105u8, 108u8, 49u8,
]);
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 {
account: topics.1,
operator: topics.2,
approved: 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::Bool as alloy_sol_types::SolType>::tokenize(
&self.approved,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(
Self::SIGNATURE_HASH.into(),
self.account.clone(),
self.operator.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.account,
);
out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.operator,
);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for ApprovalForAll {
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<&ApprovalForAll> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct TransferBatch {
#[allow(missing_docs)]
pub operator: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub from: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub to: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub ids: alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
#[allow(missing_docs)]
pub values: alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for TransferBatch {
type DataTuple<'a> = (
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Uint<256>>,
alloy::sol_types::sol_data::Array<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,
alloy::sol_types::sol_data::Address,
);
const SIGNATURE: &'static str = "TransferBatch(address,address,address,uint256[],uint256[])";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
74u8, 57u8, 220u8, 6u8, 212u8, 192u8, 219u8, 198u8, 75u8, 112u8, 175u8,
144u8, 253u8, 105u8, 138u8, 35u8, 58u8, 81u8, 138u8, 165u8, 208u8, 126u8,
89u8, 93u8, 152u8, 59u8, 140u8, 5u8, 38u8, 200u8, 247u8, 251u8,
]);
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 {
operator: topics.1,
from: topics.2,
to: topics.3,
ids: data.0,
values: data.1,
}
}
#[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::Array<
alloy::sol_types::sol_data::Uint<256>,
> as alloy_sol_types::SolType>::tokenize(&self.ids),
<alloy::sol_types::sol_data::Array<
alloy::sol_types::sol_data::Uint<256>,
> as alloy_sol_types::SolType>::tokenize(&self.values),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(
Self::SIGNATURE_HASH.into(),
self.operator.clone(),
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.operator,
);
out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.from,
);
out[3usize] = <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 TransferBatch {
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<&TransferBatch> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &TransferBatch) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct TransferSingle {
#[allow(missing_docs)]
pub operator: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub from: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub to: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub id: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub value: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for TransferSingle {
type DataTuple<'a> = (
alloy::sol_types::sol_data::Uint<256>,
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,
alloy::sol_types::sol_data::Address,
);
const SIGNATURE: &'static str = "TransferSingle(address,address,address,uint256,uint256)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
195u8, 213u8, 129u8, 104u8, 197u8, 174u8, 115u8, 151u8, 115u8, 29u8, 6u8,
61u8, 91u8, 191u8, 61u8, 101u8, 120u8, 84u8, 66u8, 115u8, 67u8, 244u8,
192u8, 131u8, 36u8, 15u8, 122u8, 172u8, 170u8, 45u8, 15u8, 98u8,
]);
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 {
operator: topics.1,
from: topics.2,
to: topics.3,
id: data.0,
value: data.1,
}
}
#[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.id),
<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.operator.clone(),
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.operator,
);
out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.from,
);
out[3usize] = <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 TransferSingle {
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<&TransferSingle> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &TransferSingle) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct URI {
#[allow(missing_docs)]
pub value: alloy::sol_types::private::String,
#[allow(missing_docs)]
pub id: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for URI {
type DataTuple<'a> = (alloy::sol_types::sol_data::String,);
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::Uint<256>,
);
const SIGNATURE: &'static str = "URI(string,uint256)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
107u8, 183u8, 255u8, 112u8, 134u8, 25u8, 186u8, 6u8, 16u8, 203u8, 162u8,
149u8, 165u8, 133u8, 146u8, 224u8, 69u8, 29u8, 238u8, 38u8, 34u8, 147u8,
140u8, 135u8, 85u8, 102u8, 118u8, 136u8, 218u8, 243u8, 82u8, 155u8,
]);
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 {
value: data.0,
id: topics.1,
}
}
#[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::String 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.id.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::Uint<
256,
> as alloy_sol_types::EventTopic>::encode_topic(&self.id);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for URI {
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<&URI> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &URI) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct balanceOfCall {
#[allow(missing_docs)]
pub account: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub id: alloy::sol_types::private::primitives::aliases::U256,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct balanceOfReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
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<balanceOfCall> for UnderlyingRustTuple<'_> {
fn from(value: balanceOfCall) -> Self {
(value.account, value.id)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for balanceOfCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
account: tuple.0,
id: tuple.1,
}
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
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,
alloy::sol_types::sol_data::Uint<256>,
);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::primitives::aliases::U256;
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,uint256)";
const SELECTOR: [u8; 4] = [0u8, 253u8, 213u8, 142u8];
#[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,
),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.id),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(ret),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: balanceOfReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: balanceOfReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct balanceOfBatchCall {
#[allow(missing_docs)]
pub accounts: alloy::sol_types::private::Vec<alloy::sol_types::private::Address>,
#[allow(missing_docs)]
pub ids: alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct balanceOfBatchReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Address>,
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Uint<256>>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Vec<alloy::sol_types::private::Address>,
alloy::sol_types::private::Vec<
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<balanceOfBatchCall> for UnderlyingRustTuple<'_> {
fn from(value: balanceOfBatchCall) -> Self {
(value.accounts, value.ids)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for balanceOfBatchCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
accounts: tuple.0,
ids: tuple.1,
}
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Uint<256>>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Vec<
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<balanceOfBatchReturn>
for UnderlyingRustTuple<'_> {
fn from(value: balanceOfBatchReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for balanceOfBatchReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for balanceOfBatchCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Address>,
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Uint<256>>,
);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>;
type ReturnTuple<'a> = (
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Uint<256>>,
);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "balanceOfBatch(address[],uint256[])";
const SELECTOR: [u8; 4] = [78u8, 18u8, 115u8, 244u8];
#[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::Array<
alloy::sol_types::sol_data::Address,
> as alloy_sol_types::SolType>::tokenize(&self.accounts),
<alloy::sol_types::sol_data::Array<
alloy::sol_types::sol_data::Uint<256>,
> as alloy_sol_types::SolType>::tokenize(&self.ids),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Array<
alloy::sol_types::sol_data::Uint<256>,
> as alloy_sol_types::SolType>::tokenize(ret),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: balanceOfBatchReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: balanceOfBatchReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct isApprovedForAllCall {
#[allow(missing_docs)]
pub account: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub operator: alloy::sol_types::private::Address,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct isApprovedForAllReturn {
#[allow(missing_docs)]
pub _0: bool,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
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<isApprovedForAllCall>
for UnderlyingRustTuple<'_> {
fn from(value: isApprovedForAllCall) -> Self {
(value.account, value.operator)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for isApprovedForAllCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
account: tuple.0,
operator: tuple.1,
}
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
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<isApprovedForAllReturn>
for UnderlyingRustTuple<'_> {
fn from(value: isApprovedForAllReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for isApprovedForAllReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for isApprovedForAllCall {
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 = bool;
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 = "isApprovedForAll(address,address)";
const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8];
#[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,
),
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.operator,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Bool as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: isApprovedForAllReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: isApprovedForAllReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct safeBatchTransferFromCall {
#[allow(missing_docs)]
pub from: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub to: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub ids: alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
#[allow(missing_docs)]
pub values: alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
#[allow(missing_docs)]
pub data: alloy::sol_types::private::Bytes,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct safeBatchTransferFromReturn {}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Uint<256>>,
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Uint<256>>,
alloy::sol_types::sol_data::Bytes,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::Address,
alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
alloy::sol_types::private::Bytes,
);
#[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<safeBatchTransferFromCall>
for UnderlyingRustTuple<'_> {
fn from(value: safeBatchTransferFromCall) -> Self {
(value.from, value.to, value.ids, value.values, value.data)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for safeBatchTransferFromCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
from: tuple.0,
to: tuple.1,
ids: tuple.2,
values: tuple.3,
data: tuple.4,
}
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
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<safeBatchTransferFromReturn>
for UnderlyingRustTuple<'_> {
fn from(value: safeBatchTransferFromReturn) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for safeBatchTransferFromReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
impl safeBatchTransferFromReturn {
fn _tokenize(
&self,
) -> <safeBatchTransferFromCall as alloy_sol_types::SolCall>::ReturnToken<
'_,
> {
()
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for safeBatchTransferFromCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Uint<256>>,
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Uint<256>>,
alloy::sol_types::sol_data::Bytes,
);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = safeBatchTransferFromReturn;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)";
const SELECTOR: [u8; 4] = [46u8, 178u8, 194u8, 214u8];
#[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::Array<
alloy::sol_types::sol_data::Uint<256>,
> as alloy_sol_types::SolType>::tokenize(&self.ids),
<alloy::sol_types::sol_data::Array<
alloy::sol_types::sol_data::Uint<256>,
> as alloy_sol_types::SolType>::tokenize(&self.values),
<alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
&self.data,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
safeBatchTransferFromReturn::_tokenize(ret)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(Into::into)
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Into::into)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct safeTransferFromCall {
#[allow(missing_docs)]
pub from: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub to: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub id: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub value: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub data: alloy::sol_types::private::Bytes,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct safeTransferFromReturn {}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Bytes,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
alloy::sol_types::private::primitives::aliases::U256,
alloy::sol_types::private::Bytes,
);
#[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<safeTransferFromCall>
for UnderlyingRustTuple<'_> {
fn from(value: safeTransferFromCall) -> Self {
(value.from, value.to, value.id, value.value, value.data)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for safeTransferFromCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
from: tuple.0,
to: tuple.1,
id: tuple.2,
value: tuple.3,
data: tuple.4,
}
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
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<safeTransferFromReturn>
for UnderlyingRustTuple<'_> {
fn from(value: safeTransferFromReturn) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for safeTransferFromReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
impl safeTransferFromReturn {
fn _tokenize(
&self,
) -> <safeTransferFromCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
()
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for safeTransferFromCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Bytes,
);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = safeTransferFromReturn;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,uint256,bytes)";
const SELECTOR: [u8; 4] = [242u8, 66u8, 67u8, 42u8];
#[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.id),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.value),
<alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
&self.data,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
safeTransferFromReturn::_tokenize(ret)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(Into::into)
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Into::into)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct setApprovalForAllCall {
#[allow(missing_docs)]
pub operator: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub approved: bool,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct setApprovalForAllReturn {}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Bool,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, 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<setApprovalForAllCall>
for UnderlyingRustTuple<'_> {
fn from(value: setApprovalForAllCall) -> Self {
(value.operator, value.approved)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for setApprovalForAllCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
operator: tuple.0,
approved: tuple.1,
}
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
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<setApprovalForAllReturn>
for UnderlyingRustTuple<'_> {
fn from(value: setApprovalForAllReturn) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for setApprovalForAllReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
impl setApprovalForAllReturn {
fn _tokenize(
&self,
) -> <setApprovalForAllCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
()
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for setApprovalForAllCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Bool,
);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = setApprovalForAllReturn;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "setApprovalForAll(address,bool)";
const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8];
#[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.operator,
),
<alloy::sol_types::sol_data::Bool as alloy_sol_types::SolType>::tokenize(
&self.approved,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
setApprovalForAllReturn::_tokenize(ret)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(Into::into)
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Into::into)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct supportsInterfaceCall {
#[allow(missing_docs)]
pub interfaceId: alloy::sol_types::private::FixedBytes<4>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct supportsInterfaceReturn {
#[allow(missing_docs)]
pub _0: bool,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,);
#[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<supportsInterfaceCall>
for UnderlyingRustTuple<'_> {
fn from(value: supportsInterfaceCall) -> Self {
(value.interfaceId,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for supportsInterfaceCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { interfaceId: tuple.0 }
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
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<supportsInterfaceReturn>
for UnderlyingRustTuple<'_> {
fn from(value: supportsInterfaceReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for supportsInterfaceReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for supportsInterfaceCall {
type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = bool;
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 = "supportsInterface(bytes4)";
const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8];
#[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::FixedBytes<
4,
> as alloy_sol_types::SolType>::tokenize(&self.interfaceId),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Bool as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: supportsInterfaceReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: supportsInterfaceReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct uriCall {
#[allow(missing_docs)]
pub id: alloy::sol_types::private::primitives::aliases::U256,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct uriReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::String,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
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<uriCall> for UnderlyingRustTuple<'_> {
fn from(value: uriCall) -> Self {
(value.id,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for uriCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { id: tuple.0 }
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,);
#[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<uriReturn> for UnderlyingRustTuple<'_> {
fn from(value: uriReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for uriReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for uriCall {
type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::String;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "uri(uint256)";
const SELECTOR: [u8; 4] = [14u8, 137u8, 52u8, 28u8];
#[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::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.id),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: uriReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: uriReturn = r.into();
r._0
})
}
}
};
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive()]
pub enum IERC1155MetadataURICalls {
#[allow(missing_docs)]
balanceOf(balanceOfCall),
#[allow(missing_docs)]
balanceOfBatch(balanceOfBatchCall),
#[allow(missing_docs)]
isApprovedForAll(isApprovedForAllCall),
#[allow(missing_docs)]
safeBatchTransferFrom(safeBatchTransferFromCall),
#[allow(missing_docs)]
safeTransferFrom(safeTransferFromCall),
#[allow(missing_docs)]
setApprovalForAll(setApprovalForAllCall),
#[allow(missing_docs)]
supportsInterface(supportsInterfaceCall),
#[allow(missing_docs)]
uri(uriCall),
}
impl IERC1155MetadataURICalls {
pub const SELECTORS: &'static [[u8; 4usize]] = &[
[0u8, 253u8, 213u8, 142u8],
[1u8, 255u8, 201u8, 167u8],
[14u8, 137u8, 52u8, 28u8],
[46u8, 178u8, 194u8, 214u8],
[78u8, 18u8, 115u8, 244u8],
[162u8, 44u8, 180u8, 101u8],
[233u8, 133u8, 233u8, 197u8],
[242u8, 66u8, 67u8, 42u8],
];
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(balanceOf),
::core::stringify!(supportsInterface),
::core::stringify!(uri),
::core::stringify!(safeBatchTransferFrom),
::core::stringify!(balanceOfBatch),
::core::stringify!(setApprovalForAll),
::core::stringify!(isApprovedForAll),
::core::stringify!(safeTransferFrom),
];
pub const SIGNATURES: &'static [&'static str] = &[
<balanceOfCall as alloy_sol_types::SolCall>::SIGNATURE,
<supportsInterfaceCall as alloy_sol_types::SolCall>::SIGNATURE,
<uriCall as alloy_sol_types::SolCall>::SIGNATURE,
<safeBatchTransferFromCall as alloy_sol_types::SolCall>::SIGNATURE,
<balanceOfBatchCall as alloy_sol_types::SolCall>::SIGNATURE,
<setApprovalForAllCall as alloy_sol_types::SolCall>::SIGNATURE,
<isApprovedForAllCall as alloy_sol_types::SolCall>::SIGNATURE,
<safeTransferFromCall as alloy_sol_types::SolCall>::SIGNATURE,
];
#[inline]
pub fn signature_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
#[inline]
pub fn name_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for IERC1155MetadataURICalls {
const NAME: &'static str = "IERC1155MetadataURICalls";
const MIN_DATA_LENGTH: usize = 32usize;
const COUNT: usize = 8usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::balanceOf(_) => {
<balanceOfCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::balanceOfBatch(_) => {
<balanceOfBatchCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::isApprovedForAll(_) => {
<isApprovedForAllCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::safeBatchTransferFrom(_) => {
<safeBatchTransferFromCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::safeTransferFrom(_) => {
<safeTransferFromCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::setApprovalForAll(_) => {
<setApprovalForAllCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::supportsInterface(_) => {
<supportsInterfaceCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::uri(_) => <uriCall 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(non_snake_case)]
fn abi_decode_raw(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls>] = &[
{
fn balanceOf(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<balanceOfCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(IERC1155MetadataURICalls::balanceOf)
}
balanceOf
},
{
fn supportsInterface(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<supportsInterfaceCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(IERC1155MetadataURICalls::supportsInterface)
}
supportsInterface
},
{
fn uri(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<uriCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(IERC1155MetadataURICalls::uri)
}
uri
},
{
fn safeBatchTransferFrom(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<safeBatchTransferFromCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(IERC1155MetadataURICalls::safeBatchTransferFrom)
}
safeBatchTransferFrom
},
{
fn balanceOfBatch(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<balanceOfBatchCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(IERC1155MetadataURICalls::balanceOfBatch)
}
balanceOfBatch
},
{
fn setApprovalForAll(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<setApprovalForAllCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(IERC1155MetadataURICalls::setApprovalForAll)
}
setApprovalForAll
},
{
fn isApprovedForAll(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<isApprovedForAllCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(IERC1155MetadataURICalls::isApprovedForAll)
}
isApprovedForAll
},
{
fn safeTransferFrom(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<safeTransferFromCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(IERC1155MetadataURICalls::safeTransferFrom)
}
safeTransferFrom
},
];
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,
),
);
};
DECODE_SHIMS[idx](data)
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw_validate(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_VALIDATE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls>] = &[
{
fn balanceOf(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<balanceOfCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(IERC1155MetadataURICalls::balanceOf)
}
balanceOf
},
{
fn supportsInterface(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<supportsInterfaceCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(IERC1155MetadataURICalls::supportsInterface)
}
supportsInterface
},
{
fn uri(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<uriCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(IERC1155MetadataURICalls::uri)
}
uri
},
{
fn safeBatchTransferFrom(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<safeBatchTransferFromCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(IERC1155MetadataURICalls::safeBatchTransferFrom)
}
safeBatchTransferFrom
},
{
fn balanceOfBatch(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<balanceOfBatchCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(IERC1155MetadataURICalls::balanceOfBatch)
}
balanceOfBatch
},
{
fn setApprovalForAll(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<setApprovalForAllCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(IERC1155MetadataURICalls::setApprovalForAll)
}
setApprovalForAll
},
{
fn isApprovedForAll(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<isApprovedForAllCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(IERC1155MetadataURICalls::isApprovedForAll)
}
isApprovedForAll
},
{
fn safeTransferFrom(
data: &[u8],
) -> alloy_sol_types::Result<IERC1155MetadataURICalls> {
<safeTransferFromCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(IERC1155MetadataURICalls::safeTransferFrom)
}
safeTransferFrom
},
];
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,
),
);
};
DECODE_VALIDATE_SHIMS[idx](data)
}
#[inline]
fn abi_encoded_size(&self) -> usize {
match self {
Self::balanceOf(inner) => {
<balanceOfCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::balanceOfBatch(inner) => {
<balanceOfBatchCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::isApprovedForAll(inner) => {
<isApprovedForAllCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::safeBatchTransferFrom(inner) => {
<safeBatchTransferFromCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::safeTransferFrom(inner) => {
<safeTransferFromCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::setApprovalForAll(inner) => {
<setApprovalForAllCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::supportsInterface(inner) => {
<supportsInterfaceCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::uri(inner) => {
<uriCall 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::balanceOf(inner) => {
<balanceOfCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::balanceOfBatch(inner) => {
<balanceOfBatchCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::isApprovedForAll(inner) => {
<isApprovedForAllCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::safeBatchTransferFrom(inner) => {
<safeBatchTransferFromCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::safeTransferFrom(inner) => {
<safeTransferFromCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::setApprovalForAll(inner) => {
<setApprovalForAllCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::supportsInterface(inner) => {
<supportsInterfaceCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::uri(inner) => {
<uriCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
}
}
}
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Debug, PartialEq, Eq, Hash)]
pub enum IERC1155MetadataURIEvents {
#[allow(missing_docs)]
ApprovalForAll(ApprovalForAll),
#[allow(missing_docs)]
TransferBatch(TransferBatch),
#[allow(missing_docs)]
TransferSingle(TransferSingle),
#[allow(missing_docs)]
URI(URI),
}
impl IERC1155MetadataURIEvents {
pub const SELECTORS: &'static [[u8; 32usize]] = &[
[
23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8,
69u8, 173u8, 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8,
146u8, 4u8, 137u8, 202u8, 43u8, 89u8, 55u8, 105u8, 108u8, 49u8,
],
[
74u8, 57u8, 220u8, 6u8, 212u8, 192u8, 219u8, 198u8, 75u8, 112u8, 175u8,
144u8, 253u8, 105u8, 138u8, 35u8, 58u8, 81u8, 138u8, 165u8, 208u8, 126u8,
89u8, 93u8, 152u8, 59u8, 140u8, 5u8, 38u8, 200u8, 247u8, 251u8,
],
[
107u8, 183u8, 255u8, 112u8, 134u8, 25u8, 186u8, 6u8, 16u8, 203u8, 162u8,
149u8, 165u8, 133u8, 146u8, 224u8, 69u8, 29u8, 238u8, 38u8, 34u8, 147u8,
140u8, 135u8, 85u8, 102u8, 118u8, 136u8, 218u8, 243u8, 82u8, 155u8,
],
[
195u8, 213u8, 129u8, 104u8, 197u8, 174u8, 115u8, 151u8, 115u8, 29u8, 6u8,
61u8, 91u8, 191u8, 61u8, 101u8, 120u8, 84u8, 66u8, 115u8, 67u8, 244u8,
192u8, 131u8, 36u8, 15u8, 122u8, 172u8, 170u8, 45u8, 15u8, 98u8,
],
];
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(ApprovalForAll),
::core::stringify!(TransferBatch),
::core::stringify!(URI),
::core::stringify!(TransferSingle),
];
pub const SIGNATURES: &'static [&'static str] = &[
<ApprovalForAll as alloy_sol_types::SolEvent>::SIGNATURE,
<TransferBatch as alloy_sol_types::SolEvent>::SIGNATURE,
<URI as alloy_sol_types::SolEvent>::SIGNATURE,
<TransferSingle as alloy_sol_types::SolEvent>::SIGNATURE,
];
#[inline]
pub fn signature_by_selector(
selector: [u8; 32usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
#[inline]
pub fn name_by_selector(
selector: [u8; 32usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolEventInterface for IERC1155MetadataURIEvents {
const NAME: &'static str = "IERC1155MetadataURIEvents";
const COUNT: usize = 4usize;
fn decode_raw_log(
topics: &[alloy_sol_types::Word],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
match topics.first().copied() {
Some(<ApprovalForAll as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<ApprovalForAll as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
)
.map(Self::ApprovalForAll)
}
Some(<TransferBatch as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<TransferBatch as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
)
.map(Self::TransferBatch)
}
Some(<TransferSingle as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<TransferSingle as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
)
.map(Self::TransferSingle)
}
Some(<URI as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<URI as alloy_sol_types::SolEvent>::decode_raw_log(topics, data)
.map(Self::URI)
}
_ => {
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 IERC1155MetadataURIEvents {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::ApprovalForAll(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::TransferBatch(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::TransferSingle(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::URI(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::ApprovalForAll(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::TransferBatch(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::TransferSingle(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::URI(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
use alloy::contract as alloy_contract;
#[inline]
pub const fn new<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(
address: alloy_sol_types::private::Address,
__provider: P,
) -> IERC1155MetadataURIInstance<P, N> {
IERC1155MetadataURIInstance::<P, N>::new(address, __provider)
}
#[inline]
pub fn deploy<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(
__provider: P,
) -> impl ::core::future::Future<
Output = alloy_contract::Result<IERC1155MetadataURIInstance<P, N>>,
> {
IERC1155MetadataURIInstance::<P, N>::deploy(__provider)
}
#[inline]
pub fn deploy_builder<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
IERC1155MetadataURIInstance::<P, N>::deploy_builder(__provider)
}
#[derive(Clone)]
pub struct IERC1155MetadataURIInstance<P, N = alloy_contract::private::Ethereum> {
address: alloy_sol_types::private::Address,
provider: P,
_network: ::core::marker::PhantomData<N>,
}
#[automatically_derived]
impl<P, N> ::core::fmt::Debug for IERC1155MetadataURIInstance<P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IERC1155MetadataURIInstance").field(&self.address).finish()
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> IERC1155MetadataURIInstance<P, N> {
#[inline]
pub const fn new(
address: alloy_sol_types::private::Address,
__provider: P,
) -> Self {
Self {
address,
provider: __provider,
_network: ::core::marker::PhantomData,
}
}
#[inline]
pub async fn deploy(
__provider: P,
) -> alloy_contract::Result<IERC1155MetadataURIInstance<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<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<P: ::core::clone::Clone, N> IERC1155MetadataURIInstance<&P, N> {
#[inline]
pub fn with_cloned_provider(self) -> IERC1155MetadataURIInstance<P, N> {
IERC1155MetadataURIInstance {
address: self.address,
provider: ::core::clone::Clone::clone(&self.provider),
_network: ::core::marker::PhantomData,
}
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> IERC1155MetadataURIInstance<P, N> {
pub fn call_builder<C: alloy_sol_types::SolCall>(
&self,
call: &C,
) -> alloy_contract::SolCallBuilder<&P, C, N> {
alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
}
pub fn balanceOf(
&self,
account: alloy::sol_types::private::Address,
id: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> {
self.call_builder(&balanceOfCall { account, id })
}
pub fn balanceOfBatch(
&self,
accounts: alloy::sol_types::private::Vec<alloy::sol_types::private::Address>,
ids: alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
) -> alloy_contract::SolCallBuilder<&P, balanceOfBatchCall, N> {
self.call_builder(
&balanceOfBatchCall {
accounts,
ids,
},
)
}
pub fn isApprovedForAll(
&self,
account: alloy::sol_types::private::Address,
operator: alloy::sol_types::private::Address,
) -> alloy_contract::SolCallBuilder<&P, isApprovedForAllCall, N> {
self.call_builder(
&isApprovedForAllCall {
account,
operator,
},
)
}
pub fn safeBatchTransferFrom(
&self,
from: alloy::sol_types::private::Address,
to: alloy::sol_types::private::Address,
ids: alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
values: alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
data: alloy::sol_types::private::Bytes,
) -> alloy_contract::SolCallBuilder<&P, safeBatchTransferFromCall, N> {
self.call_builder(
&safeBatchTransferFromCall {
from,
to,
ids,
values,
data,
},
)
}
pub fn safeTransferFrom(
&self,
from: alloy::sol_types::private::Address,
to: alloy::sol_types::private::Address,
id: alloy::sol_types::private::primitives::aliases::U256,
value: alloy::sol_types::private::primitives::aliases::U256,
data: alloy::sol_types::private::Bytes,
) -> alloy_contract::SolCallBuilder<&P, safeTransferFromCall, N> {
self.call_builder(
&safeTransferFromCall {
from,
to,
id,
value,
data,
},
)
}
pub fn setApprovalForAll(
&self,
operator: alloy::sol_types::private::Address,
approved: bool,
) -> alloy_contract::SolCallBuilder<&P, setApprovalForAllCall, N> {
self.call_builder(
&setApprovalForAllCall {
operator,
approved,
},
)
}
pub fn supportsInterface(
&self,
interfaceId: alloy::sol_types::private::FixedBytes<4>,
) -> alloy_contract::SolCallBuilder<&P, supportsInterfaceCall, N> {
self.call_builder(
&supportsInterfaceCall {
interfaceId,
},
)
}
pub fn uri(
&self,
id: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, uriCall, N> {
self.call_builder(&uriCall { id })
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> IERC1155MetadataURIInstance<P, N> {
pub fn event_filter<E: alloy_sol_types::SolEvent>(
&self,
) -> alloy_contract::Event<&P, E, N> {
alloy_contract::Event::new_sol(&self.provider, &self.address)
}
pub fn ApprovalForAll_filter(
&self,
) -> alloy_contract::Event<&P, ApprovalForAll, N> {
self.event_filter::<ApprovalForAll>()
}
pub fn TransferBatch_filter(
&self,
) -> alloy_contract::Event<&P, TransferBatch, N> {
self.event_filter::<TransferBatch>()
}
pub fn TransferSingle_filter(
&self,
) -> alloy_contract::Event<&P, TransferSingle, N> {
self.event_filter::<TransferSingle>()
}
pub fn URI_filter(&self) -> alloy_contract::Event<&P, URI, N> {
self.event_filter::<URI>()
}
}
}