openzeppelin_rs/contracts/
CrossChainEnabledOptimism.rs

1pub use cross_chain_enabled_optimism::*;
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 cross_chain_enabled_optimism {
13    #[rustfmt::skip]
14    const __ABI: &str = "[]";
15    ///The parsed JSON ABI of the contract.
16    pub static CROSSCHAINENABLEDOPTIMISM_ABI: ::ethers_contract::Lazy<
17        ::ethers_core::abi::Abi,
18    > = ::ethers_contract::Lazy::new(|| {
19        ::ethers_core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid")
20    });
21    pub struct CrossChainEnabledOptimism<M>(::ethers_contract::Contract<M>);
22    impl<M> ::core::clone::Clone for CrossChainEnabledOptimism<M> {
23        fn clone(&self) -> Self {
24            Self(::core::clone::Clone::clone(&self.0))
25        }
26    }
27    impl<M> ::core::ops::Deref for CrossChainEnabledOptimism<M> {
28        type Target = ::ethers_contract::Contract<M>;
29        fn deref(&self) -> &Self::Target {
30            &self.0
31        }
32    }
33    impl<M> ::core::ops::DerefMut for CrossChainEnabledOptimism<M> {
34        fn deref_mut(&mut self) -> &mut Self::Target {
35            &mut self.0
36        }
37    }
38    impl<M> ::core::fmt::Debug for CrossChainEnabledOptimism<M> {
39        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
40            f.debug_tuple(stringify!(CrossChainEnabledOptimism))
41                .field(&self.address())
42                .finish()
43        }
44    }
45    impl<M: ::ethers_providers::Middleware> CrossChainEnabledOptimism<M> {
46        /// Creates a new contract instance with the specified `ethers` client at
47        /// `address`. The contract derefs to a `ethers::Contract` object.
48        pub fn new<T: Into<::ethers_core::types::Address>>(
49            address: T,
50            client: ::std::sync::Arc<M>,
51        ) -> Self {
52            Self(
53                ::ethers_contract::Contract::new(
54                    address.into(),
55                    CROSSCHAINENABLEDOPTIMISM_ABI.clone(),
56                    client,
57                ),
58            )
59        }
60    }
61    impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
62    for CrossChainEnabledOptimism<M> {
63        fn from(contract: ::ethers_contract::Contract<M>) -> Self {
64            Self::new(contract.address(), contract.client())
65        }
66    }
67}