1pub use erc20_pausable::*;
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 erc20_pausable {
13 #[rustfmt::skip]
14 const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"Approval\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"Paused\",\"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\":\"value\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"Transfer\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"Unpaused\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"transfer\",\"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\":\"amount\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]}]";
15 pub static ERC20PAUSABLE_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 ERC20Pausable<M>(::ethers_contract::Contract<M>);
19 impl<M> ::core::clone::Clone for ERC20Pausable<M> {
20 fn clone(&self) -> Self {
21 Self(::core::clone::Clone::clone(&self.0))
22 }
23 }
24 impl<M> ::core::ops::Deref for ERC20Pausable<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 ERC20Pausable<M> {
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34 }
35 impl<M> ::core::fmt::Debug for ERC20Pausable<M> {
36 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
37 f.debug_tuple(stringify!(ERC20Pausable)).field(&self.address()).finish()
38 }
39 }
40 impl<M: ::ethers_providers::Middleware> ERC20Pausable<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 ERC20PAUSABLE_ABI.clone(),
51 client,
52 ),
53 )
54 }
55 pub fn allowance(
57 &self,
58 owner: ::ethers_core::types::Address,
59 spender: ::ethers_core::types::Address,
60 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
61 self.0
62 .method_hash([221, 98, 237, 62], (owner, spender))
63 .expect("method not found (this should never happen)")
64 }
65 pub fn approve(
67 &self,
68 spender: ::ethers_core::types::Address,
69 amount: ::ethers_core::types::U256,
70 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
71 self.0
72 .method_hash([9, 94, 167, 179], (spender, amount))
73 .expect("method not found (this should never happen)")
74 }
75 pub fn balance_of(
77 &self,
78 account: ::ethers_core::types::Address,
79 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
80 self.0
81 .method_hash([112, 160, 130, 49], account)
82 .expect("method not found (this should never happen)")
83 }
84 pub fn decimals(&self) -> ::ethers_contract::builders::ContractCall<M, u8> {
86 self.0
87 .method_hash([49, 60, 229, 103], ())
88 .expect("method not found (this should never happen)")
89 }
90 pub fn decrease_allowance(
92 &self,
93 spender: ::ethers_core::types::Address,
94 subtracted_value: ::ethers_core::types::U256,
95 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
96 self.0
97 .method_hash([164, 87, 194, 215], (spender, subtracted_value))
98 .expect("method not found (this should never happen)")
99 }
100 pub fn increase_allowance(
102 &self,
103 spender: ::ethers_core::types::Address,
104 added_value: ::ethers_core::types::U256,
105 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
106 self.0
107 .method_hash([57, 80, 147, 81], (spender, added_value))
108 .expect("method not found (this should never happen)")
109 }
110 pub fn name(
112 &self,
113 ) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
114 self.0
115 .method_hash([6, 253, 222, 3], ())
116 .expect("method not found (this should never happen)")
117 }
118 pub fn paused(&self) -> ::ethers_contract::builders::ContractCall<M, bool> {
120 self.0
121 .method_hash([92, 151, 90, 187], ())
122 .expect("method not found (this should never happen)")
123 }
124 pub fn symbol(
126 &self,
127 ) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
128 self.0
129 .method_hash([149, 216, 155, 65], ())
130 .expect("method not found (this should never happen)")
131 }
132 pub fn total_supply(
134 &self,
135 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
136 self.0
137 .method_hash([24, 22, 13, 221], ())
138 .expect("method not found (this should never happen)")
139 }
140 pub fn transfer(
142 &self,
143 to: ::ethers_core::types::Address,
144 amount: ::ethers_core::types::U256,
145 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
146 self.0
147 .method_hash([169, 5, 156, 187], (to, amount))
148 .expect("method not found (this should never happen)")
149 }
150 pub fn transfer_from(
152 &self,
153 from: ::ethers_core::types::Address,
154 to: ::ethers_core::types::Address,
155 amount: ::ethers_core::types::U256,
156 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
157 self.0
158 .method_hash([35, 184, 114, 221], (from, to, amount))
159 .expect("method not found (this should never happen)")
160 }
161 pub fn approval_filter(
163 &self,
164 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, ApprovalFilter> {
165 self.0.event()
166 }
167 pub fn paused_filter(
169 &self,
170 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, PausedFilter> {
171 self.0.event()
172 }
173 pub fn transfer_filter(
175 &self,
176 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, TransferFilter> {
177 self.0.event()
178 }
179 pub fn unpaused_filter(
181 &self,
182 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, UnpausedFilter> {
183 self.0.event()
184 }
185 pub fn events(
187 &self,
188 ) -> ::ethers_contract::builders::Event<
189 ::std::sync::Arc<M>,
190 M,
191 ERC20PausableEvents,
192 > {
193 self.0.event_with_filter(::core::default::Default::default())
194 }
195 }
196 impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
197 for ERC20Pausable<M> {
198 fn from(contract: ::ethers_contract::Contract<M>) -> Self {
199 Self::new(contract.address(), contract.client())
200 }
201 }
202 #[derive(
203 Clone,
204 ::ethers_contract::EthEvent,
205 ::ethers_contract::EthDisplay,
206 Default,
207 Debug,
208 PartialEq,
209 Eq,
210 Hash
211 )]
212 #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")]
213 pub struct ApprovalFilter {
214 #[ethevent(indexed)]
215 pub owner: ::ethers_core::types::Address,
216 #[ethevent(indexed)]
217 pub spender: ::ethers_core::types::Address,
218 pub value: ::ethers_core::types::U256,
219 }
220 #[derive(
221 Clone,
222 ::ethers_contract::EthEvent,
223 ::ethers_contract::EthDisplay,
224 Default,
225 Debug,
226 PartialEq,
227 Eq,
228 Hash
229 )]
230 #[ethevent(name = "Paused", abi = "Paused(address)")]
231 pub struct PausedFilter {
232 pub account: ::ethers_core::types::Address,
233 }
234 #[derive(
235 Clone,
236 ::ethers_contract::EthEvent,
237 ::ethers_contract::EthDisplay,
238 Default,
239 Debug,
240 PartialEq,
241 Eq,
242 Hash
243 )]
244 #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")]
245 pub struct TransferFilter {
246 #[ethevent(indexed)]
247 pub from: ::ethers_core::types::Address,
248 #[ethevent(indexed)]
249 pub to: ::ethers_core::types::Address,
250 pub value: ::ethers_core::types::U256,
251 }
252 #[derive(
253 Clone,
254 ::ethers_contract::EthEvent,
255 ::ethers_contract::EthDisplay,
256 Default,
257 Debug,
258 PartialEq,
259 Eq,
260 Hash
261 )]
262 #[ethevent(name = "Unpaused", abi = "Unpaused(address)")]
263 pub struct UnpausedFilter {
264 pub account: ::ethers_core::types::Address,
265 }
266 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
268 pub enum ERC20PausableEvents {
269 ApprovalFilter(ApprovalFilter),
270 PausedFilter(PausedFilter),
271 TransferFilter(TransferFilter),
272 UnpausedFilter(UnpausedFilter),
273 }
274 impl ::ethers_contract::EthLogDecode for ERC20PausableEvents {
275 fn decode_log(
276 log: &::ethers_core::abi::RawLog,
277 ) -> ::core::result::Result<Self, ::ethers_core::abi::Error> {
278 if let Ok(decoded) = ApprovalFilter::decode_log(log) {
279 return Ok(ERC20PausableEvents::ApprovalFilter(decoded));
280 }
281 if let Ok(decoded) = PausedFilter::decode_log(log) {
282 return Ok(ERC20PausableEvents::PausedFilter(decoded));
283 }
284 if let Ok(decoded) = TransferFilter::decode_log(log) {
285 return Ok(ERC20PausableEvents::TransferFilter(decoded));
286 }
287 if let Ok(decoded) = UnpausedFilter::decode_log(log) {
288 return Ok(ERC20PausableEvents::UnpausedFilter(decoded));
289 }
290 Err(::ethers_core::abi::Error::InvalidData)
291 }
292 }
293 impl ::core::fmt::Display for ERC20PausableEvents {
294 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
295 match self {
296 Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f),
297 Self::PausedFilter(element) => ::core::fmt::Display::fmt(element, f),
298 Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f),
299 Self::UnpausedFilter(element) => ::core::fmt::Display::fmt(element, f),
300 }
301 }
302 }
303 impl ::core::convert::From<ApprovalFilter> for ERC20PausableEvents {
304 fn from(value: ApprovalFilter) -> Self {
305 Self::ApprovalFilter(value)
306 }
307 }
308 impl ::core::convert::From<PausedFilter> for ERC20PausableEvents {
309 fn from(value: PausedFilter) -> Self {
310 Self::PausedFilter(value)
311 }
312 }
313 impl ::core::convert::From<TransferFilter> for ERC20PausableEvents {
314 fn from(value: TransferFilter) -> Self {
315 Self::TransferFilter(value)
316 }
317 }
318 impl ::core::convert::From<UnpausedFilter> for ERC20PausableEvents {
319 fn from(value: UnpausedFilter) -> Self {
320 Self::UnpausedFilter(value)
321 }
322 }
323 #[derive(
325 Clone,
326 ::ethers_contract::EthCall,
327 ::ethers_contract::EthDisplay,
328 Default,
329 Debug,
330 PartialEq,
331 Eq,
332 Hash
333 )]
334 #[ethcall(name = "allowance", abi = "allowance(address,address)")]
335 pub struct AllowanceCall {
336 pub owner: ::ethers_core::types::Address,
337 pub spender: ::ethers_core::types::Address,
338 }
339 #[derive(
341 Clone,
342 ::ethers_contract::EthCall,
343 ::ethers_contract::EthDisplay,
344 Default,
345 Debug,
346 PartialEq,
347 Eq,
348 Hash
349 )]
350 #[ethcall(name = "approve", abi = "approve(address,uint256)")]
351 pub struct ApproveCall {
352 pub spender: ::ethers_core::types::Address,
353 pub amount: ::ethers_core::types::U256,
354 }
355 #[derive(
357 Clone,
358 ::ethers_contract::EthCall,
359 ::ethers_contract::EthDisplay,
360 Default,
361 Debug,
362 PartialEq,
363 Eq,
364 Hash
365 )]
366 #[ethcall(name = "balanceOf", abi = "balanceOf(address)")]
367 pub struct BalanceOfCall {
368 pub account: ::ethers_core::types::Address,
369 }
370 #[derive(
372 Clone,
373 ::ethers_contract::EthCall,
374 ::ethers_contract::EthDisplay,
375 Default,
376 Debug,
377 PartialEq,
378 Eq,
379 Hash
380 )]
381 #[ethcall(name = "decimals", abi = "decimals()")]
382 pub struct DecimalsCall;
383 #[derive(
385 Clone,
386 ::ethers_contract::EthCall,
387 ::ethers_contract::EthDisplay,
388 Default,
389 Debug,
390 PartialEq,
391 Eq,
392 Hash
393 )]
394 #[ethcall(name = "decreaseAllowance", abi = "decreaseAllowance(address,uint256)")]
395 pub struct DecreaseAllowanceCall {
396 pub spender: ::ethers_core::types::Address,
397 pub subtracted_value: ::ethers_core::types::U256,
398 }
399 #[derive(
401 Clone,
402 ::ethers_contract::EthCall,
403 ::ethers_contract::EthDisplay,
404 Default,
405 Debug,
406 PartialEq,
407 Eq,
408 Hash
409 )]
410 #[ethcall(name = "increaseAllowance", abi = "increaseAllowance(address,uint256)")]
411 pub struct IncreaseAllowanceCall {
412 pub spender: ::ethers_core::types::Address,
413 pub added_value: ::ethers_core::types::U256,
414 }
415 #[derive(
417 Clone,
418 ::ethers_contract::EthCall,
419 ::ethers_contract::EthDisplay,
420 Default,
421 Debug,
422 PartialEq,
423 Eq,
424 Hash
425 )]
426 #[ethcall(name = "name", abi = "name()")]
427 pub struct NameCall;
428 #[derive(
430 Clone,
431 ::ethers_contract::EthCall,
432 ::ethers_contract::EthDisplay,
433 Default,
434 Debug,
435 PartialEq,
436 Eq,
437 Hash
438 )]
439 #[ethcall(name = "paused", abi = "paused()")]
440 pub struct PausedCall;
441 #[derive(
443 Clone,
444 ::ethers_contract::EthCall,
445 ::ethers_contract::EthDisplay,
446 Default,
447 Debug,
448 PartialEq,
449 Eq,
450 Hash
451 )]
452 #[ethcall(name = "symbol", abi = "symbol()")]
453 pub struct SymbolCall;
454 #[derive(
456 Clone,
457 ::ethers_contract::EthCall,
458 ::ethers_contract::EthDisplay,
459 Default,
460 Debug,
461 PartialEq,
462 Eq,
463 Hash
464 )]
465 #[ethcall(name = "totalSupply", abi = "totalSupply()")]
466 pub struct TotalSupplyCall;
467 #[derive(
469 Clone,
470 ::ethers_contract::EthCall,
471 ::ethers_contract::EthDisplay,
472 Default,
473 Debug,
474 PartialEq,
475 Eq,
476 Hash
477 )]
478 #[ethcall(name = "transfer", abi = "transfer(address,uint256)")]
479 pub struct TransferCall {
480 pub to: ::ethers_core::types::Address,
481 pub amount: ::ethers_core::types::U256,
482 }
483 #[derive(
485 Clone,
486 ::ethers_contract::EthCall,
487 ::ethers_contract::EthDisplay,
488 Default,
489 Debug,
490 PartialEq,
491 Eq,
492 Hash
493 )]
494 #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")]
495 pub struct TransferFromCall {
496 pub from: ::ethers_core::types::Address,
497 pub to: ::ethers_core::types::Address,
498 pub amount: ::ethers_core::types::U256,
499 }
500 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
502 pub enum ERC20PausableCalls {
503 Allowance(AllowanceCall),
504 Approve(ApproveCall),
505 BalanceOf(BalanceOfCall),
506 Decimals(DecimalsCall),
507 DecreaseAllowance(DecreaseAllowanceCall),
508 IncreaseAllowance(IncreaseAllowanceCall),
509 Name(NameCall),
510 Paused(PausedCall),
511 Symbol(SymbolCall),
512 TotalSupply(TotalSupplyCall),
513 Transfer(TransferCall),
514 TransferFrom(TransferFromCall),
515 }
516 impl ::ethers_core::abi::AbiDecode for ERC20PausableCalls {
517 fn decode(
518 data: impl AsRef<[u8]>,
519 ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
520 let data = data.as_ref();
521 if let Ok(decoded)
522 = <AllowanceCall as ::ethers_core::abi::AbiDecode>::decode(data) {
523 return Ok(Self::Allowance(decoded));
524 }
525 if let Ok(decoded)
526 = <ApproveCall as ::ethers_core::abi::AbiDecode>::decode(data) {
527 return Ok(Self::Approve(decoded));
528 }
529 if let Ok(decoded)
530 = <BalanceOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
531 return Ok(Self::BalanceOf(decoded));
532 }
533 if let Ok(decoded)
534 = <DecimalsCall as ::ethers_core::abi::AbiDecode>::decode(data) {
535 return Ok(Self::Decimals(decoded));
536 }
537 if let Ok(decoded)
538 = <DecreaseAllowanceCall as ::ethers_core::abi::AbiDecode>::decode(
539 data,
540 ) {
541 return Ok(Self::DecreaseAllowance(decoded));
542 }
543 if let Ok(decoded)
544 = <IncreaseAllowanceCall as ::ethers_core::abi::AbiDecode>::decode(
545 data,
546 ) {
547 return Ok(Self::IncreaseAllowance(decoded));
548 }
549 if let Ok(decoded)
550 = <NameCall as ::ethers_core::abi::AbiDecode>::decode(data) {
551 return Ok(Self::Name(decoded));
552 }
553 if let Ok(decoded)
554 = <PausedCall as ::ethers_core::abi::AbiDecode>::decode(data) {
555 return Ok(Self::Paused(decoded));
556 }
557 if let Ok(decoded)
558 = <SymbolCall as ::ethers_core::abi::AbiDecode>::decode(data) {
559 return Ok(Self::Symbol(decoded));
560 }
561 if let Ok(decoded)
562 = <TotalSupplyCall as ::ethers_core::abi::AbiDecode>::decode(data) {
563 return Ok(Self::TotalSupply(decoded));
564 }
565 if let Ok(decoded)
566 = <TransferCall as ::ethers_core::abi::AbiDecode>::decode(data) {
567 return Ok(Self::Transfer(decoded));
568 }
569 if let Ok(decoded)
570 = <TransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
571 return Ok(Self::TransferFrom(decoded));
572 }
573 Err(::ethers_core::abi::Error::InvalidData.into())
574 }
575 }
576 impl ::ethers_core::abi::AbiEncode for ERC20PausableCalls {
577 fn encode(self) -> Vec<u8> {
578 match self {
579 Self::Allowance(element) => {
580 ::ethers_core::abi::AbiEncode::encode(element)
581 }
582 Self::Approve(element) => ::ethers_core::abi::AbiEncode::encode(element),
583 Self::BalanceOf(element) => {
584 ::ethers_core::abi::AbiEncode::encode(element)
585 }
586 Self::Decimals(element) => ::ethers_core::abi::AbiEncode::encode(element),
587 Self::DecreaseAllowance(element) => {
588 ::ethers_core::abi::AbiEncode::encode(element)
589 }
590 Self::IncreaseAllowance(element) => {
591 ::ethers_core::abi::AbiEncode::encode(element)
592 }
593 Self::Name(element) => ::ethers_core::abi::AbiEncode::encode(element),
594 Self::Paused(element) => ::ethers_core::abi::AbiEncode::encode(element),
595 Self::Symbol(element) => ::ethers_core::abi::AbiEncode::encode(element),
596 Self::TotalSupply(element) => {
597 ::ethers_core::abi::AbiEncode::encode(element)
598 }
599 Self::Transfer(element) => ::ethers_core::abi::AbiEncode::encode(element),
600 Self::TransferFrom(element) => {
601 ::ethers_core::abi::AbiEncode::encode(element)
602 }
603 }
604 }
605 }
606 impl ::core::fmt::Display for ERC20PausableCalls {
607 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
608 match self {
609 Self::Allowance(element) => ::core::fmt::Display::fmt(element, f),
610 Self::Approve(element) => ::core::fmt::Display::fmt(element, f),
611 Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f),
612 Self::Decimals(element) => ::core::fmt::Display::fmt(element, f),
613 Self::DecreaseAllowance(element) => ::core::fmt::Display::fmt(element, f),
614 Self::IncreaseAllowance(element) => ::core::fmt::Display::fmt(element, f),
615 Self::Name(element) => ::core::fmt::Display::fmt(element, f),
616 Self::Paused(element) => ::core::fmt::Display::fmt(element, f),
617 Self::Symbol(element) => ::core::fmt::Display::fmt(element, f),
618 Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f),
619 Self::Transfer(element) => ::core::fmt::Display::fmt(element, f),
620 Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f),
621 }
622 }
623 }
624 impl ::core::convert::From<AllowanceCall> for ERC20PausableCalls {
625 fn from(value: AllowanceCall) -> Self {
626 Self::Allowance(value)
627 }
628 }
629 impl ::core::convert::From<ApproveCall> for ERC20PausableCalls {
630 fn from(value: ApproveCall) -> Self {
631 Self::Approve(value)
632 }
633 }
634 impl ::core::convert::From<BalanceOfCall> for ERC20PausableCalls {
635 fn from(value: BalanceOfCall) -> Self {
636 Self::BalanceOf(value)
637 }
638 }
639 impl ::core::convert::From<DecimalsCall> for ERC20PausableCalls {
640 fn from(value: DecimalsCall) -> Self {
641 Self::Decimals(value)
642 }
643 }
644 impl ::core::convert::From<DecreaseAllowanceCall> for ERC20PausableCalls {
645 fn from(value: DecreaseAllowanceCall) -> Self {
646 Self::DecreaseAllowance(value)
647 }
648 }
649 impl ::core::convert::From<IncreaseAllowanceCall> for ERC20PausableCalls {
650 fn from(value: IncreaseAllowanceCall) -> Self {
651 Self::IncreaseAllowance(value)
652 }
653 }
654 impl ::core::convert::From<NameCall> for ERC20PausableCalls {
655 fn from(value: NameCall) -> Self {
656 Self::Name(value)
657 }
658 }
659 impl ::core::convert::From<PausedCall> for ERC20PausableCalls {
660 fn from(value: PausedCall) -> Self {
661 Self::Paused(value)
662 }
663 }
664 impl ::core::convert::From<SymbolCall> for ERC20PausableCalls {
665 fn from(value: SymbolCall) -> Self {
666 Self::Symbol(value)
667 }
668 }
669 impl ::core::convert::From<TotalSupplyCall> for ERC20PausableCalls {
670 fn from(value: TotalSupplyCall) -> Self {
671 Self::TotalSupply(value)
672 }
673 }
674 impl ::core::convert::From<TransferCall> for ERC20PausableCalls {
675 fn from(value: TransferCall) -> Self {
676 Self::Transfer(value)
677 }
678 }
679 impl ::core::convert::From<TransferFromCall> for ERC20PausableCalls {
680 fn from(value: TransferFromCall) -> Self {
681 Self::TransferFrom(value)
682 }
683 }
684 #[derive(
686 Clone,
687 ::ethers_contract::EthAbiType,
688 ::ethers_contract::EthAbiCodec,
689 Default,
690 Debug,
691 PartialEq,
692 Eq,
693 Hash
694 )]
695 pub struct AllowanceReturn(pub ::ethers_core::types::U256);
696 #[derive(
698 Clone,
699 ::ethers_contract::EthAbiType,
700 ::ethers_contract::EthAbiCodec,
701 Default,
702 Debug,
703 PartialEq,
704 Eq,
705 Hash
706 )]
707 pub struct ApproveReturn(pub bool);
708 #[derive(
710 Clone,
711 ::ethers_contract::EthAbiType,
712 ::ethers_contract::EthAbiCodec,
713 Default,
714 Debug,
715 PartialEq,
716 Eq,
717 Hash
718 )]
719 pub struct BalanceOfReturn(pub ::ethers_core::types::U256);
720 #[derive(
722 Clone,
723 ::ethers_contract::EthAbiType,
724 ::ethers_contract::EthAbiCodec,
725 Default,
726 Debug,
727 PartialEq,
728 Eq,
729 Hash
730 )]
731 pub struct DecimalsReturn(pub u8);
732 #[derive(
734 Clone,
735 ::ethers_contract::EthAbiType,
736 ::ethers_contract::EthAbiCodec,
737 Default,
738 Debug,
739 PartialEq,
740 Eq,
741 Hash
742 )]
743 pub struct DecreaseAllowanceReturn(pub bool);
744 #[derive(
746 Clone,
747 ::ethers_contract::EthAbiType,
748 ::ethers_contract::EthAbiCodec,
749 Default,
750 Debug,
751 PartialEq,
752 Eq,
753 Hash
754 )]
755 pub struct IncreaseAllowanceReturn(pub bool);
756 #[derive(
758 Clone,
759 ::ethers_contract::EthAbiType,
760 ::ethers_contract::EthAbiCodec,
761 Default,
762 Debug,
763 PartialEq,
764 Eq,
765 Hash
766 )]
767 pub struct NameReturn(pub ::std::string::String);
768 #[derive(
770 Clone,
771 ::ethers_contract::EthAbiType,
772 ::ethers_contract::EthAbiCodec,
773 Default,
774 Debug,
775 PartialEq,
776 Eq,
777 Hash
778 )]
779 pub struct PausedReturn(pub bool);
780 #[derive(
782 Clone,
783 ::ethers_contract::EthAbiType,
784 ::ethers_contract::EthAbiCodec,
785 Default,
786 Debug,
787 PartialEq,
788 Eq,
789 Hash
790 )]
791 pub struct SymbolReturn(pub ::std::string::String);
792 #[derive(
794 Clone,
795 ::ethers_contract::EthAbiType,
796 ::ethers_contract::EthAbiCodec,
797 Default,
798 Debug,
799 PartialEq,
800 Eq,
801 Hash
802 )]
803 pub struct TotalSupplyReturn(pub ::ethers_core::types::U256);
804 #[derive(
806 Clone,
807 ::ethers_contract::EthAbiType,
808 ::ethers_contract::EthAbiCodec,
809 Default,
810 Debug,
811 PartialEq,
812 Eq,
813 Hash
814 )]
815 pub struct TransferReturn(pub bool);
816 #[derive(
818 Clone,
819 ::ethers_contract::EthAbiType,
820 ::ethers_contract::EthAbiCodec,
821 Default,
822 Debug,
823 PartialEq,
824 Eq,
825 Hash
826 )]
827 pub struct TransferFromReturn(pub bool);
828}