openzeppelin_rs/contracts/
ERC165Storage.rs

1pub use erc165_storage::*;
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 erc165_storage {
13    #[rustfmt::skip]
14    const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]}]";
15    ///The parsed JSON ABI of the contract.
16    pub static ERC165STORAGE_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 ERC165Storage<M>(::ethers_contract::Contract<M>);
19    impl<M> ::core::clone::Clone for ERC165Storage<M> {
20        fn clone(&self) -> Self {
21            Self(::core::clone::Clone::clone(&self.0))
22        }
23    }
24    impl<M> ::core::ops::Deref for ERC165Storage<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 ERC165Storage<M> {
31        fn deref_mut(&mut self) -> &mut Self::Target {
32            &mut self.0
33        }
34    }
35    impl<M> ::core::fmt::Debug for ERC165Storage<M> {
36        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
37            f.debug_tuple(stringify!(ERC165Storage)).field(&self.address()).finish()
38        }
39    }
40    impl<M: ::ethers_providers::Middleware> ERC165Storage<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                    ERC165STORAGE_ABI.clone(),
51                    client,
52                ),
53            )
54        }
55        ///Calls the contract's `supportsInterface` (0x01ffc9a7) function
56        pub fn supports_interface(
57            &self,
58            interface_id: [u8; 4],
59        ) -> ::ethers_contract::builders::ContractCall<M, bool> {
60            self.0
61                .method_hash([1, 255, 201, 167], interface_id)
62                .expect("method not found (this should never happen)")
63        }
64    }
65    impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
66    for ERC165Storage<M> {
67        fn from(contract: ::ethers_contract::Contract<M>) -> Self {
68            Self::new(contract.address(), contract.client())
69        }
70    }
71    ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`
72    #[derive(
73        Clone,
74        ::ethers_contract::EthCall,
75        ::ethers_contract::EthDisplay,
76        Default,
77        Debug,
78        PartialEq,
79        Eq,
80        Hash
81    )]
82    #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")]
83    pub struct SupportsInterfaceCall {
84        pub interface_id: [u8; 4],
85    }
86    ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`
87    #[derive(
88        Clone,
89        ::ethers_contract::EthAbiType,
90        ::ethers_contract::EthAbiCodec,
91        Default,
92        Debug,
93        PartialEq,
94        Eq,
95        Hash
96    )]
97    pub struct SupportsInterfaceReturn(pub bool);
98}