1pub use erc1155_supply::*;
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 erc1155_supply {
13 #[rustfmt::skip]
14 const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"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\":\"operator\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"TransferBatch\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"TransferSingle\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"URI\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\",\"components\":[]},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"exists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"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\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\",\"components\":[]},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"safeBatchTransferFrom\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"safeTransferFrom\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"setApprovalForAll\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]}]";
15 pub static ERC1155SUPPLY_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 ERC1155Supply<M>(::ethers_contract::Contract<M>);
19 impl<M> ::core::clone::Clone for ERC1155Supply<M> {
20 fn clone(&self) -> Self {
21 Self(::core::clone::Clone::clone(&self.0))
22 }
23 }
24 impl<M> ::core::ops::Deref for ERC1155Supply<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 ERC1155Supply<M> {
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34 }
35 impl<M> ::core::fmt::Debug for ERC1155Supply<M> {
36 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
37 f.debug_tuple(stringify!(ERC1155Supply)).field(&self.address()).finish()
38 }
39 }
40 impl<M: ::ethers_providers::Middleware> ERC1155Supply<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 ERC1155SUPPLY_ABI.clone(),
51 client,
52 ),
53 )
54 }
55 pub fn balance_of(
57 &self,
58 account: ::ethers_core::types::Address,
59 id: ::ethers_core::types::U256,
60 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
61 self.0
62 .method_hash([0, 253, 213, 142], (account, id))
63 .expect("method not found (this should never happen)")
64 }
65 pub fn balance_of_batch(
67 &self,
68 accounts: ::std::vec::Vec<::ethers_core::types::Address>,
69 ids: ::std::vec::Vec<::ethers_core::types::U256>,
70 ) -> ::ethers_contract::builders::ContractCall<
71 M,
72 ::std::vec::Vec<::ethers_core::types::U256>,
73 > {
74 self.0
75 .method_hash([78, 18, 115, 244], (accounts, ids))
76 .expect("method not found (this should never happen)")
77 }
78 pub fn exists(
80 &self,
81 id: ::ethers_core::types::U256,
82 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
83 self.0
84 .method_hash([79, 85, 142, 121], id)
85 .expect("method not found (this should never happen)")
86 }
87 pub fn is_approved_for_all(
89 &self,
90 account: ::ethers_core::types::Address,
91 operator: ::ethers_core::types::Address,
92 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
93 self.0
94 .method_hash([233, 133, 233, 197], (account, operator))
95 .expect("method not found (this should never happen)")
96 }
97 pub fn safe_batch_transfer_from(
99 &self,
100 from: ::ethers_core::types::Address,
101 to: ::ethers_core::types::Address,
102 ids: ::std::vec::Vec<::ethers_core::types::U256>,
103 amounts: ::std::vec::Vec<::ethers_core::types::U256>,
104 data: ::ethers_core::types::Bytes,
105 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
106 self.0
107 .method_hash([46, 178, 194, 214], (from, to, ids, amounts, data))
108 .expect("method not found (this should never happen)")
109 }
110 pub fn safe_transfer_from(
112 &self,
113 from: ::ethers_core::types::Address,
114 to: ::ethers_core::types::Address,
115 id: ::ethers_core::types::U256,
116 amount: ::ethers_core::types::U256,
117 data: ::ethers_core::types::Bytes,
118 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
119 self.0
120 .method_hash([242, 66, 67, 42], (from, to, id, amount, data))
121 .expect("method not found (this should never happen)")
122 }
123 pub fn set_approval_for_all(
125 &self,
126 operator: ::ethers_core::types::Address,
127 approved: bool,
128 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
129 self.0
130 .method_hash([162, 44, 180, 101], (operator, approved))
131 .expect("method not found (this should never happen)")
132 }
133 pub fn supports_interface(
135 &self,
136 interface_id: [u8; 4],
137 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
138 self.0
139 .method_hash([1, 255, 201, 167], interface_id)
140 .expect("method not found (this should never happen)")
141 }
142 pub fn total_supply(
144 &self,
145 id: ::ethers_core::types::U256,
146 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
147 self.0
148 .method_hash([189, 133, 176, 57], id)
149 .expect("method not found (this should never happen)")
150 }
151 pub fn uri(
153 &self,
154 p0: ::ethers_core::types::U256,
155 ) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
156 self.0
157 .method_hash([14, 137, 52, 28], p0)
158 .expect("method not found (this should never happen)")
159 }
160 pub fn approval_for_all_filter(
162 &self,
163 ) -> ::ethers_contract::builders::Event<
164 ::std::sync::Arc<M>,
165 M,
166 ApprovalForAllFilter,
167 > {
168 self.0.event()
169 }
170 pub fn transfer_batch_filter(
172 &self,
173 ) -> ::ethers_contract::builders::Event<
174 ::std::sync::Arc<M>,
175 M,
176 TransferBatchFilter,
177 > {
178 self.0.event()
179 }
180 pub fn transfer_single_filter(
182 &self,
183 ) -> ::ethers_contract::builders::Event<
184 ::std::sync::Arc<M>,
185 M,
186 TransferSingleFilter,
187 > {
188 self.0.event()
189 }
190 pub fn uri_filter(
192 &self,
193 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, UriFilter> {
194 self.0.event()
195 }
196 pub fn events(
198 &self,
199 ) -> ::ethers_contract::builders::Event<
200 ::std::sync::Arc<M>,
201 M,
202 ERC1155SupplyEvents,
203 > {
204 self.0.event_with_filter(::core::default::Default::default())
205 }
206 }
207 impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
208 for ERC1155Supply<M> {
209 fn from(contract: ::ethers_contract::Contract<M>) -> Self {
210 Self::new(contract.address(), contract.client())
211 }
212 }
213 #[derive(
214 Clone,
215 ::ethers_contract::EthEvent,
216 ::ethers_contract::EthDisplay,
217 Default,
218 Debug,
219 PartialEq,
220 Eq,
221 Hash
222 )]
223 #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")]
224 pub struct ApprovalForAllFilter {
225 #[ethevent(indexed)]
226 pub account: ::ethers_core::types::Address,
227 #[ethevent(indexed)]
228 pub operator: ::ethers_core::types::Address,
229 pub approved: bool,
230 }
231 #[derive(
232 Clone,
233 ::ethers_contract::EthEvent,
234 ::ethers_contract::EthDisplay,
235 Default,
236 Debug,
237 PartialEq,
238 Eq,
239 Hash
240 )]
241 #[ethevent(
242 name = "TransferBatch",
243 abi = "TransferBatch(address,address,address,uint256[],uint256[])"
244 )]
245 pub struct TransferBatchFilter {
246 #[ethevent(indexed)]
247 pub operator: ::ethers_core::types::Address,
248 #[ethevent(indexed)]
249 pub from: ::ethers_core::types::Address,
250 #[ethevent(indexed)]
251 pub to: ::ethers_core::types::Address,
252 pub ids: ::std::vec::Vec<::ethers_core::types::U256>,
253 pub values: ::std::vec::Vec<::ethers_core::types::U256>,
254 }
255 #[derive(
256 Clone,
257 ::ethers_contract::EthEvent,
258 ::ethers_contract::EthDisplay,
259 Default,
260 Debug,
261 PartialEq,
262 Eq,
263 Hash
264 )]
265 #[ethevent(
266 name = "TransferSingle",
267 abi = "TransferSingle(address,address,address,uint256,uint256)"
268 )]
269 pub struct TransferSingleFilter {
270 #[ethevent(indexed)]
271 pub operator: ::ethers_core::types::Address,
272 #[ethevent(indexed)]
273 pub from: ::ethers_core::types::Address,
274 #[ethevent(indexed)]
275 pub to: ::ethers_core::types::Address,
276 pub id: ::ethers_core::types::U256,
277 pub value: ::ethers_core::types::U256,
278 }
279 #[derive(
280 Clone,
281 ::ethers_contract::EthEvent,
282 ::ethers_contract::EthDisplay,
283 Default,
284 Debug,
285 PartialEq,
286 Eq,
287 Hash
288 )]
289 #[ethevent(name = "URI", abi = "URI(string,uint256)")]
290 pub struct UriFilter {
291 pub value: ::std::string::String,
292 #[ethevent(indexed)]
293 pub id: ::ethers_core::types::U256,
294 }
295 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
297 pub enum ERC1155SupplyEvents {
298 ApprovalForAllFilter(ApprovalForAllFilter),
299 TransferBatchFilter(TransferBatchFilter),
300 TransferSingleFilter(TransferSingleFilter),
301 UriFilter(UriFilter),
302 }
303 impl ::ethers_contract::EthLogDecode for ERC1155SupplyEvents {
304 fn decode_log(
305 log: &::ethers_core::abi::RawLog,
306 ) -> ::core::result::Result<Self, ::ethers_core::abi::Error> {
307 if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) {
308 return Ok(ERC1155SupplyEvents::ApprovalForAllFilter(decoded));
309 }
310 if let Ok(decoded) = TransferBatchFilter::decode_log(log) {
311 return Ok(ERC1155SupplyEvents::TransferBatchFilter(decoded));
312 }
313 if let Ok(decoded) = TransferSingleFilter::decode_log(log) {
314 return Ok(ERC1155SupplyEvents::TransferSingleFilter(decoded));
315 }
316 if let Ok(decoded) = UriFilter::decode_log(log) {
317 return Ok(ERC1155SupplyEvents::UriFilter(decoded));
318 }
319 Err(::ethers_core::abi::Error::InvalidData)
320 }
321 }
322 impl ::core::fmt::Display for ERC1155SupplyEvents {
323 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
324 match self {
325 Self::ApprovalForAllFilter(element) => {
326 ::core::fmt::Display::fmt(element, f)
327 }
328 Self::TransferBatchFilter(element) => {
329 ::core::fmt::Display::fmt(element, f)
330 }
331 Self::TransferSingleFilter(element) => {
332 ::core::fmt::Display::fmt(element, f)
333 }
334 Self::UriFilter(element) => ::core::fmt::Display::fmt(element, f),
335 }
336 }
337 }
338 impl ::core::convert::From<ApprovalForAllFilter> for ERC1155SupplyEvents {
339 fn from(value: ApprovalForAllFilter) -> Self {
340 Self::ApprovalForAllFilter(value)
341 }
342 }
343 impl ::core::convert::From<TransferBatchFilter> for ERC1155SupplyEvents {
344 fn from(value: TransferBatchFilter) -> Self {
345 Self::TransferBatchFilter(value)
346 }
347 }
348 impl ::core::convert::From<TransferSingleFilter> for ERC1155SupplyEvents {
349 fn from(value: TransferSingleFilter) -> Self {
350 Self::TransferSingleFilter(value)
351 }
352 }
353 impl ::core::convert::From<UriFilter> for ERC1155SupplyEvents {
354 fn from(value: UriFilter) -> Self {
355 Self::UriFilter(value)
356 }
357 }
358 #[derive(
360 Clone,
361 ::ethers_contract::EthCall,
362 ::ethers_contract::EthDisplay,
363 Default,
364 Debug,
365 PartialEq,
366 Eq,
367 Hash
368 )]
369 #[ethcall(name = "balanceOf", abi = "balanceOf(address,uint256)")]
370 pub struct BalanceOfCall {
371 pub account: ::ethers_core::types::Address,
372 pub id: ::ethers_core::types::U256,
373 }
374 #[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 = "balanceOfBatch", abi = "balanceOfBatch(address[],uint256[])")]
386 pub struct BalanceOfBatchCall {
387 pub accounts: ::std::vec::Vec<::ethers_core::types::Address>,
388 pub ids: ::std::vec::Vec<::ethers_core::types::U256>,
389 }
390 #[derive(
392 Clone,
393 ::ethers_contract::EthCall,
394 ::ethers_contract::EthDisplay,
395 Default,
396 Debug,
397 PartialEq,
398 Eq,
399 Hash
400 )]
401 #[ethcall(name = "exists", abi = "exists(uint256)")]
402 pub struct ExistsCall {
403 pub id: ::ethers_core::types::U256,
404 }
405 #[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 = "isApprovedForAll", abi = "isApprovedForAll(address,address)")]
417 pub struct IsApprovedForAllCall {
418 pub account: ::ethers_core::types::Address,
419 pub operator: ::ethers_core::types::Address,
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(
433 name = "safeBatchTransferFrom",
434 abi = "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)"
435 )]
436 pub struct SafeBatchTransferFromCall {
437 pub from: ::ethers_core::types::Address,
438 pub to: ::ethers_core::types::Address,
439 pub ids: ::std::vec::Vec<::ethers_core::types::U256>,
440 pub amounts: ::std::vec::Vec<::ethers_core::types::U256>,
441 pub data: ::ethers_core::types::Bytes,
442 }
443 #[derive(
445 Clone,
446 ::ethers_contract::EthCall,
447 ::ethers_contract::EthDisplay,
448 Default,
449 Debug,
450 PartialEq,
451 Eq,
452 Hash
453 )]
454 #[ethcall(
455 name = "safeTransferFrom",
456 abi = "safeTransferFrom(address,address,uint256,uint256,bytes)"
457 )]
458 pub struct SafeTransferFromCall {
459 pub from: ::ethers_core::types::Address,
460 pub to: ::ethers_core::types::Address,
461 pub id: ::ethers_core::types::U256,
462 pub amount: ::ethers_core::types::U256,
463 pub data: ::ethers_core::types::Bytes,
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(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")]
477 pub struct SetApprovalForAllCall {
478 pub operator: ::ethers_core::types::Address,
479 pub approved: bool,
480 }
481 #[derive(
483 Clone,
484 ::ethers_contract::EthCall,
485 ::ethers_contract::EthDisplay,
486 Default,
487 Debug,
488 PartialEq,
489 Eq,
490 Hash
491 )]
492 #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")]
493 pub struct SupportsInterfaceCall {
494 pub interface_id: [u8; 4],
495 }
496 #[derive(
498 Clone,
499 ::ethers_contract::EthCall,
500 ::ethers_contract::EthDisplay,
501 Default,
502 Debug,
503 PartialEq,
504 Eq,
505 Hash
506 )]
507 #[ethcall(name = "totalSupply", abi = "totalSupply(uint256)")]
508 pub struct TotalSupplyCall {
509 pub id: ::ethers_core::types::U256,
510 }
511 #[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 = "uri", abi = "uri(uint256)")]
523 pub struct UriCall(pub ::ethers_core::types::U256);
524 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
526 pub enum ERC1155SupplyCalls {
527 BalanceOf(BalanceOfCall),
528 BalanceOfBatch(BalanceOfBatchCall),
529 Exists(ExistsCall),
530 IsApprovedForAll(IsApprovedForAllCall),
531 SafeBatchTransferFrom(SafeBatchTransferFromCall),
532 SafeTransferFrom(SafeTransferFromCall),
533 SetApprovalForAll(SetApprovalForAllCall),
534 SupportsInterface(SupportsInterfaceCall),
535 TotalSupply(TotalSupplyCall),
536 Uri(UriCall),
537 }
538 impl ::ethers_core::abi::AbiDecode for ERC1155SupplyCalls {
539 fn decode(
540 data: impl AsRef<[u8]>,
541 ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
542 let data = data.as_ref();
543 if let Ok(decoded)
544 = <BalanceOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
545 return Ok(Self::BalanceOf(decoded));
546 }
547 if let Ok(decoded)
548 = <BalanceOfBatchCall as ::ethers_core::abi::AbiDecode>::decode(data) {
549 return Ok(Self::BalanceOfBatch(decoded));
550 }
551 if let Ok(decoded)
552 = <ExistsCall as ::ethers_core::abi::AbiDecode>::decode(data) {
553 return Ok(Self::Exists(decoded));
554 }
555 if let Ok(decoded)
556 = <IsApprovedForAllCall as ::ethers_core::abi::AbiDecode>::decode(data) {
557 return Ok(Self::IsApprovedForAll(decoded));
558 }
559 if let Ok(decoded)
560 = <SafeBatchTransferFromCall as ::ethers_core::abi::AbiDecode>::decode(
561 data,
562 ) {
563 return Ok(Self::SafeBatchTransferFrom(decoded));
564 }
565 if let Ok(decoded)
566 = <SafeTransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
567 return Ok(Self::SafeTransferFrom(decoded));
568 }
569 if let Ok(decoded)
570 = <SetApprovalForAllCall as ::ethers_core::abi::AbiDecode>::decode(
571 data,
572 ) {
573 return Ok(Self::SetApprovalForAll(decoded));
574 }
575 if let Ok(decoded)
576 = <SupportsInterfaceCall as ::ethers_core::abi::AbiDecode>::decode(
577 data,
578 ) {
579 return Ok(Self::SupportsInterface(decoded));
580 }
581 if let Ok(decoded)
582 = <TotalSupplyCall as ::ethers_core::abi::AbiDecode>::decode(data) {
583 return Ok(Self::TotalSupply(decoded));
584 }
585 if let Ok(decoded)
586 = <UriCall as ::ethers_core::abi::AbiDecode>::decode(data) {
587 return Ok(Self::Uri(decoded));
588 }
589 Err(::ethers_core::abi::Error::InvalidData.into())
590 }
591 }
592 impl ::ethers_core::abi::AbiEncode for ERC1155SupplyCalls {
593 fn encode(self) -> Vec<u8> {
594 match self {
595 Self::BalanceOf(element) => {
596 ::ethers_core::abi::AbiEncode::encode(element)
597 }
598 Self::BalanceOfBatch(element) => {
599 ::ethers_core::abi::AbiEncode::encode(element)
600 }
601 Self::Exists(element) => ::ethers_core::abi::AbiEncode::encode(element),
602 Self::IsApprovedForAll(element) => {
603 ::ethers_core::abi::AbiEncode::encode(element)
604 }
605 Self::SafeBatchTransferFrom(element) => {
606 ::ethers_core::abi::AbiEncode::encode(element)
607 }
608 Self::SafeTransferFrom(element) => {
609 ::ethers_core::abi::AbiEncode::encode(element)
610 }
611 Self::SetApprovalForAll(element) => {
612 ::ethers_core::abi::AbiEncode::encode(element)
613 }
614 Self::SupportsInterface(element) => {
615 ::ethers_core::abi::AbiEncode::encode(element)
616 }
617 Self::TotalSupply(element) => {
618 ::ethers_core::abi::AbiEncode::encode(element)
619 }
620 Self::Uri(element) => ::ethers_core::abi::AbiEncode::encode(element),
621 }
622 }
623 }
624 impl ::core::fmt::Display for ERC1155SupplyCalls {
625 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
626 match self {
627 Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f),
628 Self::BalanceOfBatch(element) => ::core::fmt::Display::fmt(element, f),
629 Self::Exists(element) => ::core::fmt::Display::fmt(element, f),
630 Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f),
631 Self::SafeBatchTransferFrom(element) => {
632 ::core::fmt::Display::fmt(element, f)
633 }
634 Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f),
635 Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f),
636 Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f),
637 Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f),
638 Self::Uri(element) => ::core::fmt::Display::fmt(element, f),
639 }
640 }
641 }
642 impl ::core::convert::From<BalanceOfCall> for ERC1155SupplyCalls {
643 fn from(value: BalanceOfCall) -> Self {
644 Self::BalanceOf(value)
645 }
646 }
647 impl ::core::convert::From<BalanceOfBatchCall> for ERC1155SupplyCalls {
648 fn from(value: BalanceOfBatchCall) -> Self {
649 Self::BalanceOfBatch(value)
650 }
651 }
652 impl ::core::convert::From<ExistsCall> for ERC1155SupplyCalls {
653 fn from(value: ExistsCall) -> Self {
654 Self::Exists(value)
655 }
656 }
657 impl ::core::convert::From<IsApprovedForAllCall> for ERC1155SupplyCalls {
658 fn from(value: IsApprovedForAllCall) -> Self {
659 Self::IsApprovedForAll(value)
660 }
661 }
662 impl ::core::convert::From<SafeBatchTransferFromCall> for ERC1155SupplyCalls {
663 fn from(value: SafeBatchTransferFromCall) -> Self {
664 Self::SafeBatchTransferFrom(value)
665 }
666 }
667 impl ::core::convert::From<SafeTransferFromCall> for ERC1155SupplyCalls {
668 fn from(value: SafeTransferFromCall) -> Self {
669 Self::SafeTransferFrom(value)
670 }
671 }
672 impl ::core::convert::From<SetApprovalForAllCall> for ERC1155SupplyCalls {
673 fn from(value: SetApprovalForAllCall) -> Self {
674 Self::SetApprovalForAll(value)
675 }
676 }
677 impl ::core::convert::From<SupportsInterfaceCall> for ERC1155SupplyCalls {
678 fn from(value: SupportsInterfaceCall) -> Self {
679 Self::SupportsInterface(value)
680 }
681 }
682 impl ::core::convert::From<TotalSupplyCall> for ERC1155SupplyCalls {
683 fn from(value: TotalSupplyCall) -> Self {
684 Self::TotalSupply(value)
685 }
686 }
687 impl ::core::convert::From<UriCall> for ERC1155SupplyCalls {
688 fn from(value: UriCall) -> Self {
689 Self::Uri(value)
690 }
691 }
692 #[derive(
694 Clone,
695 ::ethers_contract::EthAbiType,
696 ::ethers_contract::EthAbiCodec,
697 Default,
698 Debug,
699 PartialEq,
700 Eq,
701 Hash
702 )]
703 pub struct BalanceOfReturn(pub ::ethers_core::types::U256);
704 #[derive(
706 Clone,
707 ::ethers_contract::EthAbiType,
708 ::ethers_contract::EthAbiCodec,
709 Default,
710 Debug,
711 PartialEq,
712 Eq,
713 Hash
714 )]
715 pub struct BalanceOfBatchReturn(pub ::std::vec::Vec<::ethers_core::types::U256>);
716 #[derive(
718 Clone,
719 ::ethers_contract::EthAbiType,
720 ::ethers_contract::EthAbiCodec,
721 Default,
722 Debug,
723 PartialEq,
724 Eq,
725 Hash
726 )]
727 pub struct ExistsReturn(pub bool);
728 #[derive(
730 Clone,
731 ::ethers_contract::EthAbiType,
732 ::ethers_contract::EthAbiCodec,
733 Default,
734 Debug,
735 PartialEq,
736 Eq,
737 Hash
738 )]
739 pub struct IsApprovedForAllReturn(pub bool);
740 #[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 SupportsInterfaceReturn(pub bool);
752 #[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 TotalSupplyReturn(pub ::ethers_core::types::U256);
764 #[derive(
766 Clone,
767 ::ethers_contract::EthAbiType,
768 ::ethers_contract::EthAbiCodec,
769 Default,
770 Debug,
771 PartialEq,
772 Eq,
773 Hash
774 )]
775 pub struct UriReturn(pub ::std::string::String);
776}