openzeppelin_rs/contracts/
IFxMessageProcessor.rs

1pub use i_fx_message_processor::*;
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 i_fx_message_processor {
13    #[rustfmt::skip]
14    const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"stateId\",\"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 IFXMESSAGEPROCESSOR_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 IFxMessageProcessor<M>(::ethers_contract::Contract<M>);
22    impl<M> ::core::clone::Clone for IFxMessageProcessor<M> {
23        fn clone(&self) -> Self {
24            Self(::core::clone::Clone::clone(&self.0))
25        }
26    }
27    impl<M> ::core::ops::Deref for IFxMessageProcessor<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 IFxMessageProcessor<M> {
34        fn deref_mut(&mut self) -> &mut Self::Target {
35            &mut self.0
36        }
37    }
38    impl<M> ::core::fmt::Debug for IFxMessageProcessor<M> {
39        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
40            f.debug_tuple(stringify!(IFxMessageProcessor))
41                .field(&self.address())
42                .finish()
43        }
44    }
45    impl<M: ::ethers_providers::Middleware> IFxMessageProcessor<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                    IFXMESSAGEPROCESSOR_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            state_id: ::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], (state_id, 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 IFxMessageProcessor<M> {
74        fn from(contract: ::ethers_contract::Contract<M>) -> Self {
75            Self::new(contract.address(), contract.client())
76        }
77    }
78    ///Container type for all input parameters for the `processMessageFromRoot` function with signature `processMessageFromRoot(uint256,address,bytes)` and selector `0x9a7c4b71`
79    #[derive(
80        Clone,
81        ::ethers_contract::EthCall,
82        ::ethers_contract::EthDisplay,
83        Default,
84        Debug,
85        PartialEq,
86        Eq,
87        Hash
88    )]
89    #[ethcall(
90        name = "processMessageFromRoot",
91        abi = "processMessageFromRoot(uint256,address,bytes)"
92    )]
93    pub struct ProcessMessageFromRootCall {
94        pub state_id: ::ethers_core::types::U256,
95        pub root_message_sender: ::ethers_core::types::Address,
96        pub data: ::ethers_core::types::Bytes,
97    }
98}