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