openzeppelin_rs/contracts/
IERC721.rs

1pub use ierc721::*;
2/// This module was auto-generated with ethers-rs Abigen.
3/// More information at: <https://github.com/gakonst/ethers-rs>
4#[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 {
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\":[{\"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\":[{\"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    ///The parsed JSON ABI of the contract.
16    pub static IERC721_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 IERC721<M>(::ethers_contract::Contract<M>);
19    impl<M> ::core::clone::Clone for IERC721<M> {
20        fn clone(&self) -> Self {
21            Self(::core::clone::Clone::clone(&self.0))
22        }
23    }
24    impl<M> ::core::ops::Deref for IERC721<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 IERC721<M> {
31        fn deref_mut(&mut self) -> &mut Self::Target {
32            &mut self.0
33        }
34    }
35    impl<M> ::core::fmt::Debug for IERC721<M> {
36        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
37            f.debug_tuple(stringify!(IERC721)).field(&self.address()).finish()
38        }
39    }
40    impl<M: ::ethers_providers::Middleware> IERC721<M> {
41        /// Creates a new contract instance with the specified `ethers` client at
42        /// `address`. The contract derefs to a `ethers::Contract` object.
43        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                    IERC721_ABI.clone(),
51                    client,
52                ),
53            )
54        }
55        ///Calls the contract's `approve` (0x095ea7b3) function
56        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        ///Calls the contract's `balanceOf` (0x70a08231) function
66        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        ///Calls the contract's `getApproved` (0x081812fc) function
75        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        ///Calls the contract's `isApprovedForAll` (0xe985e9c5) function
87        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        ///Calls the contract's `ownerOf` (0x6352211e) function
97        pub fn owner_of(
98            &self,
99            token_id: ::ethers_core::types::U256,
100        ) -> ::ethers_contract::builders::ContractCall<
101            M,
102            ::ethers_core::types::Address,
103        > {
104            self.0
105                .method_hash([99, 82, 33, 30], token_id)
106                .expect("method not found (this should never happen)")
107        }
108        ///Calls the contract's `safeTransferFrom` (0x42842e0e) function
109        pub fn safe_transfer_from(
110            &self,
111            from: ::ethers_core::types::Address,
112            to: ::ethers_core::types::Address,
113            token_id: ::ethers_core::types::U256,
114        ) -> ::ethers_contract::builders::ContractCall<M, ()> {
115            self.0
116                .method_hash([66, 132, 46, 14], (from, to, token_id))
117                .expect("method not found (this should never happen)")
118        }
119        ///Calls the contract's `safeTransferFrom` (0xb88d4fde) function
120        pub fn safe_transfer_from_with_from_and_to_and_data(
121            &self,
122            from: ::ethers_core::types::Address,
123            to: ::ethers_core::types::Address,
124            token_id: ::ethers_core::types::U256,
125            data: ::ethers_core::types::Bytes,
126        ) -> ::ethers_contract::builders::ContractCall<M, ()> {
127            self.0
128                .method_hash([184, 141, 79, 222], (from, to, token_id, data))
129                .expect("method not found (this should never happen)")
130        }
131        ///Calls the contract's `setApprovalForAll` (0xa22cb465) function
132        pub fn set_approval_for_all(
133            &self,
134            operator: ::ethers_core::types::Address,
135            approved: bool,
136        ) -> ::ethers_contract::builders::ContractCall<M, ()> {
137            self.0
138                .method_hash([162, 44, 180, 101], (operator, approved))
139                .expect("method not found (this should never happen)")
140        }
141        ///Calls the contract's `supportsInterface` (0x01ffc9a7) function
142        pub fn supports_interface(
143            &self,
144            interface_id: [u8; 4],
145        ) -> ::ethers_contract::builders::ContractCall<M, bool> {
146            self.0
147                .method_hash([1, 255, 201, 167], interface_id)
148                .expect("method not found (this should never happen)")
149        }
150        ///Calls the contract's `transferFrom` (0x23b872dd) function
151        pub fn transfer_from(
152            &self,
153            from: ::ethers_core::types::Address,
154            to: ::ethers_core::types::Address,
155            token_id: ::ethers_core::types::U256,
156        ) -> ::ethers_contract::builders::ContractCall<M, ()> {
157            self.0
158                .method_hash([35, 184, 114, 221], (from, to, token_id))
159                .expect("method not found (this should never happen)")
160        }
161        ///Gets the contract's `Approval` event
162        pub fn approval_filter(
163            &self,
164        ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, ApprovalFilter> {
165            self.0.event()
166        }
167        ///Gets the contract's `ApprovalForAll` event
168        pub fn approval_for_all_filter(
169            &self,
170        ) -> ::ethers_contract::builders::Event<
171            ::std::sync::Arc<M>,
172            M,
173            ApprovalForAllFilter,
174        > {
175            self.0.event()
176        }
177        ///Gets the contract's `Transfer` event
178        pub fn transfer_filter(
179            &self,
180        ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, TransferFilter> {
181            self.0.event()
182        }
183        /// Returns an `Event` builder for all the events of this contract.
184        pub fn events(
185            &self,
186        ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, IERC721Events> {
187            self.0.event_with_filter(::core::default::Default::default())
188        }
189    }
190    impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
191    for IERC721<M> {
192        fn from(contract: ::ethers_contract::Contract<M>) -> Self {
193            Self::new(contract.address(), contract.client())
194        }
195    }
196    #[derive(
197        Clone,
198        ::ethers_contract::EthEvent,
199        ::ethers_contract::EthDisplay,
200        Default,
201        Debug,
202        PartialEq,
203        Eq,
204        Hash
205    )]
206    #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")]
207    pub struct ApprovalFilter {
208        #[ethevent(indexed)]
209        pub owner: ::ethers_core::types::Address,
210        #[ethevent(indexed)]
211        pub approved: ::ethers_core::types::Address,
212        #[ethevent(indexed)]
213        pub token_id: ::ethers_core::types::U256,
214    }
215    #[derive(
216        Clone,
217        ::ethers_contract::EthEvent,
218        ::ethers_contract::EthDisplay,
219        Default,
220        Debug,
221        PartialEq,
222        Eq,
223        Hash
224    )]
225    #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")]
226    pub struct ApprovalForAllFilter {
227        #[ethevent(indexed)]
228        pub owner: ::ethers_core::types::Address,
229        #[ethevent(indexed)]
230        pub operator: ::ethers_core::types::Address,
231        pub approved: bool,
232    }
233    #[derive(
234        Clone,
235        ::ethers_contract::EthEvent,
236        ::ethers_contract::EthDisplay,
237        Default,
238        Debug,
239        PartialEq,
240        Eq,
241        Hash
242    )]
243    #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")]
244    pub struct TransferFilter {
245        #[ethevent(indexed)]
246        pub from: ::ethers_core::types::Address,
247        #[ethevent(indexed)]
248        pub to: ::ethers_core::types::Address,
249        #[ethevent(indexed)]
250        pub token_id: ::ethers_core::types::U256,
251    }
252    ///Container type for all of the contract's events
253    #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
254    pub enum IERC721Events {
255        ApprovalFilter(ApprovalFilter),
256        ApprovalForAllFilter(ApprovalForAllFilter),
257        TransferFilter(TransferFilter),
258    }
259    impl ::ethers_contract::EthLogDecode for IERC721Events {
260        fn decode_log(
261            log: &::ethers_core::abi::RawLog,
262        ) -> ::core::result::Result<Self, ::ethers_core::abi::Error> {
263            if let Ok(decoded) = ApprovalFilter::decode_log(log) {
264                return Ok(IERC721Events::ApprovalFilter(decoded));
265            }
266            if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) {
267                return Ok(IERC721Events::ApprovalForAllFilter(decoded));
268            }
269            if let Ok(decoded) = TransferFilter::decode_log(log) {
270                return Ok(IERC721Events::TransferFilter(decoded));
271            }
272            Err(::ethers_core::abi::Error::InvalidData)
273        }
274    }
275    impl ::core::fmt::Display for IERC721Events {
276        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
277            match self {
278                Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f),
279                Self::ApprovalForAllFilter(element) => {
280                    ::core::fmt::Display::fmt(element, f)
281                }
282                Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f),
283            }
284        }
285    }
286    impl ::core::convert::From<ApprovalFilter> for IERC721Events {
287        fn from(value: ApprovalFilter) -> Self {
288            Self::ApprovalFilter(value)
289        }
290    }
291    impl ::core::convert::From<ApprovalForAllFilter> for IERC721Events {
292        fn from(value: ApprovalForAllFilter) -> Self {
293            Self::ApprovalForAllFilter(value)
294        }
295    }
296    impl ::core::convert::From<TransferFilter> for IERC721Events {
297        fn from(value: TransferFilter) -> Self {
298            Self::TransferFilter(value)
299        }
300    }
301    ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3`
302    #[derive(
303        Clone,
304        ::ethers_contract::EthCall,
305        ::ethers_contract::EthDisplay,
306        Default,
307        Debug,
308        PartialEq,
309        Eq,
310        Hash
311    )]
312    #[ethcall(name = "approve", abi = "approve(address,uint256)")]
313    pub struct ApproveCall {
314        pub to: ::ethers_core::types::Address,
315        pub token_id: ::ethers_core::types::U256,
316    }
317    ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231`
318    #[derive(
319        Clone,
320        ::ethers_contract::EthCall,
321        ::ethers_contract::EthDisplay,
322        Default,
323        Debug,
324        PartialEq,
325        Eq,
326        Hash
327    )]
328    #[ethcall(name = "balanceOf", abi = "balanceOf(address)")]
329    pub struct BalanceOfCall {
330        pub owner: ::ethers_core::types::Address,
331    }
332    ///Container type for all input parameters for the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc`
333    #[derive(
334        Clone,
335        ::ethers_contract::EthCall,
336        ::ethers_contract::EthDisplay,
337        Default,
338        Debug,
339        PartialEq,
340        Eq,
341        Hash
342    )]
343    #[ethcall(name = "getApproved", abi = "getApproved(uint256)")]
344    pub struct GetApprovedCall {
345        pub token_id: ::ethers_core::types::U256,
346    }
347    ///Container type for all input parameters for the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`
348    #[derive(
349        Clone,
350        ::ethers_contract::EthCall,
351        ::ethers_contract::EthDisplay,
352        Default,
353        Debug,
354        PartialEq,
355        Eq,
356        Hash
357    )]
358    #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")]
359    pub struct IsApprovedForAllCall {
360        pub owner: ::ethers_core::types::Address,
361        pub operator: ::ethers_core::types::Address,
362    }
363    ///Container type for all input parameters for the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e`
364    #[derive(
365        Clone,
366        ::ethers_contract::EthCall,
367        ::ethers_contract::EthDisplay,
368        Default,
369        Debug,
370        PartialEq,
371        Eq,
372        Hash
373    )]
374    #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")]
375    pub struct OwnerOfCall {
376        pub token_id: ::ethers_core::types::U256,
377    }
378    ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`
379    #[derive(
380        Clone,
381        ::ethers_contract::EthCall,
382        ::ethers_contract::EthDisplay,
383        Default,
384        Debug,
385        PartialEq,
386        Eq,
387        Hash
388    )]
389    #[ethcall(
390        name = "safeTransferFrom",
391        abi = "safeTransferFrom(address,address,uint256)"
392    )]
393    pub struct SafeTransferFromCall {
394        pub from: ::ethers_core::types::Address,
395        pub to: ::ethers_core::types::Address,
396        pub token_id: ::ethers_core::types::U256,
397    }
398    ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`
399    #[derive(
400        Clone,
401        ::ethers_contract::EthCall,
402        ::ethers_contract::EthDisplay,
403        Default,
404        Debug,
405        PartialEq,
406        Eq,
407        Hash
408    )]
409    #[ethcall(
410        name = "safeTransferFrom",
411        abi = "safeTransferFrom(address,address,uint256,bytes)"
412    )]
413    pub struct SafeTransferFromWithFromAndToAndDataCall {
414        pub from: ::ethers_core::types::Address,
415        pub to: ::ethers_core::types::Address,
416        pub token_id: ::ethers_core::types::U256,
417        pub data: ::ethers_core::types::Bytes,
418    }
419    ///Container type for all input parameters for the `setApprovalForAll` function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`
420    #[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    ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`
436    #[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    ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`
451    #[derive(
452        Clone,
453        ::ethers_contract::EthCall,
454        ::ethers_contract::EthDisplay,
455        Default,
456        Debug,
457        PartialEq,
458        Eq,
459        Hash
460    )]
461    #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")]
462    pub struct TransferFromCall {
463        pub from: ::ethers_core::types::Address,
464        pub to: ::ethers_core::types::Address,
465        pub token_id: ::ethers_core::types::U256,
466    }
467    ///Container type for all of the contract's call
468    #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
469    pub enum IERC721Calls {
470        Approve(ApproveCall),
471        BalanceOf(BalanceOfCall),
472        GetApproved(GetApprovedCall),
473        IsApprovedForAll(IsApprovedForAllCall),
474        OwnerOf(OwnerOfCall),
475        SafeTransferFrom(SafeTransferFromCall),
476        SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall),
477        SetApprovalForAll(SetApprovalForAllCall),
478        SupportsInterface(SupportsInterfaceCall),
479        TransferFrom(TransferFromCall),
480    }
481    impl ::ethers_core::abi::AbiDecode for IERC721Calls {
482        fn decode(
483            data: impl AsRef<[u8]>,
484        ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
485            let data = data.as_ref();
486            if let Ok(decoded)
487                = <ApproveCall as ::ethers_core::abi::AbiDecode>::decode(data) {
488                return Ok(Self::Approve(decoded));
489            }
490            if let Ok(decoded)
491                = <BalanceOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
492                return Ok(Self::BalanceOf(decoded));
493            }
494            if let Ok(decoded)
495                = <GetApprovedCall as ::ethers_core::abi::AbiDecode>::decode(data) {
496                return Ok(Self::GetApproved(decoded));
497            }
498            if let Ok(decoded)
499                = <IsApprovedForAllCall as ::ethers_core::abi::AbiDecode>::decode(data) {
500                return Ok(Self::IsApprovedForAll(decoded));
501            }
502            if let Ok(decoded)
503                = <OwnerOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
504                return Ok(Self::OwnerOf(decoded));
505            }
506            if let Ok(decoded)
507                = <SafeTransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
508                return Ok(Self::SafeTransferFrom(decoded));
509            }
510            if let Ok(decoded)
511                = <SafeTransferFromWithFromAndToAndDataCall as ::ethers_core::abi::AbiDecode>::decode(
512                    data,
513                ) {
514                return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded));
515            }
516            if let Ok(decoded)
517                = <SetApprovalForAllCall as ::ethers_core::abi::AbiDecode>::decode(
518                    data,
519                ) {
520                return Ok(Self::SetApprovalForAll(decoded));
521            }
522            if let Ok(decoded)
523                = <SupportsInterfaceCall as ::ethers_core::abi::AbiDecode>::decode(
524                    data,
525                ) {
526                return Ok(Self::SupportsInterface(decoded));
527            }
528            if let Ok(decoded)
529                = <TransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
530                return Ok(Self::TransferFrom(decoded));
531            }
532            Err(::ethers_core::abi::Error::InvalidData.into())
533        }
534    }
535    impl ::ethers_core::abi::AbiEncode for IERC721Calls {
536        fn encode(self) -> Vec<u8> {
537            match self {
538                Self::Approve(element) => ::ethers_core::abi::AbiEncode::encode(element),
539                Self::BalanceOf(element) => {
540                    ::ethers_core::abi::AbiEncode::encode(element)
541                }
542                Self::GetApproved(element) => {
543                    ::ethers_core::abi::AbiEncode::encode(element)
544                }
545                Self::IsApprovedForAll(element) => {
546                    ::ethers_core::abi::AbiEncode::encode(element)
547                }
548                Self::OwnerOf(element) => ::ethers_core::abi::AbiEncode::encode(element),
549                Self::SafeTransferFrom(element) => {
550                    ::ethers_core::abi::AbiEncode::encode(element)
551                }
552                Self::SafeTransferFromWithFromAndToAndData(element) => {
553                    ::ethers_core::abi::AbiEncode::encode(element)
554                }
555                Self::SetApprovalForAll(element) => {
556                    ::ethers_core::abi::AbiEncode::encode(element)
557                }
558                Self::SupportsInterface(element) => {
559                    ::ethers_core::abi::AbiEncode::encode(element)
560                }
561                Self::TransferFrom(element) => {
562                    ::ethers_core::abi::AbiEncode::encode(element)
563                }
564            }
565        }
566    }
567    impl ::core::fmt::Display for IERC721Calls {
568        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
569            match self {
570                Self::Approve(element) => ::core::fmt::Display::fmt(element, f),
571                Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f),
572                Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f),
573                Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f),
574                Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f),
575                Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f),
576                Self::SafeTransferFromWithFromAndToAndData(element) => {
577                    ::core::fmt::Display::fmt(element, f)
578                }
579                Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f),
580                Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f),
581                Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f),
582            }
583        }
584    }
585    impl ::core::convert::From<ApproveCall> for IERC721Calls {
586        fn from(value: ApproveCall) -> Self {
587            Self::Approve(value)
588        }
589    }
590    impl ::core::convert::From<BalanceOfCall> for IERC721Calls {
591        fn from(value: BalanceOfCall) -> Self {
592            Self::BalanceOf(value)
593        }
594    }
595    impl ::core::convert::From<GetApprovedCall> for IERC721Calls {
596        fn from(value: GetApprovedCall) -> Self {
597            Self::GetApproved(value)
598        }
599    }
600    impl ::core::convert::From<IsApprovedForAllCall> for IERC721Calls {
601        fn from(value: IsApprovedForAllCall) -> Self {
602            Self::IsApprovedForAll(value)
603        }
604    }
605    impl ::core::convert::From<OwnerOfCall> for IERC721Calls {
606        fn from(value: OwnerOfCall) -> Self {
607            Self::OwnerOf(value)
608        }
609    }
610    impl ::core::convert::From<SafeTransferFromCall> for IERC721Calls {
611        fn from(value: SafeTransferFromCall) -> Self {
612            Self::SafeTransferFrom(value)
613        }
614    }
615    impl ::core::convert::From<SafeTransferFromWithFromAndToAndDataCall>
616    for IERC721Calls {
617        fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self {
618            Self::SafeTransferFromWithFromAndToAndData(value)
619        }
620    }
621    impl ::core::convert::From<SetApprovalForAllCall> for IERC721Calls {
622        fn from(value: SetApprovalForAllCall) -> Self {
623            Self::SetApprovalForAll(value)
624        }
625    }
626    impl ::core::convert::From<SupportsInterfaceCall> for IERC721Calls {
627        fn from(value: SupportsInterfaceCall) -> Self {
628            Self::SupportsInterface(value)
629        }
630    }
631    impl ::core::convert::From<TransferFromCall> for IERC721Calls {
632        fn from(value: TransferFromCall) -> Self {
633            Self::TransferFrom(value)
634        }
635    }
636    ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231`
637    #[derive(
638        Clone,
639        ::ethers_contract::EthAbiType,
640        ::ethers_contract::EthAbiCodec,
641        Default,
642        Debug,
643        PartialEq,
644        Eq,
645        Hash
646    )]
647    pub struct BalanceOfReturn {
648        pub balance: ::ethers_core::types::U256,
649    }
650    ///Container type for all return fields from the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc`
651    #[derive(
652        Clone,
653        ::ethers_contract::EthAbiType,
654        ::ethers_contract::EthAbiCodec,
655        Default,
656        Debug,
657        PartialEq,
658        Eq,
659        Hash
660    )]
661    pub struct GetApprovedReturn {
662        pub operator: ::ethers_core::types::Address,
663    }
664    ///Container type for all return fields from the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`
665    #[derive(
666        Clone,
667        ::ethers_contract::EthAbiType,
668        ::ethers_contract::EthAbiCodec,
669        Default,
670        Debug,
671        PartialEq,
672        Eq,
673        Hash
674    )]
675    pub struct IsApprovedForAllReturn(pub bool);
676    ///Container type for all return fields from the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e`
677    #[derive(
678        Clone,
679        ::ethers_contract::EthAbiType,
680        ::ethers_contract::EthAbiCodec,
681        Default,
682        Debug,
683        PartialEq,
684        Eq,
685        Hash
686    )]
687    pub struct OwnerOfReturn {
688        pub owner: ::ethers_core::types::Address,
689    }
690    ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`
691    #[derive(
692        Clone,
693        ::ethers_contract::EthAbiType,
694        ::ethers_contract::EthAbiCodec,
695        Default,
696        Debug,
697        PartialEq,
698        Eq,
699        Hash
700    )]
701    pub struct SupportsInterfaceReturn(pub bool);
702}