1pub use ierc1155::*;
2#[allow(
5 clippy::enum_variant_names,
6 clippy::too_many_arguments,
7 clippy::upper_case_acronyms,
8 clippy::type_complexity,
9 dead_code,
10 non_camel_case_types,
11)]
12pub mod ierc1155 {
13 #[rustfmt::skip]
14 const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"ApprovalForAll\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"TransferBatch\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"TransferSingle\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"URI\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\",\"components\":[]},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\",\"components\":[]},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"safeBatchTransferFrom\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"safeTransferFrom\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"setApprovalForAll\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]}]";
15 pub static IERC1155_ABI: ::ethers_contract::Lazy<::ethers_core::abi::Abi> = ::ethers_contract::Lazy::new(||
17 ::ethers_core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid"));
18 pub struct IERC1155<M>(::ethers_contract::Contract<M>);
19 impl<M> ::core::clone::Clone for IERC1155<M> {
20 fn clone(&self) -> Self {
21 Self(::core::clone::Clone::clone(&self.0))
22 }
23 }
24 impl<M> ::core::ops::Deref for IERC1155<M> {
25 type Target = ::ethers_contract::Contract<M>;
26 fn deref(&self) -> &Self::Target {
27 &self.0
28 }
29 }
30 impl<M> ::core::ops::DerefMut for IERC1155<M> {
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34 }
35 impl<M> ::core::fmt::Debug for IERC1155<M> {
36 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
37 f.debug_tuple(stringify!(IERC1155)).field(&self.address()).finish()
38 }
39 }
40 impl<M: ::ethers_providers::Middleware> IERC1155<M> {
41 pub fn new<T: Into<::ethers_core::types::Address>>(
44 address: T,
45 client: ::std::sync::Arc<M>,
46 ) -> Self {
47 Self(
48 ::ethers_contract::Contract::new(
49 address.into(),
50 IERC1155_ABI.clone(),
51 client,
52 ),
53 )
54 }
55 pub fn balance_of(
57 &self,
58 account: ::ethers_core::types::Address,
59 id: ::ethers_core::types::U256,
60 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
61 self.0
62 .method_hash([0, 253, 213, 142], (account, id))
63 .expect("method not found (this should never happen)")
64 }
65 pub fn balance_of_batch(
67 &self,
68 accounts: ::std::vec::Vec<::ethers_core::types::Address>,
69 ids: ::std::vec::Vec<::ethers_core::types::U256>,
70 ) -> ::ethers_contract::builders::ContractCall<
71 M,
72 ::std::vec::Vec<::ethers_core::types::U256>,
73 > {
74 self.0
75 .method_hash([78, 18, 115, 244], (accounts, ids))
76 .expect("method not found (this should never happen)")
77 }
78 pub fn is_approved_for_all(
80 &self,
81 account: ::ethers_core::types::Address,
82 operator: ::ethers_core::types::Address,
83 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
84 self.0
85 .method_hash([233, 133, 233, 197], (account, operator))
86 .expect("method not found (this should never happen)")
87 }
88 pub fn safe_batch_transfer_from(
90 &self,
91 from: ::ethers_core::types::Address,
92 to: ::ethers_core::types::Address,
93 ids: ::std::vec::Vec<::ethers_core::types::U256>,
94 amounts: ::std::vec::Vec<::ethers_core::types::U256>,
95 data: ::ethers_core::types::Bytes,
96 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
97 self.0
98 .method_hash([46, 178, 194, 214], (from, to, ids, amounts, data))
99 .expect("method not found (this should never happen)")
100 }
101 pub fn safe_transfer_from(
103 &self,
104 from: ::ethers_core::types::Address,
105 to: ::ethers_core::types::Address,
106 id: ::ethers_core::types::U256,
107 amount: ::ethers_core::types::U256,
108 data: ::ethers_core::types::Bytes,
109 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
110 self.0
111 .method_hash([242, 66, 67, 42], (from, to, id, amount, data))
112 .expect("method not found (this should never happen)")
113 }
114 pub fn set_approval_for_all(
116 &self,
117 operator: ::ethers_core::types::Address,
118 approved: bool,
119 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
120 self.0
121 .method_hash([162, 44, 180, 101], (operator, approved))
122 .expect("method not found (this should never happen)")
123 }
124 pub fn supports_interface(
126 &self,
127 interface_id: [u8; 4],
128 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
129 self.0
130 .method_hash([1, 255, 201, 167], interface_id)
131 .expect("method not found (this should never happen)")
132 }
133 pub fn approval_for_all_filter(
135 &self,
136 ) -> ::ethers_contract::builders::Event<
137 ::std::sync::Arc<M>,
138 M,
139 ApprovalForAllFilter,
140 > {
141 self.0.event()
142 }
143 pub fn transfer_batch_filter(
145 &self,
146 ) -> ::ethers_contract::builders::Event<
147 ::std::sync::Arc<M>,
148 M,
149 TransferBatchFilter,
150 > {
151 self.0.event()
152 }
153 pub fn transfer_single_filter(
155 &self,
156 ) -> ::ethers_contract::builders::Event<
157 ::std::sync::Arc<M>,
158 M,
159 TransferSingleFilter,
160 > {
161 self.0.event()
162 }
163 pub fn uri_filter(
165 &self,
166 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, UriFilter> {
167 self.0.event()
168 }
169 pub fn events(
171 &self,
172 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, IERC1155Events> {
173 self.0.event_with_filter(::core::default::Default::default())
174 }
175 }
176 impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
177 for IERC1155<M> {
178 fn from(contract: ::ethers_contract::Contract<M>) -> Self {
179 Self::new(contract.address(), contract.client())
180 }
181 }
182 #[derive(
183 Clone,
184 ::ethers_contract::EthEvent,
185 ::ethers_contract::EthDisplay,
186 Default,
187 Debug,
188 PartialEq,
189 Eq,
190 Hash
191 )]
192 #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")]
193 pub struct ApprovalForAllFilter {
194 #[ethevent(indexed)]
195 pub account: ::ethers_core::types::Address,
196 #[ethevent(indexed)]
197 pub operator: ::ethers_core::types::Address,
198 pub approved: bool,
199 }
200 #[derive(
201 Clone,
202 ::ethers_contract::EthEvent,
203 ::ethers_contract::EthDisplay,
204 Default,
205 Debug,
206 PartialEq,
207 Eq,
208 Hash
209 )]
210 #[ethevent(
211 name = "TransferBatch",
212 abi = "TransferBatch(address,address,address,uint256[],uint256[])"
213 )]
214 pub struct TransferBatchFilter {
215 #[ethevent(indexed)]
216 pub operator: ::ethers_core::types::Address,
217 #[ethevent(indexed)]
218 pub from: ::ethers_core::types::Address,
219 #[ethevent(indexed)]
220 pub to: ::ethers_core::types::Address,
221 pub ids: ::std::vec::Vec<::ethers_core::types::U256>,
222 pub values: ::std::vec::Vec<::ethers_core::types::U256>,
223 }
224 #[derive(
225 Clone,
226 ::ethers_contract::EthEvent,
227 ::ethers_contract::EthDisplay,
228 Default,
229 Debug,
230 PartialEq,
231 Eq,
232 Hash
233 )]
234 #[ethevent(
235 name = "TransferSingle",
236 abi = "TransferSingle(address,address,address,uint256,uint256)"
237 )]
238 pub struct TransferSingleFilter {
239 #[ethevent(indexed)]
240 pub operator: ::ethers_core::types::Address,
241 #[ethevent(indexed)]
242 pub from: ::ethers_core::types::Address,
243 #[ethevent(indexed)]
244 pub to: ::ethers_core::types::Address,
245 pub id: ::ethers_core::types::U256,
246 pub value: ::ethers_core::types::U256,
247 }
248 #[derive(
249 Clone,
250 ::ethers_contract::EthEvent,
251 ::ethers_contract::EthDisplay,
252 Default,
253 Debug,
254 PartialEq,
255 Eq,
256 Hash
257 )]
258 #[ethevent(name = "URI", abi = "URI(string,uint256)")]
259 pub struct UriFilter {
260 pub value: ::std::string::String,
261 #[ethevent(indexed)]
262 pub id: ::ethers_core::types::U256,
263 }
264 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
266 pub enum IERC1155Events {
267 ApprovalForAllFilter(ApprovalForAllFilter),
268 TransferBatchFilter(TransferBatchFilter),
269 TransferSingleFilter(TransferSingleFilter),
270 UriFilter(UriFilter),
271 }
272 impl ::ethers_contract::EthLogDecode for IERC1155Events {
273 fn decode_log(
274 log: &::ethers_core::abi::RawLog,
275 ) -> ::core::result::Result<Self, ::ethers_core::abi::Error> {
276 if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) {
277 return Ok(IERC1155Events::ApprovalForAllFilter(decoded));
278 }
279 if let Ok(decoded) = TransferBatchFilter::decode_log(log) {
280 return Ok(IERC1155Events::TransferBatchFilter(decoded));
281 }
282 if let Ok(decoded) = TransferSingleFilter::decode_log(log) {
283 return Ok(IERC1155Events::TransferSingleFilter(decoded));
284 }
285 if let Ok(decoded) = UriFilter::decode_log(log) {
286 return Ok(IERC1155Events::UriFilter(decoded));
287 }
288 Err(::ethers_core::abi::Error::InvalidData)
289 }
290 }
291 impl ::core::fmt::Display for IERC1155Events {
292 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
293 match self {
294 Self::ApprovalForAllFilter(element) => {
295 ::core::fmt::Display::fmt(element, f)
296 }
297 Self::TransferBatchFilter(element) => {
298 ::core::fmt::Display::fmt(element, f)
299 }
300 Self::TransferSingleFilter(element) => {
301 ::core::fmt::Display::fmt(element, f)
302 }
303 Self::UriFilter(element) => ::core::fmt::Display::fmt(element, f),
304 }
305 }
306 }
307 impl ::core::convert::From<ApprovalForAllFilter> for IERC1155Events {
308 fn from(value: ApprovalForAllFilter) -> Self {
309 Self::ApprovalForAllFilter(value)
310 }
311 }
312 impl ::core::convert::From<TransferBatchFilter> for IERC1155Events {
313 fn from(value: TransferBatchFilter) -> Self {
314 Self::TransferBatchFilter(value)
315 }
316 }
317 impl ::core::convert::From<TransferSingleFilter> for IERC1155Events {
318 fn from(value: TransferSingleFilter) -> Self {
319 Self::TransferSingleFilter(value)
320 }
321 }
322 impl ::core::convert::From<UriFilter> for IERC1155Events {
323 fn from(value: UriFilter) -> Self {
324 Self::UriFilter(value)
325 }
326 }
327 #[derive(
329 Clone,
330 ::ethers_contract::EthCall,
331 ::ethers_contract::EthDisplay,
332 Default,
333 Debug,
334 PartialEq,
335 Eq,
336 Hash
337 )]
338 #[ethcall(name = "balanceOf", abi = "balanceOf(address,uint256)")]
339 pub struct BalanceOfCall {
340 pub account: ::ethers_core::types::Address,
341 pub id: ::ethers_core::types::U256,
342 }
343 #[derive(
345 Clone,
346 ::ethers_contract::EthCall,
347 ::ethers_contract::EthDisplay,
348 Default,
349 Debug,
350 PartialEq,
351 Eq,
352 Hash
353 )]
354 #[ethcall(name = "balanceOfBatch", abi = "balanceOfBatch(address[],uint256[])")]
355 pub struct BalanceOfBatchCall {
356 pub accounts: ::std::vec::Vec<::ethers_core::types::Address>,
357 pub ids: ::std::vec::Vec<::ethers_core::types::U256>,
358 }
359 #[derive(
361 Clone,
362 ::ethers_contract::EthCall,
363 ::ethers_contract::EthDisplay,
364 Default,
365 Debug,
366 PartialEq,
367 Eq,
368 Hash
369 )]
370 #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")]
371 pub struct IsApprovedForAllCall {
372 pub account: ::ethers_core::types::Address,
373 pub operator: ::ethers_core::types::Address,
374 }
375 #[derive(
377 Clone,
378 ::ethers_contract::EthCall,
379 ::ethers_contract::EthDisplay,
380 Default,
381 Debug,
382 PartialEq,
383 Eq,
384 Hash
385 )]
386 #[ethcall(
387 name = "safeBatchTransferFrom",
388 abi = "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)"
389 )]
390 pub struct SafeBatchTransferFromCall {
391 pub from: ::ethers_core::types::Address,
392 pub to: ::ethers_core::types::Address,
393 pub ids: ::std::vec::Vec<::ethers_core::types::U256>,
394 pub amounts: ::std::vec::Vec<::ethers_core::types::U256>,
395 pub data: ::ethers_core::types::Bytes,
396 }
397 #[derive(
399 Clone,
400 ::ethers_contract::EthCall,
401 ::ethers_contract::EthDisplay,
402 Default,
403 Debug,
404 PartialEq,
405 Eq,
406 Hash
407 )]
408 #[ethcall(
409 name = "safeTransferFrom",
410 abi = "safeTransferFrom(address,address,uint256,uint256,bytes)"
411 )]
412 pub struct SafeTransferFromCall {
413 pub from: ::ethers_core::types::Address,
414 pub to: ::ethers_core::types::Address,
415 pub id: ::ethers_core::types::U256,
416 pub amount: ::ethers_core::types::U256,
417 pub data: ::ethers_core::types::Bytes,
418 }
419 #[derive(
421 Clone,
422 ::ethers_contract::EthCall,
423 ::ethers_contract::EthDisplay,
424 Default,
425 Debug,
426 PartialEq,
427 Eq,
428 Hash
429 )]
430 #[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")]
431 pub struct SetApprovalForAllCall {
432 pub operator: ::ethers_core::types::Address,
433 pub approved: bool,
434 }
435 #[derive(
437 Clone,
438 ::ethers_contract::EthCall,
439 ::ethers_contract::EthDisplay,
440 Default,
441 Debug,
442 PartialEq,
443 Eq,
444 Hash
445 )]
446 #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")]
447 pub struct SupportsInterfaceCall {
448 pub interface_id: [u8; 4],
449 }
450 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
452 pub enum IERC1155Calls {
453 BalanceOf(BalanceOfCall),
454 BalanceOfBatch(BalanceOfBatchCall),
455 IsApprovedForAll(IsApprovedForAllCall),
456 SafeBatchTransferFrom(SafeBatchTransferFromCall),
457 SafeTransferFrom(SafeTransferFromCall),
458 SetApprovalForAll(SetApprovalForAllCall),
459 SupportsInterface(SupportsInterfaceCall),
460 }
461 impl ::ethers_core::abi::AbiDecode for IERC1155Calls {
462 fn decode(
463 data: impl AsRef<[u8]>,
464 ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
465 let data = data.as_ref();
466 if let Ok(decoded)
467 = <BalanceOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
468 return Ok(Self::BalanceOf(decoded));
469 }
470 if let Ok(decoded)
471 = <BalanceOfBatchCall as ::ethers_core::abi::AbiDecode>::decode(data) {
472 return Ok(Self::BalanceOfBatch(decoded));
473 }
474 if let Ok(decoded)
475 = <IsApprovedForAllCall as ::ethers_core::abi::AbiDecode>::decode(data) {
476 return Ok(Self::IsApprovedForAll(decoded));
477 }
478 if let Ok(decoded)
479 = <SafeBatchTransferFromCall as ::ethers_core::abi::AbiDecode>::decode(
480 data,
481 ) {
482 return Ok(Self::SafeBatchTransferFrom(decoded));
483 }
484 if let Ok(decoded)
485 = <SafeTransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
486 return Ok(Self::SafeTransferFrom(decoded));
487 }
488 if let Ok(decoded)
489 = <SetApprovalForAllCall as ::ethers_core::abi::AbiDecode>::decode(
490 data,
491 ) {
492 return Ok(Self::SetApprovalForAll(decoded));
493 }
494 if let Ok(decoded)
495 = <SupportsInterfaceCall as ::ethers_core::abi::AbiDecode>::decode(
496 data,
497 ) {
498 return Ok(Self::SupportsInterface(decoded));
499 }
500 Err(::ethers_core::abi::Error::InvalidData.into())
501 }
502 }
503 impl ::ethers_core::abi::AbiEncode for IERC1155Calls {
504 fn encode(self) -> Vec<u8> {
505 match self {
506 Self::BalanceOf(element) => {
507 ::ethers_core::abi::AbiEncode::encode(element)
508 }
509 Self::BalanceOfBatch(element) => {
510 ::ethers_core::abi::AbiEncode::encode(element)
511 }
512 Self::IsApprovedForAll(element) => {
513 ::ethers_core::abi::AbiEncode::encode(element)
514 }
515 Self::SafeBatchTransferFrom(element) => {
516 ::ethers_core::abi::AbiEncode::encode(element)
517 }
518 Self::SafeTransferFrom(element) => {
519 ::ethers_core::abi::AbiEncode::encode(element)
520 }
521 Self::SetApprovalForAll(element) => {
522 ::ethers_core::abi::AbiEncode::encode(element)
523 }
524 Self::SupportsInterface(element) => {
525 ::ethers_core::abi::AbiEncode::encode(element)
526 }
527 }
528 }
529 }
530 impl ::core::fmt::Display for IERC1155Calls {
531 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
532 match self {
533 Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f),
534 Self::BalanceOfBatch(element) => ::core::fmt::Display::fmt(element, f),
535 Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f),
536 Self::SafeBatchTransferFrom(element) => {
537 ::core::fmt::Display::fmt(element, f)
538 }
539 Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f),
540 Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f),
541 Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f),
542 }
543 }
544 }
545 impl ::core::convert::From<BalanceOfCall> for IERC1155Calls {
546 fn from(value: BalanceOfCall) -> Self {
547 Self::BalanceOf(value)
548 }
549 }
550 impl ::core::convert::From<BalanceOfBatchCall> for IERC1155Calls {
551 fn from(value: BalanceOfBatchCall) -> Self {
552 Self::BalanceOfBatch(value)
553 }
554 }
555 impl ::core::convert::From<IsApprovedForAllCall> for IERC1155Calls {
556 fn from(value: IsApprovedForAllCall) -> Self {
557 Self::IsApprovedForAll(value)
558 }
559 }
560 impl ::core::convert::From<SafeBatchTransferFromCall> for IERC1155Calls {
561 fn from(value: SafeBatchTransferFromCall) -> Self {
562 Self::SafeBatchTransferFrom(value)
563 }
564 }
565 impl ::core::convert::From<SafeTransferFromCall> for IERC1155Calls {
566 fn from(value: SafeTransferFromCall) -> Self {
567 Self::SafeTransferFrom(value)
568 }
569 }
570 impl ::core::convert::From<SetApprovalForAllCall> for IERC1155Calls {
571 fn from(value: SetApprovalForAllCall) -> Self {
572 Self::SetApprovalForAll(value)
573 }
574 }
575 impl ::core::convert::From<SupportsInterfaceCall> for IERC1155Calls {
576 fn from(value: SupportsInterfaceCall) -> Self {
577 Self::SupportsInterface(value)
578 }
579 }
580 #[derive(
582 Clone,
583 ::ethers_contract::EthAbiType,
584 ::ethers_contract::EthAbiCodec,
585 Default,
586 Debug,
587 PartialEq,
588 Eq,
589 Hash
590 )]
591 pub struct BalanceOfReturn(pub ::ethers_core::types::U256);
592 #[derive(
594 Clone,
595 ::ethers_contract::EthAbiType,
596 ::ethers_contract::EthAbiCodec,
597 Default,
598 Debug,
599 PartialEq,
600 Eq,
601 Hash
602 )]
603 pub struct BalanceOfBatchReturn(pub ::std::vec::Vec<::ethers_core::types::U256>);
604 #[derive(
606 Clone,
607 ::ethers_contract::EthAbiType,
608 ::ethers_contract::EthAbiCodec,
609 Default,
610 Debug,
611 PartialEq,
612 Eq,
613 Hash
614 )]
615 pub struct IsApprovedForAllReturn(pub bool);
616 #[derive(
618 Clone,
619 ::ethers_contract::EthAbiType,
620 ::ethers_contract::EthAbiCodec,
621 Default,
622 Debug,
623 PartialEq,
624 Eq,
625 Hash
626 )]
627 pub struct SupportsInterfaceReturn(pub bool);
628}