openzeppelin_rs/contracts/
ERC721Royalty.rs

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