openzeppelin_rs/contracts/
ERC20Burnable.rs

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