openzeppelin_rs/contracts/
IERC721Enumerable.rs

1pub use ierc721_enumerable::*;
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_enumerable {
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\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"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 IERC721ENUMERABLE_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 IERC721Enumerable<M>(::ethers_contract::Contract<M>);
19    impl<M> ::core::clone::Clone for IERC721Enumerable<M> {
20        fn clone(&self) -> Self {
21            Self(::core::clone::Clone::clone(&self.0))
22        }
23    }
24    impl<M> ::core::ops::Deref for IERC721Enumerable<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 IERC721Enumerable<M> {
31        fn deref_mut(&mut self) -> &mut Self::Target {
32            &mut self.0
33        }
34    }
35    impl<M> ::core::fmt::Debug for IERC721Enumerable<M> {
36        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
37            f.debug_tuple(stringify!(IERC721Enumerable)).field(&self.address()).finish()
38        }
39    }
40    impl<M: ::ethers_providers::Middleware> IERC721Enumerable<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                    IERC721ENUMERABLE_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 `tokenByIndex` (0x4f6ccce7) function
151        pub fn token_by_index(
152            &self,
153            index: ::ethers_core::types::U256,
154        ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
155            self.0
156                .method_hash([79, 108, 204, 231], index)
157                .expect("method not found (this should never happen)")
158        }
159        ///Calls the contract's `tokenOfOwnerByIndex` (0x2f745c59) function
160        pub fn token_of_owner_by_index(
161            &self,
162            owner: ::ethers_core::types::Address,
163            index: ::ethers_core::types::U256,
164        ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
165            self.0
166                .method_hash([47, 116, 92, 89], (owner, index))
167                .expect("method not found (this should never happen)")
168        }
169        ///Calls the contract's `totalSupply` (0x18160ddd) function
170        pub fn total_supply(
171            &self,
172        ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
173            self.0
174                .method_hash([24, 22, 13, 221], ())
175                .expect("method not found (this should never happen)")
176        }
177        ///Calls the contract's `transferFrom` (0x23b872dd) function
178        pub fn transfer_from(
179            &self,
180            from: ::ethers_core::types::Address,
181            to: ::ethers_core::types::Address,
182            token_id: ::ethers_core::types::U256,
183        ) -> ::ethers_contract::builders::ContractCall<M, ()> {
184            self.0
185                .method_hash([35, 184, 114, 221], (from, to, token_id))
186                .expect("method not found (this should never happen)")
187        }
188        ///Gets the contract's `Approval` event
189        pub fn approval_filter(
190            &self,
191        ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, ApprovalFilter> {
192            self.0.event()
193        }
194        ///Gets the contract's `ApprovalForAll` event
195        pub fn approval_for_all_filter(
196            &self,
197        ) -> ::ethers_contract::builders::Event<
198            ::std::sync::Arc<M>,
199            M,
200            ApprovalForAllFilter,
201        > {
202            self.0.event()
203        }
204        ///Gets the contract's `Transfer` event
205        pub fn transfer_filter(
206            &self,
207        ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, TransferFilter> {
208            self.0.event()
209        }
210        /// Returns an `Event` builder for all the events of this contract.
211        pub fn events(
212            &self,
213        ) -> ::ethers_contract::builders::Event<
214            ::std::sync::Arc<M>,
215            M,
216            IERC721EnumerableEvents,
217        > {
218            self.0.event_with_filter(::core::default::Default::default())
219        }
220    }
221    impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
222    for IERC721Enumerable<M> {
223        fn from(contract: ::ethers_contract::Contract<M>) -> Self {
224            Self::new(contract.address(), contract.client())
225        }
226    }
227    #[derive(
228        Clone,
229        ::ethers_contract::EthEvent,
230        ::ethers_contract::EthDisplay,
231        Default,
232        Debug,
233        PartialEq,
234        Eq,
235        Hash
236    )]
237    #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")]
238    pub struct ApprovalFilter {
239        #[ethevent(indexed)]
240        pub owner: ::ethers_core::types::Address,
241        #[ethevent(indexed)]
242        pub approved: ::ethers_core::types::Address,
243        #[ethevent(indexed)]
244        pub token_id: ::ethers_core::types::U256,
245    }
246    #[derive(
247        Clone,
248        ::ethers_contract::EthEvent,
249        ::ethers_contract::EthDisplay,
250        Default,
251        Debug,
252        PartialEq,
253        Eq,
254        Hash
255    )]
256    #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")]
257    pub struct ApprovalForAllFilter {
258        #[ethevent(indexed)]
259        pub owner: ::ethers_core::types::Address,
260        #[ethevent(indexed)]
261        pub operator: ::ethers_core::types::Address,
262        pub approved: bool,
263    }
264    #[derive(
265        Clone,
266        ::ethers_contract::EthEvent,
267        ::ethers_contract::EthDisplay,
268        Default,
269        Debug,
270        PartialEq,
271        Eq,
272        Hash
273    )]
274    #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")]
275    pub struct TransferFilter {
276        #[ethevent(indexed)]
277        pub from: ::ethers_core::types::Address,
278        #[ethevent(indexed)]
279        pub to: ::ethers_core::types::Address,
280        #[ethevent(indexed)]
281        pub token_id: ::ethers_core::types::U256,
282    }
283    ///Container type for all of the contract's events
284    #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
285    pub enum IERC721EnumerableEvents {
286        ApprovalFilter(ApprovalFilter),
287        ApprovalForAllFilter(ApprovalForAllFilter),
288        TransferFilter(TransferFilter),
289    }
290    impl ::ethers_contract::EthLogDecode for IERC721EnumerableEvents {
291        fn decode_log(
292            log: &::ethers_core::abi::RawLog,
293        ) -> ::core::result::Result<Self, ::ethers_core::abi::Error> {
294            if let Ok(decoded) = ApprovalFilter::decode_log(log) {
295                return Ok(IERC721EnumerableEvents::ApprovalFilter(decoded));
296            }
297            if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) {
298                return Ok(IERC721EnumerableEvents::ApprovalForAllFilter(decoded));
299            }
300            if let Ok(decoded) = TransferFilter::decode_log(log) {
301                return Ok(IERC721EnumerableEvents::TransferFilter(decoded));
302            }
303            Err(::ethers_core::abi::Error::InvalidData)
304        }
305    }
306    impl ::core::fmt::Display for IERC721EnumerableEvents {
307        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
308            match self {
309                Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f),
310                Self::ApprovalForAllFilter(element) => {
311                    ::core::fmt::Display::fmt(element, f)
312                }
313                Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f),
314            }
315        }
316    }
317    impl ::core::convert::From<ApprovalFilter> for IERC721EnumerableEvents {
318        fn from(value: ApprovalFilter) -> Self {
319            Self::ApprovalFilter(value)
320        }
321    }
322    impl ::core::convert::From<ApprovalForAllFilter> for IERC721EnumerableEvents {
323        fn from(value: ApprovalForAllFilter) -> Self {
324            Self::ApprovalForAllFilter(value)
325        }
326    }
327    impl ::core::convert::From<TransferFilter> for IERC721EnumerableEvents {
328        fn from(value: TransferFilter) -> Self {
329            Self::TransferFilter(value)
330        }
331    }
332    ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3`
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 = "approve", abi = "approve(address,uint256)")]
344    pub struct ApproveCall {
345        pub to: ::ethers_core::types::Address,
346        pub token_id: ::ethers_core::types::U256,
347    }
348    ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231`
349    #[derive(
350        Clone,
351        ::ethers_contract::EthCall,
352        ::ethers_contract::EthDisplay,
353        Default,
354        Debug,
355        PartialEq,
356        Eq,
357        Hash
358    )]
359    #[ethcall(name = "balanceOf", abi = "balanceOf(address)")]
360    pub struct BalanceOfCall {
361        pub owner: ::ethers_core::types::Address,
362    }
363    ///Container type for all input parameters for the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc`
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 = "getApproved", abi = "getApproved(uint256)")]
375    pub struct GetApprovedCall {
376        pub token_id: ::ethers_core::types::U256,
377    }
378    ///Container type for all input parameters for the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`
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(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")]
390    pub struct IsApprovedForAllCall {
391        pub owner: ::ethers_core::types::Address,
392        pub operator: ::ethers_core::types::Address,
393    }
394    ///Container type for all input parameters for the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e`
395    #[derive(
396        Clone,
397        ::ethers_contract::EthCall,
398        ::ethers_contract::EthDisplay,
399        Default,
400        Debug,
401        PartialEq,
402        Eq,
403        Hash
404    )]
405    #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")]
406    pub struct OwnerOfCall {
407        pub token_id: ::ethers_core::types::U256,
408    }
409    ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`
410    #[derive(
411        Clone,
412        ::ethers_contract::EthCall,
413        ::ethers_contract::EthDisplay,
414        Default,
415        Debug,
416        PartialEq,
417        Eq,
418        Hash
419    )]
420    #[ethcall(
421        name = "safeTransferFrom",
422        abi = "safeTransferFrom(address,address,uint256)"
423    )]
424    pub struct SafeTransferFromCall {
425        pub from: ::ethers_core::types::Address,
426        pub to: ::ethers_core::types::Address,
427        pub token_id: ::ethers_core::types::U256,
428    }
429    ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`
430    #[derive(
431        Clone,
432        ::ethers_contract::EthCall,
433        ::ethers_contract::EthDisplay,
434        Default,
435        Debug,
436        PartialEq,
437        Eq,
438        Hash
439    )]
440    #[ethcall(
441        name = "safeTransferFrom",
442        abi = "safeTransferFrom(address,address,uint256,bytes)"
443    )]
444    pub struct SafeTransferFromWithFromAndToAndDataCall {
445        pub from: ::ethers_core::types::Address,
446        pub to: ::ethers_core::types::Address,
447        pub token_id: ::ethers_core::types::U256,
448        pub data: ::ethers_core::types::Bytes,
449    }
450    ///Container type for all input parameters for the `setApprovalForAll` function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`
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 = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")]
462    pub struct SetApprovalForAllCall {
463        pub operator: ::ethers_core::types::Address,
464        pub approved: bool,
465    }
466    ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`
467    #[derive(
468        Clone,
469        ::ethers_contract::EthCall,
470        ::ethers_contract::EthDisplay,
471        Default,
472        Debug,
473        PartialEq,
474        Eq,
475        Hash
476    )]
477    #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")]
478    pub struct SupportsInterfaceCall {
479        pub interface_id: [u8; 4],
480    }
481    ///Container type for all input parameters for the `tokenByIndex` function with signature `tokenByIndex(uint256)` and selector `0x4f6ccce7`
482    #[derive(
483        Clone,
484        ::ethers_contract::EthCall,
485        ::ethers_contract::EthDisplay,
486        Default,
487        Debug,
488        PartialEq,
489        Eq,
490        Hash
491    )]
492    #[ethcall(name = "tokenByIndex", abi = "tokenByIndex(uint256)")]
493    pub struct TokenByIndexCall {
494        pub index: ::ethers_core::types::U256,
495    }
496    ///Container type for all input parameters for the `tokenOfOwnerByIndex` function with signature `tokenOfOwnerByIndex(address,uint256)` and selector `0x2f745c59`
497    #[derive(
498        Clone,
499        ::ethers_contract::EthCall,
500        ::ethers_contract::EthDisplay,
501        Default,
502        Debug,
503        PartialEq,
504        Eq,
505        Hash
506    )]
507    #[ethcall(
508        name = "tokenOfOwnerByIndex",
509        abi = "tokenOfOwnerByIndex(address,uint256)"
510    )]
511    pub struct TokenOfOwnerByIndexCall {
512        pub owner: ::ethers_core::types::Address,
513        pub index: ::ethers_core::types::U256,
514    }
515    ///Container type for all input parameters for the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd`
516    #[derive(
517        Clone,
518        ::ethers_contract::EthCall,
519        ::ethers_contract::EthDisplay,
520        Default,
521        Debug,
522        PartialEq,
523        Eq,
524        Hash
525    )]
526    #[ethcall(name = "totalSupply", abi = "totalSupply()")]
527    pub struct TotalSupplyCall;
528    ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`
529    #[derive(
530        Clone,
531        ::ethers_contract::EthCall,
532        ::ethers_contract::EthDisplay,
533        Default,
534        Debug,
535        PartialEq,
536        Eq,
537        Hash
538    )]
539    #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")]
540    pub struct TransferFromCall {
541        pub from: ::ethers_core::types::Address,
542        pub to: ::ethers_core::types::Address,
543        pub token_id: ::ethers_core::types::U256,
544    }
545    ///Container type for all of the contract's call
546    #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
547    pub enum IERC721EnumerableCalls {
548        Approve(ApproveCall),
549        BalanceOf(BalanceOfCall),
550        GetApproved(GetApprovedCall),
551        IsApprovedForAll(IsApprovedForAllCall),
552        OwnerOf(OwnerOfCall),
553        SafeTransferFrom(SafeTransferFromCall),
554        SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall),
555        SetApprovalForAll(SetApprovalForAllCall),
556        SupportsInterface(SupportsInterfaceCall),
557        TokenByIndex(TokenByIndexCall),
558        TokenOfOwnerByIndex(TokenOfOwnerByIndexCall),
559        TotalSupply(TotalSupplyCall),
560        TransferFrom(TransferFromCall),
561    }
562    impl ::ethers_core::abi::AbiDecode for IERC721EnumerableCalls {
563        fn decode(
564            data: impl AsRef<[u8]>,
565        ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
566            let data = data.as_ref();
567            if let Ok(decoded)
568                = <ApproveCall as ::ethers_core::abi::AbiDecode>::decode(data) {
569                return Ok(Self::Approve(decoded));
570            }
571            if let Ok(decoded)
572                = <BalanceOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
573                return Ok(Self::BalanceOf(decoded));
574            }
575            if let Ok(decoded)
576                = <GetApprovedCall as ::ethers_core::abi::AbiDecode>::decode(data) {
577                return Ok(Self::GetApproved(decoded));
578            }
579            if let Ok(decoded)
580                = <IsApprovedForAllCall as ::ethers_core::abi::AbiDecode>::decode(data) {
581                return Ok(Self::IsApprovedForAll(decoded));
582            }
583            if let Ok(decoded)
584                = <OwnerOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
585                return Ok(Self::OwnerOf(decoded));
586            }
587            if let Ok(decoded)
588                = <SafeTransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
589                return Ok(Self::SafeTransferFrom(decoded));
590            }
591            if let Ok(decoded)
592                = <SafeTransferFromWithFromAndToAndDataCall as ::ethers_core::abi::AbiDecode>::decode(
593                    data,
594                ) {
595                return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded));
596            }
597            if let Ok(decoded)
598                = <SetApprovalForAllCall as ::ethers_core::abi::AbiDecode>::decode(
599                    data,
600                ) {
601                return Ok(Self::SetApprovalForAll(decoded));
602            }
603            if let Ok(decoded)
604                = <SupportsInterfaceCall as ::ethers_core::abi::AbiDecode>::decode(
605                    data,
606                ) {
607                return Ok(Self::SupportsInterface(decoded));
608            }
609            if let Ok(decoded)
610                = <TokenByIndexCall as ::ethers_core::abi::AbiDecode>::decode(data) {
611                return Ok(Self::TokenByIndex(decoded));
612            }
613            if let Ok(decoded)
614                = <TokenOfOwnerByIndexCall as ::ethers_core::abi::AbiDecode>::decode(
615                    data,
616                ) {
617                return Ok(Self::TokenOfOwnerByIndex(decoded));
618            }
619            if let Ok(decoded)
620                = <TotalSupplyCall as ::ethers_core::abi::AbiDecode>::decode(data) {
621                return Ok(Self::TotalSupply(decoded));
622            }
623            if let Ok(decoded)
624                = <TransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
625                return Ok(Self::TransferFrom(decoded));
626            }
627            Err(::ethers_core::abi::Error::InvalidData.into())
628        }
629    }
630    impl ::ethers_core::abi::AbiEncode for IERC721EnumerableCalls {
631        fn encode(self) -> Vec<u8> {
632            match self {
633                Self::Approve(element) => ::ethers_core::abi::AbiEncode::encode(element),
634                Self::BalanceOf(element) => {
635                    ::ethers_core::abi::AbiEncode::encode(element)
636                }
637                Self::GetApproved(element) => {
638                    ::ethers_core::abi::AbiEncode::encode(element)
639                }
640                Self::IsApprovedForAll(element) => {
641                    ::ethers_core::abi::AbiEncode::encode(element)
642                }
643                Self::OwnerOf(element) => ::ethers_core::abi::AbiEncode::encode(element),
644                Self::SafeTransferFrom(element) => {
645                    ::ethers_core::abi::AbiEncode::encode(element)
646                }
647                Self::SafeTransferFromWithFromAndToAndData(element) => {
648                    ::ethers_core::abi::AbiEncode::encode(element)
649                }
650                Self::SetApprovalForAll(element) => {
651                    ::ethers_core::abi::AbiEncode::encode(element)
652                }
653                Self::SupportsInterface(element) => {
654                    ::ethers_core::abi::AbiEncode::encode(element)
655                }
656                Self::TokenByIndex(element) => {
657                    ::ethers_core::abi::AbiEncode::encode(element)
658                }
659                Self::TokenOfOwnerByIndex(element) => {
660                    ::ethers_core::abi::AbiEncode::encode(element)
661                }
662                Self::TotalSupply(element) => {
663                    ::ethers_core::abi::AbiEncode::encode(element)
664                }
665                Self::TransferFrom(element) => {
666                    ::ethers_core::abi::AbiEncode::encode(element)
667                }
668            }
669        }
670    }
671    impl ::core::fmt::Display for IERC721EnumerableCalls {
672        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
673            match self {
674                Self::Approve(element) => ::core::fmt::Display::fmt(element, f),
675                Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f),
676                Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f),
677                Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f),
678                Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f),
679                Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f),
680                Self::SafeTransferFromWithFromAndToAndData(element) => {
681                    ::core::fmt::Display::fmt(element, f)
682                }
683                Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f),
684                Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f),
685                Self::TokenByIndex(element) => ::core::fmt::Display::fmt(element, f),
686                Self::TokenOfOwnerByIndex(element) => {
687                    ::core::fmt::Display::fmt(element, f)
688                }
689                Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f),
690                Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f),
691            }
692        }
693    }
694    impl ::core::convert::From<ApproveCall> for IERC721EnumerableCalls {
695        fn from(value: ApproveCall) -> Self {
696            Self::Approve(value)
697        }
698    }
699    impl ::core::convert::From<BalanceOfCall> for IERC721EnumerableCalls {
700        fn from(value: BalanceOfCall) -> Self {
701            Self::BalanceOf(value)
702        }
703    }
704    impl ::core::convert::From<GetApprovedCall> for IERC721EnumerableCalls {
705        fn from(value: GetApprovedCall) -> Self {
706            Self::GetApproved(value)
707        }
708    }
709    impl ::core::convert::From<IsApprovedForAllCall> for IERC721EnumerableCalls {
710        fn from(value: IsApprovedForAllCall) -> Self {
711            Self::IsApprovedForAll(value)
712        }
713    }
714    impl ::core::convert::From<OwnerOfCall> for IERC721EnumerableCalls {
715        fn from(value: OwnerOfCall) -> Self {
716            Self::OwnerOf(value)
717        }
718    }
719    impl ::core::convert::From<SafeTransferFromCall> for IERC721EnumerableCalls {
720        fn from(value: SafeTransferFromCall) -> Self {
721            Self::SafeTransferFrom(value)
722        }
723    }
724    impl ::core::convert::From<SafeTransferFromWithFromAndToAndDataCall>
725    for IERC721EnumerableCalls {
726        fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self {
727            Self::SafeTransferFromWithFromAndToAndData(value)
728        }
729    }
730    impl ::core::convert::From<SetApprovalForAllCall> for IERC721EnumerableCalls {
731        fn from(value: SetApprovalForAllCall) -> Self {
732            Self::SetApprovalForAll(value)
733        }
734    }
735    impl ::core::convert::From<SupportsInterfaceCall> for IERC721EnumerableCalls {
736        fn from(value: SupportsInterfaceCall) -> Self {
737            Self::SupportsInterface(value)
738        }
739    }
740    impl ::core::convert::From<TokenByIndexCall> for IERC721EnumerableCalls {
741        fn from(value: TokenByIndexCall) -> Self {
742            Self::TokenByIndex(value)
743        }
744    }
745    impl ::core::convert::From<TokenOfOwnerByIndexCall> for IERC721EnumerableCalls {
746        fn from(value: TokenOfOwnerByIndexCall) -> Self {
747            Self::TokenOfOwnerByIndex(value)
748        }
749    }
750    impl ::core::convert::From<TotalSupplyCall> for IERC721EnumerableCalls {
751        fn from(value: TotalSupplyCall) -> Self {
752            Self::TotalSupply(value)
753        }
754    }
755    impl ::core::convert::From<TransferFromCall> for IERC721EnumerableCalls {
756        fn from(value: TransferFromCall) -> Self {
757            Self::TransferFrom(value)
758        }
759    }
760    ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231`
761    #[derive(
762        Clone,
763        ::ethers_contract::EthAbiType,
764        ::ethers_contract::EthAbiCodec,
765        Default,
766        Debug,
767        PartialEq,
768        Eq,
769        Hash
770    )]
771    pub struct BalanceOfReturn {
772        pub balance: ::ethers_core::types::U256,
773    }
774    ///Container type for all return fields from the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc`
775    #[derive(
776        Clone,
777        ::ethers_contract::EthAbiType,
778        ::ethers_contract::EthAbiCodec,
779        Default,
780        Debug,
781        PartialEq,
782        Eq,
783        Hash
784    )]
785    pub struct GetApprovedReturn {
786        pub operator: ::ethers_core::types::Address,
787    }
788    ///Container type for all return fields from the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`
789    #[derive(
790        Clone,
791        ::ethers_contract::EthAbiType,
792        ::ethers_contract::EthAbiCodec,
793        Default,
794        Debug,
795        PartialEq,
796        Eq,
797        Hash
798    )]
799    pub struct IsApprovedForAllReturn(pub bool);
800    ///Container type for all return fields from the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e`
801    #[derive(
802        Clone,
803        ::ethers_contract::EthAbiType,
804        ::ethers_contract::EthAbiCodec,
805        Default,
806        Debug,
807        PartialEq,
808        Eq,
809        Hash
810    )]
811    pub struct OwnerOfReturn {
812        pub owner: ::ethers_core::types::Address,
813    }
814    ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`
815    #[derive(
816        Clone,
817        ::ethers_contract::EthAbiType,
818        ::ethers_contract::EthAbiCodec,
819        Default,
820        Debug,
821        PartialEq,
822        Eq,
823        Hash
824    )]
825    pub struct SupportsInterfaceReturn(pub bool);
826    ///Container type for all return fields from the `tokenByIndex` function with signature `tokenByIndex(uint256)` and selector `0x4f6ccce7`
827    #[derive(
828        Clone,
829        ::ethers_contract::EthAbiType,
830        ::ethers_contract::EthAbiCodec,
831        Default,
832        Debug,
833        PartialEq,
834        Eq,
835        Hash
836    )]
837    pub struct TokenByIndexReturn(pub ::ethers_core::types::U256);
838    ///Container type for all return fields from the `tokenOfOwnerByIndex` function with signature `tokenOfOwnerByIndex(address,uint256)` and selector `0x2f745c59`
839    #[derive(
840        Clone,
841        ::ethers_contract::EthAbiType,
842        ::ethers_contract::EthAbiCodec,
843        Default,
844        Debug,
845        PartialEq,
846        Eq,
847        Hash
848    )]
849    pub struct TokenOfOwnerByIndexReturn(pub ::ethers_core::types::U256);
850    ///Container type for all return fields from the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd`
851    #[derive(
852        Clone,
853        ::ethers_contract::EthAbiType,
854        ::ethers_contract::EthAbiCodec,
855        Default,
856        Debug,
857        PartialEq,
858        Eq,
859        Hash
860    )]
861    pub struct TotalSupplyReturn(pub ::ethers_core::types::U256);
862}