openzeppelin_rs/contracts/
CrossChainEnabledPolygonChild.rs

1pub use cross_chain_enabled_polygon_child::*;
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_polygon_child {
13    #[rustfmt::skip]
14    const __ABI: &str = "[{\"inputs\":[],\"type\":\"error\",\"name\":\"NotCrossChainCall\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"rootMessageSender\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"processMessageFromRoot\",\"outputs\":[]}]";
15    ///The parsed JSON ABI of the contract.
16    pub static CROSSCHAINENABLEDPOLYGONCHILD_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 CrossChainEnabledPolygonChild<M>(::ethers_contract::Contract<M>);
22    impl<M> ::core::clone::Clone for CrossChainEnabledPolygonChild<M> {
23        fn clone(&self) -> Self {
24            Self(::core::clone::Clone::clone(&self.0))
25        }
26    }
27    impl<M> ::core::ops::Deref for CrossChainEnabledPolygonChild<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 CrossChainEnabledPolygonChild<M> {
34        fn deref_mut(&mut self) -> &mut Self::Target {
35            &mut self.0
36        }
37    }
38    impl<M> ::core::fmt::Debug for CrossChainEnabledPolygonChild<M> {
39        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
40            f.debug_tuple(stringify!(CrossChainEnabledPolygonChild))
41                .field(&self.address())
42                .finish()
43        }
44    }
45    impl<M: ::ethers_providers::Middleware> CrossChainEnabledPolygonChild<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                    CROSSCHAINENABLEDPOLYGONCHILD_ABI.clone(),
56                    client,
57                ),
58            )
59        }
60        ///Calls the contract's `processMessageFromRoot` (0x9a7c4b71) function
61        pub fn process_message_from_root(
62            &self,
63            p0: ::ethers_core::types::U256,
64            root_message_sender: ::ethers_core::types::Address,
65            data: ::ethers_core::types::Bytes,
66        ) -> ::ethers_contract::builders::ContractCall<M, ()> {
67            self.0
68                .method_hash([154, 124, 75, 113], (p0, root_message_sender, data))
69                .expect("method not found (this should never happen)")
70        }
71    }
72    impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
73    for CrossChainEnabledPolygonChild<M> {
74        fn from(contract: ::ethers_contract::Contract<M>) -> Self {
75            Self::new(contract.address(), contract.client())
76        }
77    }
78    ///Custom Error type `NotCrossChainCall` with signature `NotCrossChainCall()` and selector `0x4a74df92`
79    #[derive(
80        Clone,
81        ::ethers_contract::EthError,
82        ::ethers_contract::EthDisplay,
83        Default,
84        Debug,
85        PartialEq,
86        Eq,
87        Hash
88    )]
89    #[etherror(name = "NotCrossChainCall", abi = "NotCrossChainCall()")]
90    pub struct NotCrossChainCall;
91    ///Container type for all input parameters for the `processMessageFromRoot` function with signature `processMessageFromRoot(uint256,address,bytes)` and selector `0x9a7c4b71`
92    #[derive(
93        Clone,
94        ::ethers_contract::EthCall,
95        ::ethers_contract::EthDisplay,
96        Default,
97        Debug,
98        PartialEq,
99        Eq,
100        Hash
101    )]
102    #[ethcall(
103        name = "processMessageFromRoot",
104        abi = "processMessageFromRoot(uint256,address,bytes)"
105    )]
106    pub struct ProcessMessageFromRootCall {
107        pub p0: ::ethers_core::types::U256,
108        pub root_message_sender: ::ethers_core::types::Address,
109        pub data: ::ethers_core::types::Bytes,
110    }
111}