pub use erc1155::*;
#[allow(
clippy::enum_variant_names,
clippy::too_many_arguments,
clippy::upper_case_acronyms,
clippy::type_complexity,
dead_code,
non_camel_case_types,
)]
pub mod erc1155 {
#[allow(deprecated)]
fn __abi() -> ::ethers::core::abi::Abi {
::ethers::core::abi::ethabi::Contract {
constructor: ::core::option::Option::None,
functions: ::core::convert::From::from([
(
::std::borrow::ToOwned::to_owned("balanceOf"),
::std::vec![
::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("balanceOf"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("account"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("id"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
],
outputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
},
],
),
(
::std::borrow::ToOwned::to_owned("balanceOfBatch"),
::std::vec![
::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("balanceOfBatch"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("accounts"),
kind: ::ethers::core::abi::ethabi::ParamType::Array(
::std::boxed::Box::new(
::ethers::core::abi::ethabi::ParamType::Address,
),
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address[]"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("ids"),
kind: ::ethers::core::abi::ethabi::ParamType::Array(
::std::boxed::Box::new(
::ethers::core::abi::ethabi::ParamType::Uint(256usize),
),
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256[]"),
),
},
],
outputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Array(
::std::boxed::Box::new(
::ethers::core::abi::ethabi::ParamType::Uint(256usize),
),
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256[]"),
),
},
],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
},
],
),
(
::std::borrow::ToOwned::to_owned("isApprovedForAll"),
::std::vec![
::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("isApprovedForAll"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("account"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("operator"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
],
outputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Bool,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("bool"),
),
},
],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
},
],
),
(
::std::borrow::ToOwned::to_owned("safeBatchTransferFrom"),
::std::vec![
::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned(
"safeBatchTransferFrom",
),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("from"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("to"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("ids"),
kind: ::ethers::core::abi::ethabi::ParamType::Array(
::std::boxed::Box::new(
::ethers::core::abi::ethabi::ParamType::Uint(256usize),
),
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256[]"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("values"),
kind: ::ethers::core::abi::ethabi::ParamType::Array(
::std::boxed::Box::new(
::ethers::core::abi::ethabi::ParamType::Uint(256usize),
),
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256[]"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("data"),
kind: ::ethers::core::abi::ethabi::ParamType::Bytes,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("bytes"),
),
},
],
outputs: ::std::vec![],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
},
],
),
(
::std::borrow::ToOwned::to_owned("safeTransferFrom"),
::std::vec![
::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("from"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("to"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("id"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("value"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("data"),
kind: ::ethers::core::abi::ethabi::ParamType::Bytes,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("bytes"),
),
},
],
outputs: ::std::vec![],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
},
],
),
(
::std::borrow::ToOwned::to_owned("setApprovalForAll"),
::std::vec![
::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("setApprovalForAll"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("operator"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("approved"),
kind: ::ethers::core::abi::ethabi::ParamType::Bool,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("bool"),
),
},
],
outputs: ::std::vec![],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
},
],
),
(
::std::borrow::ToOwned::to_owned("supportsInterface"),
::std::vec![
::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("supportsInterface"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("interfaceId"),
kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(
4usize,
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("bytes4"),
),
},
],
outputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Bool,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("bool"),
),
},
],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
},
],
),
(
::std::borrow::ToOwned::to_owned("uri"),
::std::vec![
::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("uri"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
],
outputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::String,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("string"),
),
},
],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
},
],
),
]),
events: ::core::convert::From::from([
(
::std::borrow::ToOwned::to_owned("ApprovalForAll"),
::std::vec![
::ethers::core::abi::ethabi::Event {
name: ::std::borrow::ToOwned::to_owned("ApprovalForAll"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("account"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
indexed: true,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("operator"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
indexed: true,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("approved"),
kind: ::ethers::core::abi::ethabi::ParamType::Bool,
indexed: false,
},
],
anonymous: false,
},
],
),
(
::std::borrow::ToOwned::to_owned("TransferBatch"),
::std::vec![
::ethers::core::abi::ethabi::Event {
name: ::std::borrow::ToOwned::to_owned("TransferBatch"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("operator"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
indexed: true,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("from"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
indexed: true,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("to"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
indexed: true,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("ids"),
kind: ::ethers::core::abi::ethabi::ParamType::Array(
::std::boxed::Box::new(
::ethers::core::abi::ethabi::ParamType::Uint(256usize),
),
),
indexed: false,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("values"),
kind: ::ethers::core::abi::ethabi::ParamType::Array(
::std::boxed::Box::new(
::ethers::core::abi::ethabi::ParamType::Uint(256usize),
),
),
indexed: false,
},
],
anonymous: false,
},
],
),
(
::std::borrow::ToOwned::to_owned("TransferSingle"),
::std::vec![
::ethers::core::abi::ethabi::Event {
name: ::std::borrow::ToOwned::to_owned("TransferSingle"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("operator"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
indexed: true,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("from"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
indexed: true,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("to"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
indexed: true,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("id"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
indexed: false,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("value"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
indexed: false,
},
],
anonymous: false,
},
],
),
(
::std::borrow::ToOwned::to_owned("URI"),
::std::vec![
::ethers::core::abi::ethabi::Event {
name: ::std::borrow::ToOwned::to_owned("URI"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("value"),
kind: ::ethers::core::abi::ethabi::ParamType::String,
indexed: false,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("id"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
indexed: true,
},
],
anonymous: false,
},
],
),
]),
errors: ::core::convert::From::from([
(
::std::borrow::ToOwned::to_owned("ERC1155InsufficientBalance"),
::std::vec![
::ethers::core::abi::ethabi::AbiError {
name: ::std::borrow::ToOwned::to_owned(
"ERC1155InsufficientBalance",
),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("sender"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("balance"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("needed"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("tokenId"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
],
},
],
),
(
::std::borrow::ToOwned::to_owned("ERC1155InvalidApprover"),
::std::vec![
::ethers::core::abi::ethabi::AbiError {
name: ::std::borrow::ToOwned::to_owned(
"ERC1155InvalidApprover",
),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("approver"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
],
},
],
),
(
::std::borrow::ToOwned::to_owned("ERC1155InvalidArrayLength"),
::std::vec![
::ethers::core::abi::ethabi::AbiError {
name: ::std::borrow::ToOwned::to_owned(
"ERC1155InvalidArrayLength",
),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("idsLength"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("valuesLength"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(
256usize,
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
],
},
],
),
(
::std::borrow::ToOwned::to_owned("ERC1155InvalidOperator"),
::std::vec![
::ethers::core::abi::ethabi::AbiError {
name: ::std::borrow::ToOwned::to_owned(
"ERC1155InvalidOperator",
),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("operator"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
],
},
],
),
(
::std::borrow::ToOwned::to_owned("ERC1155InvalidReceiver"),
::std::vec![
::ethers::core::abi::ethabi::AbiError {
name: ::std::borrow::ToOwned::to_owned(
"ERC1155InvalidReceiver",
),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("receiver"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
],
},
],
),
(
::std::borrow::ToOwned::to_owned("ERC1155InvalidSender"),
::std::vec![
::ethers::core::abi::ethabi::AbiError {
name: ::std::borrow::ToOwned::to_owned(
"ERC1155InvalidSender",
),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("sender"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
],
},
],
),
(
::std::borrow::ToOwned::to_owned("ERC1155MissingApprovalForAll"),
::std::vec![
::ethers::core::abi::ethabi::AbiError {
name: ::std::borrow::ToOwned::to_owned(
"ERC1155MissingApprovalForAll",
),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("operator"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("owner"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
],
},
],
),
]),
receive: false,
fallback: false,
}
}
pub static ERC1155_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new(
__abi,
);
pub struct ERC1155<M>(::ethers::contract::Contract<M>);
impl<M> ::core::clone::Clone for ERC1155<M> {
fn clone(&self) -> Self {
Self(::core::clone::Clone::clone(&self.0))
}
}
impl<M> ::core::ops::Deref for ERC1155<M> {
type Target = ::ethers::contract::Contract<M>;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<M> ::core::ops::DerefMut for ERC1155<M> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl<M> ::core::fmt::Debug for ERC1155<M> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple(::core::stringify!(ERC1155)).field(&self.address()).finish()
}
}
impl<M: ::ethers::providers::Middleware> ERC1155<M> {
pub fn new<T: Into<::ethers::core::types::Address>>(
address: T,
client: ::std::sync::Arc<M>,
) -> Self {
Self(
::ethers::contract::Contract::new(
address.into(),
ERC1155_ABI.clone(),
client,
),
)
}
pub fn balance_of(
&self,
account: ::ethers::core::types::Address,
id: ::ethers::core::types::U256,
) -> ::ethers::contract::builders::ContractCall<M, ::ethers::core::types::U256> {
self.0
.method_hash([0, 253, 213, 142], (account, id))
.expect("method not found (this should never happen)")
}
pub fn balance_of_batch(
&self,
accounts: ::std::vec::Vec<::ethers::core::types::Address>,
ids: ::std::vec::Vec<::ethers::core::types::U256>,
) -> ::ethers::contract::builders::ContractCall<
M,
::std::vec::Vec<::ethers::core::types::U256>,
> {
self.0
.method_hash([78, 18, 115, 244], (accounts, ids))
.expect("method not found (this should never happen)")
}
pub fn is_approved_for_all(
&self,
account: ::ethers::core::types::Address,
operator: ::ethers::core::types::Address,
) -> ::ethers::contract::builders::ContractCall<M, bool> {
self.0
.method_hash([233, 133, 233, 197], (account, operator))
.expect("method not found (this should never happen)")
}
pub fn safe_batch_transfer_from(
&self,
from: ::ethers::core::types::Address,
to: ::ethers::core::types::Address,
ids: ::std::vec::Vec<::ethers::core::types::U256>,
values: ::std::vec::Vec<::ethers::core::types::U256>,
data: ::ethers::core::types::Bytes,
) -> ::ethers::contract::builders::ContractCall<M, ()> {
self.0
.method_hash([46, 178, 194, 214], (from, to, ids, values, data))
.expect("method not found (this should never happen)")
}
pub fn safe_transfer_from(
&self,
from: ::ethers::core::types::Address,
to: ::ethers::core::types::Address,
id: ::ethers::core::types::U256,
value: ::ethers::core::types::U256,
data: ::ethers::core::types::Bytes,
) -> ::ethers::contract::builders::ContractCall<M, ()> {
self.0
.method_hash([242, 66, 67, 42], (from, to, id, value, data))
.expect("method not found (this should never happen)")
}
pub fn set_approval_for_all(
&self,
operator: ::ethers::core::types::Address,
approved: bool,
) -> ::ethers::contract::builders::ContractCall<M, ()> {
self.0
.method_hash([162, 44, 180, 101], (operator, approved))
.expect("method not found (this should never happen)")
}
pub fn supports_interface(
&self,
interface_id: [u8; 4],
) -> ::ethers::contract::builders::ContractCall<M, bool> {
self.0
.method_hash([1, 255, 201, 167], interface_id)
.expect("method not found (this should never happen)")
}
pub fn uri(
&self,
p0: ::ethers::core::types::U256,
) -> ::ethers::contract::builders::ContractCall<M, ::std::string::String> {
self.0
.method_hash([14, 137, 52, 28], p0)
.expect("method not found (this should never happen)")
}
pub fn approval_for_all_filter(
&self,
) -> ::ethers::contract::builders::Event<
::std::sync::Arc<M>,
M,
ApprovalForAllFilter,
> {
self.0.event()
}
pub fn transfer_batch_filter(
&self,
) -> ::ethers::contract::builders::Event<
::std::sync::Arc<M>,
M,
TransferBatchFilter,
> {
self.0.event()
}
pub fn transfer_single_filter(
&self,
) -> ::ethers::contract::builders::Event<
::std::sync::Arc<M>,
M,
TransferSingleFilter,
> {
self.0.event()
}
pub fn uri_filter(
&self,
) -> ::ethers::contract::builders::Event<::std::sync::Arc<M>, M, UriFilter> {
self.0.event()
}
pub fn events(
&self,
) -> ::ethers::contract::builders::Event<::std::sync::Arc<M>, M, ERC1155Events> {
self.0.event_with_filter(::core::default::Default::default())
}
}
impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>>
for ERC1155<M> {
fn from(contract: ::ethers::contract::Contract<M>) -> Self {
Self::new(contract.address(), contract.client())
}
}
#[derive(
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(
name = "ERC1155InsufficientBalance",
abi = "ERC1155InsufficientBalance(address,uint256,uint256,uint256)"
)]
pub struct ERC1155InsufficientBalance {
pub sender: ::ethers::core::types::Address,
pub balance: ::ethers::core::types::U256,
pub needed: ::ethers::core::types::U256,
pub token_id: ::ethers::core::types::U256,
}
#[derive(
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(name = "ERC1155InvalidApprover", abi = "ERC1155InvalidApprover(address)")]
pub struct ERC1155InvalidApprover {
pub approver: ::ethers::core::types::Address,
}
#[derive(
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(
name = "ERC1155InvalidArrayLength",
abi = "ERC1155InvalidArrayLength(uint256,uint256)"
)]
pub struct ERC1155InvalidArrayLength {
pub ids_length: ::ethers::core::types::U256,
pub values_length: ::ethers::core::types::U256,
}
#[derive(
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(name = "ERC1155InvalidOperator", abi = "ERC1155InvalidOperator(address)")]
pub struct ERC1155InvalidOperator {
pub operator: ::ethers::core::types::Address,
}
#[derive(
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(name = "ERC1155InvalidReceiver", abi = "ERC1155InvalidReceiver(address)")]
pub struct ERC1155InvalidReceiver {
pub receiver: ::ethers::core::types::Address,
}
#[derive(
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(name = "ERC1155InvalidSender", abi = "ERC1155InvalidSender(address)")]
pub struct ERC1155InvalidSender {
pub sender: ::ethers::core::types::Address,
}
#[derive(
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(
name = "ERC1155MissingApprovalForAll",
abi = "ERC1155MissingApprovalForAll(address,address)"
)]
pub struct ERC1155MissingApprovalForAll {
pub operator: ::ethers::core::types::Address,
pub owner: ::ethers::core::types::Address,
}
#[derive(
Clone,
::ethers::contract::EthAbiType,
serde::Serialize,
serde::Deserialize,
Debug,
PartialEq,
Eq,
Hash
)]
pub enum ERC1155Errors {
ERC1155InsufficientBalance(ERC1155InsufficientBalance),
ERC1155InvalidApprover(ERC1155InvalidApprover),
ERC1155InvalidArrayLength(ERC1155InvalidArrayLength),
ERC1155InvalidOperator(ERC1155InvalidOperator),
ERC1155InvalidReceiver(ERC1155InvalidReceiver),
ERC1155InvalidSender(ERC1155InvalidSender),
ERC1155MissingApprovalForAll(ERC1155MissingApprovalForAll),
RevertString(::std::string::String),
}
impl ::ethers::core::abi::AbiDecode for ERC1155Errors {
fn decode(
data: impl AsRef<[u8]>,
) -> ::core::result::Result<Self, ::ethers::core::abi::AbiError> {
let data = data.as_ref();
if let Ok(decoded) = <::std::string::String as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::RevertString(decoded));
}
if let Ok(decoded) = <ERC1155InsufficientBalance as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::ERC1155InsufficientBalance(decoded));
}
if let Ok(decoded) = <ERC1155InvalidApprover as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::ERC1155InvalidApprover(decoded));
}
if let Ok(decoded) = <ERC1155InvalidArrayLength as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::ERC1155InvalidArrayLength(decoded));
}
if let Ok(decoded) = <ERC1155InvalidOperator as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::ERC1155InvalidOperator(decoded));
}
if let Ok(decoded) = <ERC1155InvalidReceiver as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::ERC1155InvalidReceiver(decoded));
}
if let Ok(decoded) = <ERC1155InvalidSender as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::ERC1155InvalidSender(decoded));
}
if let Ok(decoded) = <ERC1155MissingApprovalForAll as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::ERC1155MissingApprovalForAll(decoded));
}
Err(::ethers::core::abi::Error::InvalidData.into())
}
}
impl ::ethers::core::abi::AbiEncode for ERC1155Errors {
fn encode(self) -> ::std::vec::Vec<u8> {
match self {
Self::ERC1155InsufficientBalance(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::ERC1155InvalidApprover(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::ERC1155InvalidArrayLength(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::ERC1155InvalidOperator(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::ERC1155InvalidReceiver(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::ERC1155InvalidSender(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::ERC1155MissingApprovalForAll(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::RevertString(s) => ::ethers::core::abi::AbiEncode::encode(s),
}
}
}
impl ::ethers::contract::ContractRevert for ERC1155Errors {
fn valid_selector(selector: [u8; 4]) -> bool {
match selector {
[0x08, 0xc3, 0x79, 0xa0] => true,
_ if selector
== <ERC1155InsufficientBalance as ::ethers::contract::EthError>::selector() => {
true
}
_ if selector
== <ERC1155InvalidApprover as ::ethers::contract::EthError>::selector() => {
true
}
_ if selector
== <ERC1155InvalidArrayLength as ::ethers::contract::EthError>::selector() => {
true
}
_ if selector
== <ERC1155InvalidOperator as ::ethers::contract::EthError>::selector() => {
true
}
_ if selector
== <ERC1155InvalidReceiver as ::ethers::contract::EthError>::selector() => {
true
}
_ if selector
== <ERC1155InvalidSender as ::ethers::contract::EthError>::selector() => {
true
}
_ if selector
== <ERC1155MissingApprovalForAll as ::ethers::contract::EthError>::selector() => {
true
}
_ => false,
}
}
}
impl ::core::fmt::Display for ERC1155Errors {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
Self::ERC1155InsufficientBalance(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::ERC1155InvalidApprover(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::ERC1155InvalidArrayLength(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::ERC1155InvalidOperator(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::ERC1155InvalidReceiver(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::ERC1155InvalidSender(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::ERC1155MissingApprovalForAll(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::RevertString(s) => ::core::fmt::Display::fmt(s, f),
}
}
}
impl ::core::convert::From<::std::string::String> for ERC1155Errors {
fn from(value: String) -> Self {
Self::RevertString(value)
}
}
impl ::core::convert::From<ERC1155InsufficientBalance> for ERC1155Errors {
fn from(value: ERC1155InsufficientBalance) -> Self {
Self::ERC1155InsufficientBalance(value)
}
}
impl ::core::convert::From<ERC1155InvalidApprover> for ERC1155Errors {
fn from(value: ERC1155InvalidApprover) -> Self {
Self::ERC1155InvalidApprover(value)
}
}
impl ::core::convert::From<ERC1155InvalidArrayLength> for ERC1155Errors {
fn from(value: ERC1155InvalidArrayLength) -> Self {
Self::ERC1155InvalidArrayLength(value)
}
}
impl ::core::convert::From<ERC1155InvalidOperator> for ERC1155Errors {
fn from(value: ERC1155InvalidOperator) -> Self {
Self::ERC1155InvalidOperator(value)
}
}
impl ::core::convert::From<ERC1155InvalidReceiver> for ERC1155Errors {
fn from(value: ERC1155InvalidReceiver) -> Self {
Self::ERC1155InvalidReceiver(value)
}
}
impl ::core::convert::From<ERC1155InvalidSender> for ERC1155Errors {
fn from(value: ERC1155InvalidSender) -> Self {
Self::ERC1155InvalidSender(value)
}
}
impl ::core::convert::From<ERC1155MissingApprovalForAll> for ERC1155Errors {
fn from(value: ERC1155MissingApprovalForAll) -> Self {
Self::ERC1155MissingApprovalForAll(value)
}
}
#[derive(
Clone,
::ethers::contract::EthEvent,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")]
pub struct ApprovalForAllFilter {
#[ethevent(indexed)]
pub account: ::ethers::core::types::Address,
#[ethevent(indexed)]
pub operator: ::ethers::core::types::Address,
pub approved: bool,
}
#[derive(
Clone,
::ethers::contract::EthEvent,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethevent(
name = "TransferBatch",
abi = "TransferBatch(address,address,address,uint256[],uint256[])"
)]
pub struct TransferBatchFilter {
#[ethevent(indexed)]
pub operator: ::ethers::core::types::Address,
#[ethevent(indexed)]
pub from: ::ethers::core::types::Address,
#[ethevent(indexed)]
pub to: ::ethers::core::types::Address,
pub ids: ::std::vec::Vec<::ethers::core::types::U256>,
pub values: ::std::vec::Vec<::ethers::core::types::U256>,
}
#[derive(
Clone,
::ethers::contract::EthEvent,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethevent(
name = "TransferSingle",
abi = "TransferSingle(address,address,address,uint256,uint256)"
)]
pub struct TransferSingleFilter {
#[ethevent(indexed)]
pub operator: ::ethers::core::types::Address,
#[ethevent(indexed)]
pub from: ::ethers::core::types::Address,
#[ethevent(indexed)]
pub to: ::ethers::core::types::Address,
pub id: ::ethers::core::types::U256,
pub value: ::ethers::core::types::U256,
}
#[derive(
Clone,
::ethers::contract::EthEvent,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethevent(name = "URI", abi = "URI(string,uint256)")]
pub struct UriFilter {
pub value: ::std::string::String,
#[ethevent(indexed)]
pub id: ::ethers::core::types::U256,
}
#[derive(
Clone,
::ethers::contract::EthAbiType,
serde::Serialize,
serde::Deserialize,
Debug,
PartialEq,
Eq,
Hash
)]
pub enum ERC1155Events {
ApprovalForAllFilter(ApprovalForAllFilter),
TransferBatchFilter(TransferBatchFilter),
TransferSingleFilter(TransferSingleFilter),
UriFilter(UriFilter),
}
impl ::ethers::contract::EthLogDecode for ERC1155Events {
fn decode_log(
log: &::ethers::core::abi::RawLog,
) -> ::core::result::Result<Self, ::ethers::core::abi::Error> {
if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) {
return Ok(ERC1155Events::ApprovalForAllFilter(decoded));
}
if let Ok(decoded) = TransferBatchFilter::decode_log(log) {
return Ok(ERC1155Events::TransferBatchFilter(decoded));
}
if let Ok(decoded) = TransferSingleFilter::decode_log(log) {
return Ok(ERC1155Events::TransferSingleFilter(decoded));
}
if let Ok(decoded) = UriFilter::decode_log(log) {
return Ok(ERC1155Events::UriFilter(decoded));
}
Err(::ethers::core::abi::Error::InvalidData)
}
}
impl ::core::fmt::Display for ERC1155Events {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
Self::ApprovalForAllFilter(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::TransferBatchFilter(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::TransferSingleFilter(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::UriFilter(element) => ::core::fmt::Display::fmt(element, f),
}
}
}
impl ::core::convert::From<ApprovalForAllFilter> for ERC1155Events {
fn from(value: ApprovalForAllFilter) -> Self {
Self::ApprovalForAllFilter(value)
}
}
impl ::core::convert::From<TransferBatchFilter> for ERC1155Events {
fn from(value: TransferBatchFilter) -> Self {
Self::TransferBatchFilter(value)
}
}
impl ::core::convert::From<TransferSingleFilter> for ERC1155Events {
fn from(value: TransferSingleFilter) -> Self {
Self::TransferSingleFilter(value)
}
}
impl ::core::convert::From<UriFilter> for ERC1155Events {
fn from(value: UriFilter) -> Self {
Self::UriFilter(value)
}
}
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "balanceOf", abi = "balanceOf(address,uint256)")]
pub struct BalanceOfCall {
pub account: ::ethers::core::types::Address,
pub id: ::ethers::core::types::U256,
}
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "balanceOfBatch", abi = "balanceOfBatch(address[],uint256[])")]
pub struct BalanceOfBatchCall {
pub accounts: ::std::vec::Vec<::ethers::core::types::Address>,
pub ids: ::std::vec::Vec<::ethers::core::types::U256>,
}
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")]
pub struct IsApprovedForAllCall {
pub account: ::ethers::core::types::Address,
pub operator: ::ethers::core::types::Address,
}
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(
name = "safeBatchTransferFrom",
abi = "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)"
)]
pub struct SafeBatchTransferFromCall {
pub from: ::ethers::core::types::Address,
pub to: ::ethers::core::types::Address,
pub ids: ::std::vec::Vec<::ethers::core::types::U256>,
pub values: ::std::vec::Vec<::ethers::core::types::U256>,
pub data: ::ethers::core::types::Bytes,
}
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(
name = "safeTransferFrom",
abi = "safeTransferFrom(address,address,uint256,uint256,bytes)"
)]
pub struct SafeTransferFromCall {
pub from: ::ethers::core::types::Address,
pub to: ::ethers::core::types::Address,
pub id: ::ethers::core::types::U256,
pub value: ::ethers::core::types::U256,
pub data: ::ethers::core::types::Bytes,
}
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")]
pub struct SetApprovalForAllCall {
pub operator: ::ethers::core::types::Address,
pub approved: bool,
}
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")]
pub struct SupportsInterfaceCall {
pub interface_id: [u8; 4],
}
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "uri", abi = "uri(uint256)")]
pub struct UriCall(pub ::ethers::core::types::U256);
#[derive(
Clone,
::ethers::contract::EthAbiType,
serde::Serialize,
serde::Deserialize,
Debug,
PartialEq,
Eq,
Hash
)]
pub enum ERC1155Calls {
BalanceOf(BalanceOfCall),
BalanceOfBatch(BalanceOfBatchCall),
IsApprovedForAll(IsApprovedForAllCall),
SafeBatchTransferFrom(SafeBatchTransferFromCall),
SafeTransferFrom(SafeTransferFromCall),
SetApprovalForAll(SetApprovalForAllCall),
SupportsInterface(SupportsInterfaceCall),
Uri(UriCall),
}
impl ::ethers::core::abi::AbiDecode for ERC1155Calls {
fn decode(
data: impl AsRef<[u8]>,
) -> ::core::result::Result<Self, ::ethers::core::abi::AbiError> {
let data = data.as_ref();
if let Ok(decoded) = <BalanceOfCall as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::BalanceOf(decoded));
}
if let Ok(decoded) = <BalanceOfBatchCall as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::BalanceOfBatch(decoded));
}
if let Ok(decoded) = <IsApprovedForAllCall as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::IsApprovedForAll(decoded));
}
if let Ok(decoded) = <SafeBatchTransferFromCall as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::SafeBatchTransferFrom(decoded));
}
if let Ok(decoded) = <SafeTransferFromCall as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::SafeTransferFrom(decoded));
}
if let Ok(decoded) = <SetApprovalForAllCall as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::SetApprovalForAll(decoded));
}
if let Ok(decoded) = <SupportsInterfaceCall as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::SupportsInterface(decoded));
}
if let Ok(decoded) = <UriCall as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::Uri(decoded));
}
Err(::ethers::core::abi::Error::InvalidData.into())
}
}
impl ::ethers::core::abi::AbiEncode for ERC1155Calls {
fn encode(self) -> Vec<u8> {
match self {
Self::BalanceOf(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::BalanceOfBatch(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::IsApprovedForAll(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::SafeBatchTransferFrom(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::SafeTransferFrom(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::SetApprovalForAll(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::SupportsInterface(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::Uri(element) => ::ethers::core::abi::AbiEncode::encode(element),
}
}
}
impl ::core::fmt::Display for ERC1155Calls {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f),
Self::BalanceOfBatch(element) => ::core::fmt::Display::fmt(element, f),
Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f),
Self::SafeBatchTransferFrom(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f),
Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f),
Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f),
Self::Uri(element) => ::core::fmt::Display::fmt(element, f),
}
}
}
impl ::core::convert::From<BalanceOfCall> for ERC1155Calls {
fn from(value: BalanceOfCall) -> Self {
Self::BalanceOf(value)
}
}
impl ::core::convert::From<BalanceOfBatchCall> for ERC1155Calls {
fn from(value: BalanceOfBatchCall) -> Self {
Self::BalanceOfBatch(value)
}
}
impl ::core::convert::From<IsApprovedForAllCall> for ERC1155Calls {
fn from(value: IsApprovedForAllCall) -> Self {
Self::IsApprovedForAll(value)
}
}
impl ::core::convert::From<SafeBatchTransferFromCall> for ERC1155Calls {
fn from(value: SafeBatchTransferFromCall) -> Self {
Self::SafeBatchTransferFrom(value)
}
}
impl ::core::convert::From<SafeTransferFromCall> for ERC1155Calls {
fn from(value: SafeTransferFromCall) -> Self {
Self::SafeTransferFrom(value)
}
}
impl ::core::convert::From<SetApprovalForAllCall> for ERC1155Calls {
fn from(value: SetApprovalForAllCall) -> Self {
Self::SetApprovalForAll(value)
}
}
impl ::core::convert::From<SupportsInterfaceCall> for ERC1155Calls {
fn from(value: SupportsInterfaceCall) -> Self {
Self::SupportsInterface(value)
}
}
impl ::core::convert::From<UriCall> for ERC1155Calls {
fn from(value: UriCall) -> Self {
Self::Uri(value)
}
}
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct BalanceOfReturn(pub ::ethers::core::types::U256);
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct BalanceOfBatchReturn(pub ::std::vec::Vec<::ethers::core::types::U256>);
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct IsApprovedForAllReturn(pub bool);
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct SupportsInterfaceReturn(pub bool);
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct UriReturn(pub ::std::string::String);
}