hopr_bindings/codegen/
hopr_node_safe_registry_events.rs

1pub use hopr_node_safe_registry_events::*;
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 hopr_node_safe_registry_events {
13    #[allow(deprecated)]
14    fn __abi() -> ::ethers::core::abi::Abi {
15        ::ethers::core::abi::ethabi::Contract {
16            constructor: ::core::option::Option::None,
17            functions: ::std::collections::BTreeMap::new(),
18            events: ::core::convert::From::from([
19                (
20                    ::std::borrow::ToOwned::to_owned("DergisteredNodeSafe"),
21                    ::std::vec![
22                        ::ethers::core::abi::ethabi::Event {
23                            name: ::std::borrow::ToOwned::to_owned(
24                                "DergisteredNodeSafe",
25                            ),
26                            inputs: ::std::vec![
27                                ::ethers::core::abi::ethabi::EventParam {
28                                    name: ::std::borrow::ToOwned::to_owned("safeAddress"),
29                                    kind: ::ethers::core::abi::ethabi::ParamType::Address,
30                                    indexed: true,
31                                },
32                                ::ethers::core::abi::ethabi::EventParam {
33                                    name: ::std::borrow::ToOwned::to_owned("nodeAddress"),
34                                    kind: ::ethers::core::abi::ethabi::ParamType::Address,
35                                    indexed: true,
36                                },
37                            ],
38                            anonymous: false,
39                        },
40                    ],
41                ),
42                (
43                    ::std::borrow::ToOwned::to_owned("DomainSeparatorUpdated"),
44                    ::std::vec![
45                        ::ethers::core::abi::ethabi::Event {
46                            name: ::std::borrow::ToOwned::to_owned(
47                                "DomainSeparatorUpdated",
48                            ),
49                            inputs: ::std::vec![
50                                ::ethers::core::abi::ethabi::EventParam {
51                                    name: ::std::borrow::ToOwned::to_owned("domainSeparator"),
52                                    kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes(
53                                        32usize,
54                                    ),
55                                    indexed: true,
56                                },
57                            ],
58                            anonymous: false,
59                        },
60                    ],
61                ),
62                (
63                    ::std::borrow::ToOwned::to_owned("RegisteredNodeSafe"),
64                    ::std::vec![
65                        ::ethers::core::abi::ethabi::Event {
66                            name: ::std::borrow::ToOwned::to_owned("RegisteredNodeSafe"),
67                            inputs: ::std::vec![
68                                ::ethers::core::abi::ethabi::EventParam {
69                                    name: ::std::borrow::ToOwned::to_owned("safeAddress"),
70                                    kind: ::ethers::core::abi::ethabi::ParamType::Address,
71                                    indexed: true,
72                                },
73                                ::ethers::core::abi::ethabi::EventParam {
74                                    name: ::std::borrow::ToOwned::to_owned("nodeAddress"),
75                                    kind: ::ethers::core::abi::ethabi::ParamType::Address,
76                                    indexed: true,
77                                },
78                            ],
79                            anonymous: false,
80                        },
81                    ],
82                ),
83            ]),
84            errors: ::std::collections::BTreeMap::new(),
85            receive: false,
86            fallback: false,
87        }
88    }
89    ///The parsed JSON ABI of the contract.
90    pub static HOPRNODESAFEREGISTRYEVENTS_ABI: ::ethers::contract::Lazy<
91        ::ethers::core::abi::Abi,
92    > = ::ethers::contract::Lazy::new(__abi);
93    pub struct HoprNodeSafeRegistryEvents<M>(::ethers::contract::Contract<M>);
94    impl<M> ::core::clone::Clone for HoprNodeSafeRegistryEvents<M> {
95        fn clone(&self) -> Self {
96            Self(::core::clone::Clone::clone(&self.0))
97        }
98    }
99    impl<M> ::core::ops::Deref for HoprNodeSafeRegistryEvents<M> {
100        type Target = ::ethers::contract::Contract<M>;
101        fn deref(&self) -> &Self::Target {
102            &self.0
103        }
104    }
105    impl<M> ::core::ops::DerefMut for HoprNodeSafeRegistryEvents<M> {
106        fn deref_mut(&mut self) -> &mut Self::Target {
107            &mut self.0
108        }
109    }
110    impl<M> ::core::fmt::Debug for HoprNodeSafeRegistryEvents<M> {
111        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
112            f.debug_tuple(::core::stringify!(HoprNodeSafeRegistryEvents))
113                .field(&self.address())
114                .finish()
115        }
116    }
117    impl<M: ::ethers::providers::Middleware> HoprNodeSafeRegistryEvents<M> {
118        /// Creates a new contract instance with the specified `ethers` client at
119        /// `address`. The contract derefs to a `ethers::Contract` object.
120        pub fn new<T: Into<::ethers::core::types::Address>>(
121            address: T,
122            client: ::std::sync::Arc<M>,
123        ) -> Self {
124            Self(
125                ::ethers::contract::Contract::new(
126                    address.into(),
127                    HOPRNODESAFEREGISTRYEVENTS_ABI.clone(),
128                    client,
129                ),
130            )
131        }
132        ///Gets the contract's `DergisteredNodeSafe` event
133        pub fn dergistered_node_safe_filter(
134            &self,
135        ) -> ::ethers::contract::builders::Event<
136            ::std::sync::Arc<M>,
137            M,
138            DergisteredNodeSafeFilter,
139        > {
140            self.0.event()
141        }
142        ///Gets the contract's `DomainSeparatorUpdated` event
143        pub fn domain_separator_updated_filter(
144            &self,
145        ) -> ::ethers::contract::builders::Event<
146            ::std::sync::Arc<M>,
147            M,
148            DomainSeparatorUpdatedFilter,
149        > {
150            self.0.event()
151        }
152        ///Gets the contract's `RegisteredNodeSafe` event
153        pub fn registered_node_safe_filter(
154            &self,
155        ) -> ::ethers::contract::builders::Event<
156            ::std::sync::Arc<M>,
157            M,
158            RegisteredNodeSafeFilter,
159        > {
160            self.0.event()
161        }
162        /// Returns an `Event` builder for all the events of this contract.
163        pub fn events(
164            &self,
165        ) -> ::ethers::contract::builders::Event<
166            ::std::sync::Arc<M>,
167            M,
168            HoprNodeSafeRegistryEventsEvents,
169        > {
170            self.0.event_with_filter(::core::default::Default::default())
171        }
172    }
173    impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>>
174    for HoprNodeSafeRegistryEvents<M> {
175        fn from(contract: ::ethers::contract::Contract<M>) -> Self {
176            Self::new(contract.address(), contract.client())
177        }
178    }
179    #[derive(
180        Clone,
181        ::ethers::contract::EthEvent,
182        ::ethers::contract::EthDisplay,
183        serde::Serialize,
184        serde::Deserialize,
185        Default,
186        Debug,
187        PartialEq,
188        Eq,
189        Hash
190    )]
191    #[ethevent(
192        name = "DergisteredNodeSafe",
193        abi = "DergisteredNodeSafe(address,address)"
194    )]
195    pub struct DergisteredNodeSafeFilter {
196        #[ethevent(indexed)]
197        pub safe_address: ::ethers::core::types::Address,
198        #[ethevent(indexed)]
199        pub node_address: ::ethers::core::types::Address,
200    }
201    #[derive(
202        Clone,
203        ::ethers::contract::EthEvent,
204        ::ethers::contract::EthDisplay,
205        serde::Serialize,
206        serde::Deserialize,
207        Default,
208        Debug,
209        PartialEq,
210        Eq,
211        Hash
212    )]
213    #[ethevent(name = "DomainSeparatorUpdated", abi = "DomainSeparatorUpdated(bytes32)")]
214    pub struct DomainSeparatorUpdatedFilter {
215        #[ethevent(indexed)]
216        pub domain_separator: [u8; 32],
217    }
218    #[derive(
219        Clone,
220        ::ethers::contract::EthEvent,
221        ::ethers::contract::EthDisplay,
222        serde::Serialize,
223        serde::Deserialize,
224        Default,
225        Debug,
226        PartialEq,
227        Eq,
228        Hash
229    )]
230    #[ethevent(name = "RegisteredNodeSafe", abi = "RegisteredNodeSafe(address,address)")]
231    pub struct RegisteredNodeSafeFilter {
232        #[ethevent(indexed)]
233        pub safe_address: ::ethers::core::types::Address,
234        #[ethevent(indexed)]
235        pub node_address: ::ethers::core::types::Address,
236    }
237    ///Container type for all of the contract's events
238    #[derive(
239        Clone,
240        ::ethers::contract::EthAbiType,
241        serde::Serialize,
242        serde::Deserialize,
243        Debug,
244        PartialEq,
245        Eq,
246        Hash
247    )]
248    pub enum HoprNodeSafeRegistryEventsEvents {
249        DergisteredNodeSafeFilter(DergisteredNodeSafeFilter),
250        DomainSeparatorUpdatedFilter(DomainSeparatorUpdatedFilter),
251        RegisteredNodeSafeFilter(RegisteredNodeSafeFilter),
252    }
253    impl ::ethers::contract::EthLogDecode for HoprNodeSafeRegistryEventsEvents {
254        fn decode_log(
255            log: &::ethers::core::abi::RawLog,
256        ) -> ::core::result::Result<Self, ::ethers::core::abi::Error> {
257            if let Ok(decoded) = DergisteredNodeSafeFilter::decode_log(log) {
258                return Ok(
259                    HoprNodeSafeRegistryEventsEvents::DergisteredNodeSafeFilter(decoded),
260                );
261            }
262            if let Ok(decoded) = DomainSeparatorUpdatedFilter::decode_log(log) {
263                return Ok(
264                    HoprNodeSafeRegistryEventsEvents::DomainSeparatorUpdatedFilter(
265                        decoded,
266                    ),
267                );
268            }
269            if let Ok(decoded) = RegisteredNodeSafeFilter::decode_log(log) {
270                return Ok(
271                    HoprNodeSafeRegistryEventsEvents::RegisteredNodeSafeFilter(decoded),
272                );
273            }
274            Err(::ethers::core::abi::Error::InvalidData)
275        }
276    }
277    impl ::core::fmt::Display for HoprNodeSafeRegistryEventsEvents {
278        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
279            match self {
280                Self::DergisteredNodeSafeFilter(element) => {
281                    ::core::fmt::Display::fmt(element, f)
282                }
283                Self::DomainSeparatorUpdatedFilter(element) => {
284                    ::core::fmt::Display::fmt(element, f)
285                }
286                Self::RegisteredNodeSafeFilter(element) => {
287                    ::core::fmt::Display::fmt(element, f)
288                }
289            }
290        }
291    }
292    impl ::core::convert::From<DergisteredNodeSafeFilter>
293    for HoprNodeSafeRegistryEventsEvents {
294        fn from(value: DergisteredNodeSafeFilter) -> Self {
295            Self::DergisteredNodeSafeFilter(value)
296        }
297    }
298    impl ::core::convert::From<DomainSeparatorUpdatedFilter>
299    for HoprNodeSafeRegistryEventsEvents {
300        fn from(value: DomainSeparatorUpdatedFilter) -> Self {
301            Self::DomainSeparatorUpdatedFilter(value)
302        }
303    }
304    impl ::core::convert::From<RegisteredNodeSafeFilter>
305    for HoprNodeSafeRegistryEventsEvents {
306        fn from(value: RegisteredNodeSafeFilter) -> Self {
307            Self::RegisteredNodeSafeFilter(value)
308        }
309    }
310}