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