openzeppelin_rs/contracts/
IERC4906.rs

1pub use ierc4906::*;
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 ierc4906 {
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\":\"uint256\",\"name\":\"_fromTokenId\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"_toTokenId\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"BatchMetadataUpdate\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"MetadataUpdate\",\"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 IERC4906_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 IERC4906<M>(::ethers_contract::Contract<M>);
19    impl<M> ::core::clone::Clone for IERC4906<M> {
20        fn clone(&self) -> Self {
21            Self(::core::clone::Clone::clone(&self.0))
22        }
23    }
24    impl<M> ::core::ops::Deref for IERC4906<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 IERC4906<M> {
31        fn deref_mut(&mut self) -> &mut Self::Target {
32            &mut self.0
33        }
34    }
35    impl<M> ::core::fmt::Debug for IERC4906<M> {
36        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
37            f.debug_tuple(stringify!(IERC4906)).field(&self.address()).finish()
38        }
39    }
40    impl<M: ::ethers_providers::Middleware> IERC4906<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                    IERC4906_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 `BatchMetadataUpdate` event
178        pub fn batch_metadata_update_filter(
179            &self,
180        ) -> ::ethers_contract::builders::Event<
181            ::std::sync::Arc<M>,
182            M,
183            BatchMetadataUpdateFilter,
184        > {
185            self.0.event()
186        }
187        ///Gets the contract's `MetadataUpdate` event
188        pub fn metadata_update_filter(
189            &self,
190        ) -> ::ethers_contract::builders::Event<
191            ::std::sync::Arc<M>,
192            M,
193            MetadataUpdateFilter,
194        > {
195            self.0.event()
196        }
197        ///Gets the contract's `Transfer` event
198        pub fn transfer_filter(
199            &self,
200        ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, TransferFilter> {
201            self.0.event()
202        }
203        /// Returns an `Event` builder for all the events of this contract.
204        pub fn events(
205            &self,
206        ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, IERC4906Events> {
207            self.0.event_with_filter(::core::default::Default::default())
208        }
209    }
210    impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
211    for IERC4906<M> {
212        fn from(contract: ::ethers_contract::Contract<M>) -> Self {
213            Self::new(contract.address(), contract.client())
214        }
215    }
216    #[derive(
217        Clone,
218        ::ethers_contract::EthEvent,
219        ::ethers_contract::EthDisplay,
220        Default,
221        Debug,
222        PartialEq,
223        Eq,
224        Hash
225    )]
226    #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")]
227    pub struct ApprovalFilter {
228        #[ethevent(indexed)]
229        pub owner: ::ethers_core::types::Address,
230        #[ethevent(indexed)]
231        pub approved: ::ethers_core::types::Address,
232        #[ethevent(indexed)]
233        pub token_id: ::ethers_core::types::U256,
234    }
235    #[derive(
236        Clone,
237        ::ethers_contract::EthEvent,
238        ::ethers_contract::EthDisplay,
239        Default,
240        Debug,
241        PartialEq,
242        Eq,
243        Hash
244    )]
245    #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")]
246    pub struct ApprovalForAllFilter {
247        #[ethevent(indexed)]
248        pub owner: ::ethers_core::types::Address,
249        #[ethevent(indexed)]
250        pub operator: ::ethers_core::types::Address,
251        pub approved: bool,
252    }
253    #[derive(
254        Clone,
255        ::ethers_contract::EthEvent,
256        ::ethers_contract::EthDisplay,
257        Default,
258        Debug,
259        PartialEq,
260        Eq,
261        Hash
262    )]
263    #[ethevent(
264        name = "BatchMetadataUpdate",
265        abi = "BatchMetadataUpdate(uint256,uint256)"
266    )]
267    pub struct BatchMetadataUpdateFilter {
268        pub from_token_id: ::ethers_core::types::U256,
269        pub to_token_id: ::ethers_core::types::U256,
270    }
271    #[derive(
272        Clone,
273        ::ethers_contract::EthEvent,
274        ::ethers_contract::EthDisplay,
275        Default,
276        Debug,
277        PartialEq,
278        Eq,
279        Hash
280    )]
281    #[ethevent(name = "MetadataUpdate", abi = "MetadataUpdate(uint256)")]
282    pub struct MetadataUpdateFilter {
283        pub token_id: ::ethers_core::types::U256,
284    }
285    #[derive(
286        Clone,
287        ::ethers_contract::EthEvent,
288        ::ethers_contract::EthDisplay,
289        Default,
290        Debug,
291        PartialEq,
292        Eq,
293        Hash
294    )]
295    #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")]
296    pub struct TransferFilter {
297        #[ethevent(indexed)]
298        pub from: ::ethers_core::types::Address,
299        #[ethevent(indexed)]
300        pub to: ::ethers_core::types::Address,
301        #[ethevent(indexed)]
302        pub token_id: ::ethers_core::types::U256,
303    }
304    ///Container type for all of the contract's events
305    #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
306    pub enum IERC4906Events {
307        ApprovalFilter(ApprovalFilter),
308        ApprovalForAllFilter(ApprovalForAllFilter),
309        BatchMetadataUpdateFilter(BatchMetadataUpdateFilter),
310        MetadataUpdateFilter(MetadataUpdateFilter),
311        TransferFilter(TransferFilter),
312    }
313    impl ::ethers_contract::EthLogDecode for IERC4906Events {
314        fn decode_log(
315            log: &::ethers_core::abi::RawLog,
316        ) -> ::core::result::Result<Self, ::ethers_core::abi::Error> {
317            if let Ok(decoded) = ApprovalFilter::decode_log(log) {
318                return Ok(IERC4906Events::ApprovalFilter(decoded));
319            }
320            if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) {
321                return Ok(IERC4906Events::ApprovalForAllFilter(decoded));
322            }
323            if let Ok(decoded) = BatchMetadataUpdateFilter::decode_log(log) {
324                return Ok(IERC4906Events::BatchMetadataUpdateFilter(decoded));
325            }
326            if let Ok(decoded) = MetadataUpdateFilter::decode_log(log) {
327                return Ok(IERC4906Events::MetadataUpdateFilter(decoded));
328            }
329            if let Ok(decoded) = TransferFilter::decode_log(log) {
330                return Ok(IERC4906Events::TransferFilter(decoded));
331            }
332            Err(::ethers_core::abi::Error::InvalidData)
333        }
334    }
335    impl ::core::fmt::Display for IERC4906Events {
336        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
337            match self {
338                Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f),
339                Self::ApprovalForAllFilter(element) => {
340                    ::core::fmt::Display::fmt(element, f)
341                }
342                Self::BatchMetadataUpdateFilter(element) => {
343                    ::core::fmt::Display::fmt(element, f)
344                }
345                Self::MetadataUpdateFilter(element) => {
346                    ::core::fmt::Display::fmt(element, f)
347                }
348                Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f),
349            }
350        }
351    }
352    impl ::core::convert::From<ApprovalFilter> for IERC4906Events {
353        fn from(value: ApprovalFilter) -> Self {
354            Self::ApprovalFilter(value)
355        }
356    }
357    impl ::core::convert::From<ApprovalForAllFilter> for IERC4906Events {
358        fn from(value: ApprovalForAllFilter) -> Self {
359            Self::ApprovalForAllFilter(value)
360        }
361    }
362    impl ::core::convert::From<BatchMetadataUpdateFilter> for IERC4906Events {
363        fn from(value: BatchMetadataUpdateFilter) -> Self {
364            Self::BatchMetadataUpdateFilter(value)
365        }
366    }
367    impl ::core::convert::From<MetadataUpdateFilter> for IERC4906Events {
368        fn from(value: MetadataUpdateFilter) -> Self {
369            Self::MetadataUpdateFilter(value)
370        }
371    }
372    impl ::core::convert::From<TransferFilter> for IERC4906Events {
373        fn from(value: TransferFilter) -> Self {
374            Self::TransferFilter(value)
375        }
376    }
377    ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3`
378    #[derive(
379        Clone,
380        ::ethers_contract::EthCall,
381        ::ethers_contract::EthDisplay,
382        Default,
383        Debug,
384        PartialEq,
385        Eq,
386        Hash
387    )]
388    #[ethcall(name = "approve", abi = "approve(address,uint256)")]
389    pub struct ApproveCall {
390        pub to: ::ethers_core::types::Address,
391        pub token_id: ::ethers_core::types::U256,
392    }
393    ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231`
394    #[derive(
395        Clone,
396        ::ethers_contract::EthCall,
397        ::ethers_contract::EthDisplay,
398        Default,
399        Debug,
400        PartialEq,
401        Eq,
402        Hash
403    )]
404    #[ethcall(name = "balanceOf", abi = "balanceOf(address)")]
405    pub struct BalanceOfCall {
406        pub owner: ::ethers_core::types::Address,
407    }
408    ///Container type for all input parameters for the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc`
409    #[derive(
410        Clone,
411        ::ethers_contract::EthCall,
412        ::ethers_contract::EthDisplay,
413        Default,
414        Debug,
415        PartialEq,
416        Eq,
417        Hash
418    )]
419    #[ethcall(name = "getApproved", abi = "getApproved(uint256)")]
420    pub struct GetApprovedCall {
421        pub token_id: ::ethers_core::types::U256,
422    }
423    ///Container type for all input parameters for the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`
424    #[derive(
425        Clone,
426        ::ethers_contract::EthCall,
427        ::ethers_contract::EthDisplay,
428        Default,
429        Debug,
430        PartialEq,
431        Eq,
432        Hash
433    )]
434    #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")]
435    pub struct IsApprovedForAllCall {
436        pub owner: ::ethers_core::types::Address,
437        pub operator: ::ethers_core::types::Address,
438    }
439    ///Container type for all input parameters for the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e`
440    #[derive(
441        Clone,
442        ::ethers_contract::EthCall,
443        ::ethers_contract::EthDisplay,
444        Default,
445        Debug,
446        PartialEq,
447        Eq,
448        Hash
449    )]
450    #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")]
451    pub struct OwnerOfCall {
452        pub token_id: ::ethers_core::types::U256,
453    }
454    ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`
455    #[derive(
456        Clone,
457        ::ethers_contract::EthCall,
458        ::ethers_contract::EthDisplay,
459        Default,
460        Debug,
461        PartialEq,
462        Eq,
463        Hash
464    )]
465    #[ethcall(
466        name = "safeTransferFrom",
467        abi = "safeTransferFrom(address,address,uint256)"
468    )]
469    pub struct SafeTransferFromCall {
470        pub from: ::ethers_core::types::Address,
471        pub to: ::ethers_core::types::Address,
472        pub token_id: ::ethers_core::types::U256,
473    }
474    ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`
475    #[derive(
476        Clone,
477        ::ethers_contract::EthCall,
478        ::ethers_contract::EthDisplay,
479        Default,
480        Debug,
481        PartialEq,
482        Eq,
483        Hash
484    )]
485    #[ethcall(
486        name = "safeTransferFrom",
487        abi = "safeTransferFrom(address,address,uint256,bytes)"
488    )]
489    pub struct SafeTransferFromWithFromAndToAndDataCall {
490        pub from: ::ethers_core::types::Address,
491        pub to: ::ethers_core::types::Address,
492        pub token_id: ::ethers_core::types::U256,
493        pub data: ::ethers_core::types::Bytes,
494    }
495    ///Container type for all input parameters for the `setApprovalForAll` function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`
496    #[derive(
497        Clone,
498        ::ethers_contract::EthCall,
499        ::ethers_contract::EthDisplay,
500        Default,
501        Debug,
502        PartialEq,
503        Eq,
504        Hash
505    )]
506    #[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")]
507    pub struct SetApprovalForAllCall {
508        pub operator: ::ethers_core::types::Address,
509        pub approved: bool,
510    }
511    ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`
512    #[derive(
513        Clone,
514        ::ethers_contract::EthCall,
515        ::ethers_contract::EthDisplay,
516        Default,
517        Debug,
518        PartialEq,
519        Eq,
520        Hash
521    )]
522    #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")]
523    pub struct SupportsInterfaceCall {
524        pub interface_id: [u8; 4],
525    }
526    ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`
527    #[derive(
528        Clone,
529        ::ethers_contract::EthCall,
530        ::ethers_contract::EthDisplay,
531        Default,
532        Debug,
533        PartialEq,
534        Eq,
535        Hash
536    )]
537    #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")]
538    pub struct TransferFromCall {
539        pub from: ::ethers_core::types::Address,
540        pub to: ::ethers_core::types::Address,
541        pub token_id: ::ethers_core::types::U256,
542    }
543    ///Container type for all of the contract's call
544    #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
545    pub enum IERC4906Calls {
546        Approve(ApproveCall),
547        BalanceOf(BalanceOfCall),
548        GetApproved(GetApprovedCall),
549        IsApprovedForAll(IsApprovedForAllCall),
550        OwnerOf(OwnerOfCall),
551        SafeTransferFrom(SafeTransferFromCall),
552        SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall),
553        SetApprovalForAll(SetApprovalForAllCall),
554        SupportsInterface(SupportsInterfaceCall),
555        TransferFrom(TransferFromCall),
556    }
557    impl ::ethers_core::abi::AbiDecode for IERC4906Calls {
558        fn decode(
559            data: impl AsRef<[u8]>,
560        ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
561            let data = data.as_ref();
562            if let Ok(decoded)
563                = <ApproveCall as ::ethers_core::abi::AbiDecode>::decode(data) {
564                return Ok(Self::Approve(decoded));
565            }
566            if let Ok(decoded)
567                = <BalanceOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
568                return Ok(Self::BalanceOf(decoded));
569            }
570            if let Ok(decoded)
571                = <GetApprovedCall as ::ethers_core::abi::AbiDecode>::decode(data) {
572                return Ok(Self::GetApproved(decoded));
573            }
574            if let Ok(decoded)
575                = <IsApprovedForAllCall as ::ethers_core::abi::AbiDecode>::decode(data) {
576                return Ok(Self::IsApprovedForAll(decoded));
577            }
578            if let Ok(decoded)
579                = <OwnerOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
580                return Ok(Self::OwnerOf(decoded));
581            }
582            if let Ok(decoded)
583                = <SafeTransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
584                return Ok(Self::SafeTransferFrom(decoded));
585            }
586            if let Ok(decoded)
587                = <SafeTransferFromWithFromAndToAndDataCall as ::ethers_core::abi::AbiDecode>::decode(
588                    data,
589                ) {
590                return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded));
591            }
592            if let Ok(decoded)
593                = <SetApprovalForAllCall as ::ethers_core::abi::AbiDecode>::decode(
594                    data,
595                ) {
596                return Ok(Self::SetApprovalForAll(decoded));
597            }
598            if let Ok(decoded)
599                = <SupportsInterfaceCall as ::ethers_core::abi::AbiDecode>::decode(
600                    data,
601                ) {
602                return Ok(Self::SupportsInterface(decoded));
603            }
604            if let Ok(decoded)
605                = <TransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
606                return Ok(Self::TransferFrom(decoded));
607            }
608            Err(::ethers_core::abi::Error::InvalidData.into())
609        }
610    }
611    impl ::ethers_core::abi::AbiEncode for IERC4906Calls {
612        fn encode(self) -> Vec<u8> {
613            match self {
614                Self::Approve(element) => ::ethers_core::abi::AbiEncode::encode(element),
615                Self::BalanceOf(element) => {
616                    ::ethers_core::abi::AbiEncode::encode(element)
617                }
618                Self::GetApproved(element) => {
619                    ::ethers_core::abi::AbiEncode::encode(element)
620                }
621                Self::IsApprovedForAll(element) => {
622                    ::ethers_core::abi::AbiEncode::encode(element)
623                }
624                Self::OwnerOf(element) => ::ethers_core::abi::AbiEncode::encode(element),
625                Self::SafeTransferFrom(element) => {
626                    ::ethers_core::abi::AbiEncode::encode(element)
627                }
628                Self::SafeTransferFromWithFromAndToAndData(element) => {
629                    ::ethers_core::abi::AbiEncode::encode(element)
630                }
631                Self::SetApprovalForAll(element) => {
632                    ::ethers_core::abi::AbiEncode::encode(element)
633                }
634                Self::SupportsInterface(element) => {
635                    ::ethers_core::abi::AbiEncode::encode(element)
636                }
637                Self::TransferFrom(element) => {
638                    ::ethers_core::abi::AbiEncode::encode(element)
639                }
640            }
641        }
642    }
643    impl ::core::fmt::Display for IERC4906Calls {
644        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
645            match self {
646                Self::Approve(element) => ::core::fmt::Display::fmt(element, f),
647                Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f),
648                Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f),
649                Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f),
650                Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f),
651                Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f),
652                Self::SafeTransferFromWithFromAndToAndData(element) => {
653                    ::core::fmt::Display::fmt(element, f)
654                }
655                Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f),
656                Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f),
657                Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f),
658            }
659        }
660    }
661    impl ::core::convert::From<ApproveCall> for IERC4906Calls {
662        fn from(value: ApproveCall) -> Self {
663            Self::Approve(value)
664        }
665    }
666    impl ::core::convert::From<BalanceOfCall> for IERC4906Calls {
667        fn from(value: BalanceOfCall) -> Self {
668            Self::BalanceOf(value)
669        }
670    }
671    impl ::core::convert::From<GetApprovedCall> for IERC4906Calls {
672        fn from(value: GetApprovedCall) -> Self {
673            Self::GetApproved(value)
674        }
675    }
676    impl ::core::convert::From<IsApprovedForAllCall> for IERC4906Calls {
677        fn from(value: IsApprovedForAllCall) -> Self {
678            Self::IsApprovedForAll(value)
679        }
680    }
681    impl ::core::convert::From<OwnerOfCall> for IERC4906Calls {
682        fn from(value: OwnerOfCall) -> Self {
683            Self::OwnerOf(value)
684        }
685    }
686    impl ::core::convert::From<SafeTransferFromCall> for IERC4906Calls {
687        fn from(value: SafeTransferFromCall) -> Self {
688            Self::SafeTransferFrom(value)
689        }
690    }
691    impl ::core::convert::From<SafeTransferFromWithFromAndToAndDataCall>
692    for IERC4906Calls {
693        fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self {
694            Self::SafeTransferFromWithFromAndToAndData(value)
695        }
696    }
697    impl ::core::convert::From<SetApprovalForAllCall> for IERC4906Calls {
698        fn from(value: SetApprovalForAllCall) -> Self {
699            Self::SetApprovalForAll(value)
700        }
701    }
702    impl ::core::convert::From<SupportsInterfaceCall> for IERC4906Calls {
703        fn from(value: SupportsInterfaceCall) -> Self {
704            Self::SupportsInterface(value)
705        }
706    }
707    impl ::core::convert::From<TransferFromCall> for IERC4906Calls {
708        fn from(value: TransferFromCall) -> Self {
709            Self::TransferFrom(value)
710        }
711    }
712    ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231`
713    #[derive(
714        Clone,
715        ::ethers_contract::EthAbiType,
716        ::ethers_contract::EthAbiCodec,
717        Default,
718        Debug,
719        PartialEq,
720        Eq,
721        Hash
722    )]
723    pub struct BalanceOfReturn {
724        pub balance: ::ethers_core::types::U256,
725    }
726    ///Container type for all return fields from the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc`
727    #[derive(
728        Clone,
729        ::ethers_contract::EthAbiType,
730        ::ethers_contract::EthAbiCodec,
731        Default,
732        Debug,
733        PartialEq,
734        Eq,
735        Hash
736    )]
737    pub struct GetApprovedReturn {
738        pub operator: ::ethers_core::types::Address,
739    }
740    ///Container type for all return fields from the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`
741    #[derive(
742        Clone,
743        ::ethers_contract::EthAbiType,
744        ::ethers_contract::EthAbiCodec,
745        Default,
746        Debug,
747        PartialEq,
748        Eq,
749        Hash
750    )]
751    pub struct IsApprovedForAllReturn(pub bool);
752    ///Container type for all return fields from the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e`
753    #[derive(
754        Clone,
755        ::ethers_contract::EthAbiType,
756        ::ethers_contract::EthAbiCodec,
757        Default,
758        Debug,
759        PartialEq,
760        Eq,
761        Hash
762    )]
763    pub struct OwnerOfReturn {
764        pub owner: ::ethers_core::types::Address,
765    }
766    ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`
767    #[derive(
768        Clone,
769        ::ethers_contract::EthAbiType,
770        ::ethers_contract::EthAbiCodec,
771        Default,
772        Debug,
773        PartialEq,
774        Eq,
775        Hash
776    )]
777    pub struct SupportsInterfaceReturn(pub bool);
778}