openzeppelin_rs/contracts/
IERC1363.rs

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