1pub use ierc721_metadata::*;
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 ierc721_metadata {
13 #[rustfmt::skip]
14 const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"Approval\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"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\":\"from\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"Transfer\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"approve\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"safeTransferFrom\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"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\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"transferFrom\",\"outputs\":[]}]";
15 pub static IERC721METADATA_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 IERC721Metadata<M>(::ethers_contract::Contract<M>);
19 impl<M> ::core::clone::Clone for IERC721Metadata<M> {
20 fn clone(&self) -> Self {
21 Self(::core::clone::Clone::clone(&self.0))
22 }
23 }
24 impl<M> ::core::ops::Deref for IERC721Metadata<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 IERC721Metadata<M> {
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34 }
35 impl<M> ::core::fmt::Debug for IERC721Metadata<M> {
36 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
37 f.debug_tuple(stringify!(IERC721Metadata)).field(&self.address()).finish()
38 }
39 }
40 impl<M: ::ethers_providers::Middleware> IERC721Metadata<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 IERC721METADATA_ABI.clone(),
51 client,
52 ),
53 )
54 }
55 pub fn approve(
57 &self,
58 to: ::ethers_core::types::Address,
59 token_id: ::ethers_core::types::U256,
60 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
61 self.0
62 .method_hash([9, 94, 167, 179], (to, token_id))
63 .expect("method not found (this should never happen)")
64 }
65 pub fn balance_of(
67 &self,
68 owner: ::ethers_core::types::Address,
69 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
70 self.0
71 .method_hash([112, 160, 130, 49], owner)
72 .expect("method not found (this should never happen)")
73 }
74 pub fn get_approved(
76 &self,
77 token_id: ::ethers_core::types::U256,
78 ) -> ::ethers_contract::builders::ContractCall<
79 M,
80 ::ethers_core::types::Address,
81 > {
82 self.0
83 .method_hash([8, 24, 18, 252], token_id)
84 .expect("method not found (this should never happen)")
85 }
86 pub fn is_approved_for_all(
88 &self,
89 owner: ::ethers_core::types::Address,
90 operator: ::ethers_core::types::Address,
91 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
92 self.0
93 .method_hash([233, 133, 233, 197], (owner, operator))
94 .expect("method not found (this should never happen)")
95 }
96 pub fn name(
98 &self,
99 ) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
100 self.0
101 .method_hash([6, 253, 222, 3], ())
102 .expect("method not found (this should never happen)")
103 }
104 pub fn owner_of(
106 &self,
107 token_id: ::ethers_core::types::U256,
108 ) -> ::ethers_contract::builders::ContractCall<
109 M,
110 ::ethers_core::types::Address,
111 > {
112 self.0
113 .method_hash([99, 82, 33, 30], token_id)
114 .expect("method not found (this should never happen)")
115 }
116 pub fn safe_transfer_from(
118 &self,
119 from: ::ethers_core::types::Address,
120 to: ::ethers_core::types::Address,
121 token_id: ::ethers_core::types::U256,
122 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
123 self.0
124 .method_hash([66, 132, 46, 14], (from, to, token_id))
125 .expect("method not found (this should never happen)")
126 }
127 pub fn safe_transfer_from_with_from_and_to_and_data(
129 &self,
130 from: ::ethers_core::types::Address,
131 to: ::ethers_core::types::Address,
132 token_id: ::ethers_core::types::U256,
133 data: ::ethers_core::types::Bytes,
134 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
135 self.0
136 .method_hash([184, 141, 79, 222], (from, to, token_id, data))
137 .expect("method not found (this should never happen)")
138 }
139 pub fn set_approval_for_all(
141 &self,
142 operator: ::ethers_core::types::Address,
143 approved: bool,
144 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
145 self.0
146 .method_hash([162, 44, 180, 101], (operator, approved))
147 .expect("method not found (this should never happen)")
148 }
149 pub fn supports_interface(
151 &self,
152 interface_id: [u8; 4],
153 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
154 self.0
155 .method_hash([1, 255, 201, 167], interface_id)
156 .expect("method not found (this should never happen)")
157 }
158 pub fn symbol(
160 &self,
161 ) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
162 self.0
163 .method_hash([149, 216, 155, 65], ())
164 .expect("method not found (this should never happen)")
165 }
166 pub fn token_uri(
168 &self,
169 token_id: ::ethers_core::types::U256,
170 ) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
171 self.0
172 .method_hash([200, 123, 86, 221], token_id)
173 .expect("method not found (this should never happen)")
174 }
175 pub fn transfer_from(
177 &self,
178 from: ::ethers_core::types::Address,
179 to: ::ethers_core::types::Address,
180 token_id: ::ethers_core::types::U256,
181 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
182 self.0
183 .method_hash([35, 184, 114, 221], (from, to, token_id))
184 .expect("method not found (this should never happen)")
185 }
186 pub fn approval_filter(
188 &self,
189 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, ApprovalFilter> {
190 self.0.event()
191 }
192 pub fn approval_for_all_filter(
194 &self,
195 ) -> ::ethers_contract::builders::Event<
196 ::std::sync::Arc<M>,
197 M,
198 ApprovalForAllFilter,
199 > {
200 self.0.event()
201 }
202 pub fn transfer_filter(
204 &self,
205 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, TransferFilter> {
206 self.0.event()
207 }
208 pub fn events(
210 &self,
211 ) -> ::ethers_contract::builders::Event<
212 ::std::sync::Arc<M>,
213 M,
214 IERC721MetadataEvents,
215 > {
216 self.0.event_with_filter(::core::default::Default::default())
217 }
218 }
219 impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
220 for IERC721Metadata<M> {
221 fn from(contract: ::ethers_contract::Contract<M>) -> Self {
222 Self::new(contract.address(), contract.client())
223 }
224 }
225 #[derive(
226 Clone,
227 ::ethers_contract::EthEvent,
228 ::ethers_contract::EthDisplay,
229 Default,
230 Debug,
231 PartialEq,
232 Eq,
233 Hash
234 )]
235 #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")]
236 pub struct ApprovalFilter {
237 #[ethevent(indexed)]
238 pub owner: ::ethers_core::types::Address,
239 #[ethevent(indexed)]
240 pub approved: ::ethers_core::types::Address,
241 #[ethevent(indexed)]
242 pub token_id: ::ethers_core::types::U256,
243 }
244 #[derive(
245 Clone,
246 ::ethers_contract::EthEvent,
247 ::ethers_contract::EthDisplay,
248 Default,
249 Debug,
250 PartialEq,
251 Eq,
252 Hash
253 )]
254 #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")]
255 pub struct ApprovalForAllFilter {
256 #[ethevent(indexed)]
257 pub owner: ::ethers_core::types::Address,
258 #[ethevent(indexed)]
259 pub operator: ::ethers_core::types::Address,
260 pub approved: bool,
261 }
262 #[derive(
263 Clone,
264 ::ethers_contract::EthEvent,
265 ::ethers_contract::EthDisplay,
266 Default,
267 Debug,
268 PartialEq,
269 Eq,
270 Hash
271 )]
272 #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")]
273 pub struct TransferFilter {
274 #[ethevent(indexed)]
275 pub from: ::ethers_core::types::Address,
276 #[ethevent(indexed)]
277 pub to: ::ethers_core::types::Address,
278 #[ethevent(indexed)]
279 pub token_id: ::ethers_core::types::U256,
280 }
281 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
283 pub enum IERC721MetadataEvents {
284 ApprovalFilter(ApprovalFilter),
285 ApprovalForAllFilter(ApprovalForAllFilter),
286 TransferFilter(TransferFilter),
287 }
288 impl ::ethers_contract::EthLogDecode for IERC721MetadataEvents {
289 fn decode_log(
290 log: &::ethers_core::abi::RawLog,
291 ) -> ::core::result::Result<Self, ::ethers_core::abi::Error> {
292 if let Ok(decoded) = ApprovalFilter::decode_log(log) {
293 return Ok(IERC721MetadataEvents::ApprovalFilter(decoded));
294 }
295 if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) {
296 return Ok(IERC721MetadataEvents::ApprovalForAllFilter(decoded));
297 }
298 if let Ok(decoded) = TransferFilter::decode_log(log) {
299 return Ok(IERC721MetadataEvents::TransferFilter(decoded));
300 }
301 Err(::ethers_core::abi::Error::InvalidData)
302 }
303 }
304 impl ::core::fmt::Display for IERC721MetadataEvents {
305 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
306 match self {
307 Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f),
308 Self::ApprovalForAllFilter(element) => {
309 ::core::fmt::Display::fmt(element, f)
310 }
311 Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f),
312 }
313 }
314 }
315 impl ::core::convert::From<ApprovalFilter> for IERC721MetadataEvents {
316 fn from(value: ApprovalFilter) -> Self {
317 Self::ApprovalFilter(value)
318 }
319 }
320 impl ::core::convert::From<ApprovalForAllFilter> for IERC721MetadataEvents {
321 fn from(value: ApprovalForAllFilter) -> Self {
322 Self::ApprovalForAllFilter(value)
323 }
324 }
325 impl ::core::convert::From<TransferFilter> for IERC721MetadataEvents {
326 fn from(value: TransferFilter) -> Self {
327 Self::TransferFilter(value)
328 }
329 }
330 #[derive(
332 Clone,
333 ::ethers_contract::EthCall,
334 ::ethers_contract::EthDisplay,
335 Default,
336 Debug,
337 PartialEq,
338 Eq,
339 Hash
340 )]
341 #[ethcall(name = "approve", abi = "approve(address,uint256)")]
342 pub struct ApproveCall {
343 pub to: ::ethers_core::types::Address,
344 pub token_id: ::ethers_core::types::U256,
345 }
346 #[derive(
348 Clone,
349 ::ethers_contract::EthCall,
350 ::ethers_contract::EthDisplay,
351 Default,
352 Debug,
353 PartialEq,
354 Eq,
355 Hash
356 )]
357 #[ethcall(name = "balanceOf", abi = "balanceOf(address)")]
358 pub struct BalanceOfCall {
359 pub owner: ::ethers_core::types::Address,
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 = "getApproved", abi = "getApproved(uint256)")]
373 pub struct GetApprovedCall {
374 pub token_id: ::ethers_core::types::U256,
375 }
376 #[derive(
378 Clone,
379 ::ethers_contract::EthCall,
380 ::ethers_contract::EthDisplay,
381 Default,
382 Debug,
383 PartialEq,
384 Eq,
385 Hash
386 )]
387 #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")]
388 pub struct IsApprovedForAllCall {
389 pub owner: ::ethers_core::types::Address,
390 pub operator: ::ethers_core::types::Address,
391 }
392 #[derive(
394 Clone,
395 ::ethers_contract::EthCall,
396 ::ethers_contract::EthDisplay,
397 Default,
398 Debug,
399 PartialEq,
400 Eq,
401 Hash
402 )]
403 #[ethcall(name = "name", abi = "name()")]
404 pub struct NameCall;
405 #[derive(
407 Clone,
408 ::ethers_contract::EthCall,
409 ::ethers_contract::EthDisplay,
410 Default,
411 Debug,
412 PartialEq,
413 Eq,
414 Hash
415 )]
416 #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")]
417 pub struct OwnerOfCall {
418 pub token_id: ::ethers_core::types::U256,
419 }
420 #[derive(
422 Clone,
423 ::ethers_contract::EthCall,
424 ::ethers_contract::EthDisplay,
425 Default,
426 Debug,
427 PartialEq,
428 Eq,
429 Hash
430 )]
431 #[ethcall(
432 name = "safeTransferFrom",
433 abi = "safeTransferFrom(address,address,uint256)"
434 )]
435 pub struct SafeTransferFromCall {
436 pub from: ::ethers_core::types::Address,
437 pub to: ::ethers_core::types::Address,
438 pub token_id: ::ethers_core::types::U256,
439 }
440 #[derive(
442 Clone,
443 ::ethers_contract::EthCall,
444 ::ethers_contract::EthDisplay,
445 Default,
446 Debug,
447 PartialEq,
448 Eq,
449 Hash
450 )]
451 #[ethcall(
452 name = "safeTransferFrom",
453 abi = "safeTransferFrom(address,address,uint256,bytes)"
454 )]
455 pub struct SafeTransferFromWithFromAndToAndDataCall {
456 pub from: ::ethers_core::types::Address,
457 pub to: ::ethers_core::types::Address,
458 pub token_id: ::ethers_core::types::U256,
459 pub data: ::ethers_core::types::Bytes,
460 }
461 #[derive(
463 Clone,
464 ::ethers_contract::EthCall,
465 ::ethers_contract::EthDisplay,
466 Default,
467 Debug,
468 PartialEq,
469 Eq,
470 Hash
471 )]
472 #[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")]
473 pub struct SetApprovalForAllCall {
474 pub operator: ::ethers_core::types::Address,
475 pub approved: bool,
476 }
477 #[derive(
479 Clone,
480 ::ethers_contract::EthCall,
481 ::ethers_contract::EthDisplay,
482 Default,
483 Debug,
484 PartialEq,
485 Eq,
486 Hash
487 )]
488 #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")]
489 pub struct SupportsInterfaceCall {
490 pub interface_id: [u8; 4],
491 }
492 #[derive(
494 Clone,
495 ::ethers_contract::EthCall,
496 ::ethers_contract::EthDisplay,
497 Default,
498 Debug,
499 PartialEq,
500 Eq,
501 Hash
502 )]
503 #[ethcall(name = "symbol", abi = "symbol()")]
504 pub struct SymbolCall;
505 #[derive(
507 Clone,
508 ::ethers_contract::EthCall,
509 ::ethers_contract::EthDisplay,
510 Default,
511 Debug,
512 PartialEq,
513 Eq,
514 Hash
515 )]
516 #[ethcall(name = "tokenURI", abi = "tokenURI(uint256)")]
517 pub struct TokenURICall {
518 pub token_id: ::ethers_core::types::U256,
519 }
520 #[derive(
522 Clone,
523 ::ethers_contract::EthCall,
524 ::ethers_contract::EthDisplay,
525 Default,
526 Debug,
527 PartialEq,
528 Eq,
529 Hash
530 )]
531 #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")]
532 pub struct TransferFromCall {
533 pub from: ::ethers_core::types::Address,
534 pub to: ::ethers_core::types::Address,
535 pub token_id: ::ethers_core::types::U256,
536 }
537 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
539 pub enum IERC721MetadataCalls {
540 Approve(ApproveCall),
541 BalanceOf(BalanceOfCall),
542 GetApproved(GetApprovedCall),
543 IsApprovedForAll(IsApprovedForAllCall),
544 Name(NameCall),
545 OwnerOf(OwnerOfCall),
546 SafeTransferFrom(SafeTransferFromCall),
547 SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall),
548 SetApprovalForAll(SetApprovalForAllCall),
549 SupportsInterface(SupportsInterfaceCall),
550 Symbol(SymbolCall),
551 TokenURI(TokenURICall),
552 TransferFrom(TransferFromCall),
553 }
554 impl ::ethers_core::abi::AbiDecode for IERC721MetadataCalls {
555 fn decode(
556 data: impl AsRef<[u8]>,
557 ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
558 let data = data.as_ref();
559 if let Ok(decoded)
560 = <ApproveCall as ::ethers_core::abi::AbiDecode>::decode(data) {
561 return Ok(Self::Approve(decoded));
562 }
563 if let Ok(decoded)
564 = <BalanceOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
565 return Ok(Self::BalanceOf(decoded));
566 }
567 if let Ok(decoded)
568 = <GetApprovedCall as ::ethers_core::abi::AbiDecode>::decode(data) {
569 return Ok(Self::GetApproved(decoded));
570 }
571 if let Ok(decoded)
572 = <IsApprovedForAllCall as ::ethers_core::abi::AbiDecode>::decode(data) {
573 return Ok(Self::IsApprovedForAll(decoded));
574 }
575 if let Ok(decoded)
576 = <NameCall as ::ethers_core::abi::AbiDecode>::decode(data) {
577 return Ok(Self::Name(decoded));
578 }
579 if let Ok(decoded)
580 = <OwnerOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
581 return Ok(Self::OwnerOf(decoded));
582 }
583 if let Ok(decoded)
584 = <SafeTransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
585 return Ok(Self::SafeTransferFrom(decoded));
586 }
587 if let Ok(decoded)
588 = <SafeTransferFromWithFromAndToAndDataCall as ::ethers_core::abi::AbiDecode>::decode(
589 data,
590 ) {
591 return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded));
592 }
593 if let Ok(decoded)
594 = <SetApprovalForAllCall as ::ethers_core::abi::AbiDecode>::decode(
595 data,
596 ) {
597 return Ok(Self::SetApprovalForAll(decoded));
598 }
599 if let Ok(decoded)
600 = <SupportsInterfaceCall as ::ethers_core::abi::AbiDecode>::decode(
601 data,
602 ) {
603 return Ok(Self::SupportsInterface(decoded));
604 }
605 if let Ok(decoded)
606 = <SymbolCall as ::ethers_core::abi::AbiDecode>::decode(data) {
607 return Ok(Self::Symbol(decoded));
608 }
609 if let Ok(decoded)
610 = <TokenURICall as ::ethers_core::abi::AbiDecode>::decode(data) {
611 return Ok(Self::TokenURI(decoded));
612 }
613 if let Ok(decoded)
614 = <TransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
615 return Ok(Self::TransferFrom(decoded));
616 }
617 Err(::ethers_core::abi::Error::InvalidData.into())
618 }
619 }
620 impl ::ethers_core::abi::AbiEncode for IERC721MetadataCalls {
621 fn encode(self) -> Vec<u8> {
622 match self {
623 Self::Approve(element) => ::ethers_core::abi::AbiEncode::encode(element),
624 Self::BalanceOf(element) => {
625 ::ethers_core::abi::AbiEncode::encode(element)
626 }
627 Self::GetApproved(element) => {
628 ::ethers_core::abi::AbiEncode::encode(element)
629 }
630 Self::IsApprovedForAll(element) => {
631 ::ethers_core::abi::AbiEncode::encode(element)
632 }
633 Self::Name(element) => ::ethers_core::abi::AbiEncode::encode(element),
634 Self::OwnerOf(element) => ::ethers_core::abi::AbiEncode::encode(element),
635 Self::SafeTransferFrom(element) => {
636 ::ethers_core::abi::AbiEncode::encode(element)
637 }
638 Self::SafeTransferFromWithFromAndToAndData(element) => {
639 ::ethers_core::abi::AbiEncode::encode(element)
640 }
641 Self::SetApprovalForAll(element) => {
642 ::ethers_core::abi::AbiEncode::encode(element)
643 }
644 Self::SupportsInterface(element) => {
645 ::ethers_core::abi::AbiEncode::encode(element)
646 }
647 Self::Symbol(element) => ::ethers_core::abi::AbiEncode::encode(element),
648 Self::TokenURI(element) => ::ethers_core::abi::AbiEncode::encode(element),
649 Self::TransferFrom(element) => {
650 ::ethers_core::abi::AbiEncode::encode(element)
651 }
652 }
653 }
654 }
655 impl ::core::fmt::Display for IERC721MetadataCalls {
656 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
657 match self {
658 Self::Approve(element) => ::core::fmt::Display::fmt(element, f),
659 Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f),
660 Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f),
661 Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f),
662 Self::Name(element) => ::core::fmt::Display::fmt(element, f),
663 Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f),
664 Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f),
665 Self::SafeTransferFromWithFromAndToAndData(element) => {
666 ::core::fmt::Display::fmt(element, f)
667 }
668 Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f),
669 Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f),
670 Self::Symbol(element) => ::core::fmt::Display::fmt(element, f),
671 Self::TokenURI(element) => ::core::fmt::Display::fmt(element, f),
672 Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f),
673 }
674 }
675 }
676 impl ::core::convert::From<ApproveCall> for IERC721MetadataCalls {
677 fn from(value: ApproveCall) -> Self {
678 Self::Approve(value)
679 }
680 }
681 impl ::core::convert::From<BalanceOfCall> for IERC721MetadataCalls {
682 fn from(value: BalanceOfCall) -> Self {
683 Self::BalanceOf(value)
684 }
685 }
686 impl ::core::convert::From<GetApprovedCall> for IERC721MetadataCalls {
687 fn from(value: GetApprovedCall) -> Self {
688 Self::GetApproved(value)
689 }
690 }
691 impl ::core::convert::From<IsApprovedForAllCall> for IERC721MetadataCalls {
692 fn from(value: IsApprovedForAllCall) -> Self {
693 Self::IsApprovedForAll(value)
694 }
695 }
696 impl ::core::convert::From<NameCall> for IERC721MetadataCalls {
697 fn from(value: NameCall) -> Self {
698 Self::Name(value)
699 }
700 }
701 impl ::core::convert::From<OwnerOfCall> for IERC721MetadataCalls {
702 fn from(value: OwnerOfCall) -> Self {
703 Self::OwnerOf(value)
704 }
705 }
706 impl ::core::convert::From<SafeTransferFromCall> for IERC721MetadataCalls {
707 fn from(value: SafeTransferFromCall) -> Self {
708 Self::SafeTransferFrom(value)
709 }
710 }
711 impl ::core::convert::From<SafeTransferFromWithFromAndToAndDataCall>
712 for IERC721MetadataCalls {
713 fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self {
714 Self::SafeTransferFromWithFromAndToAndData(value)
715 }
716 }
717 impl ::core::convert::From<SetApprovalForAllCall> for IERC721MetadataCalls {
718 fn from(value: SetApprovalForAllCall) -> Self {
719 Self::SetApprovalForAll(value)
720 }
721 }
722 impl ::core::convert::From<SupportsInterfaceCall> for IERC721MetadataCalls {
723 fn from(value: SupportsInterfaceCall) -> Self {
724 Self::SupportsInterface(value)
725 }
726 }
727 impl ::core::convert::From<SymbolCall> for IERC721MetadataCalls {
728 fn from(value: SymbolCall) -> Self {
729 Self::Symbol(value)
730 }
731 }
732 impl ::core::convert::From<TokenURICall> for IERC721MetadataCalls {
733 fn from(value: TokenURICall) -> Self {
734 Self::TokenURI(value)
735 }
736 }
737 impl ::core::convert::From<TransferFromCall> for IERC721MetadataCalls {
738 fn from(value: TransferFromCall) -> Self {
739 Self::TransferFrom(value)
740 }
741 }
742 #[derive(
744 Clone,
745 ::ethers_contract::EthAbiType,
746 ::ethers_contract::EthAbiCodec,
747 Default,
748 Debug,
749 PartialEq,
750 Eq,
751 Hash
752 )]
753 pub struct BalanceOfReturn {
754 pub balance: ::ethers_core::types::U256,
755 }
756 #[derive(
758 Clone,
759 ::ethers_contract::EthAbiType,
760 ::ethers_contract::EthAbiCodec,
761 Default,
762 Debug,
763 PartialEq,
764 Eq,
765 Hash
766 )]
767 pub struct GetApprovedReturn {
768 pub operator: ::ethers_core::types::Address,
769 }
770 #[derive(
772 Clone,
773 ::ethers_contract::EthAbiType,
774 ::ethers_contract::EthAbiCodec,
775 Default,
776 Debug,
777 PartialEq,
778 Eq,
779 Hash
780 )]
781 pub struct IsApprovedForAllReturn(pub bool);
782 #[derive(
784 Clone,
785 ::ethers_contract::EthAbiType,
786 ::ethers_contract::EthAbiCodec,
787 Default,
788 Debug,
789 PartialEq,
790 Eq,
791 Hash
792 )]
793 pub struct NameReturn(pub ::std::string::String);
794 #[derive(
796 Clone,
797 ::ethers_contract::EthAbiType,
798 ::ethers_contract::EthAbiCodec,
799 Default,
800 Debug,
801 PartialEq,
802 Eq,
803 Hash
804 )]
805 pub struct OwnerOfReturn {
806 pub owner: ::ethers_core::types::Address,
807 }
808 #[derive(
810 Clone,
811 ::ethers_contract::EthAbiType,
812 ::ethers_contract::EthAbiCodec,
813 Default,
814 Debug,
815 PartialEq,
816 Eq,
817 Hash
818 )]
819 pub struct SupportsInterfaceReturn(pub bool);
820 #[derive(
822 Clone,
823 ::ethers_contract::EthAbiType,
824 ::ethers_contract::EthAbiCodec,
825 Default,
826 Debug,
827 PartialEq,
828 Eq,
829 Hash
830 )]
831 pub struct SymbolReturn(pub ::std::string::String);
832 #[derive(
834 Clone,
835 ::ethers_contract::EthAbiType,
836 ::ethers_contract::EthAbiCodec,
837 Default,
838 Debug,
839 PartialEq,
840 Eq,
841 Hash
842 )]
843 pub struct TokenURIReturn(pub ::std::string::String);
844}