1pub use hopr_network_registry_events::*;
2#[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_network_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("Deregistered"),
21 ::std::vec![
22 ::ethers::core::abi::ethabi::Event {
23 name: ::std::borrow::ToOwned::to_owned("Deregistered"),
24 inputs: ::std::vec![
25 ::ethers::core::abi::ethabi::EventParam {
26 name: ::std::borrow::ToOwned::to_owned("stakingAccount"),
27 kind: ::ethers::core::abi::ethabi::ParamType::Address,
28 indexed: true,
29 },
30 ::ethers::core::abi::ethabi::EventParam {
31 name: ::std::borrow::ToOwned::to_owned("nodeAddress"),
32 kind: ::ethers::core::abi::ethabi::ParamType::Address,
33 indexed: true,
34 },
35 ],
36 anonymous: false,
37 },
38 ],
39 ),
40 (
41 ::std::borrow::ToOwned::to_owned("DeregisteredByManager"),
42 ::std::vec![
43 ::ethers::core::abi::ethabi::Event {
44 name: ::std::borrow::ToOwned::to_owned(
45 "DeregisteredByManager",
46 ),
47 inputs: ::std::vec![
48 ::ethers::core::abi::ethabi::EventParam {
49 name: ::std::borrow::ToOwned::to_owned("stakingAccount"),
50 kind: ::ethers::core::abi::ethabi::ParamType::Address,
51 indexed: true,
52 },
53 ::ethers::core::abi::ethabi::EventParam {
54 name: ::std::borrow::ToOwned::to_owned("nodeAddress"),
55 kind: ::ethers::core::abi::ethabi::ParamType::Address,
56 indexed: true,
57 },
58 ],
59 anonymous: false,
60 },
61 ],
62 ),
63 (
64 ::std::borrow::ToOwned::to_owned("EligibilityUpdated"),
65 ::std::vec![
66 ::ethers::core::abi::ethabi::Event {
67 name: ::std::borrow::ToOwned::to_owned("EligibilityUpdated"),
68 inputs: ::std::vec![
69 ::ethers::core::abi::ethabi::EventParam {
70 name: ::std::borrow::ToOwned::to_owned("stakingAccount"),
71 kind: ::ethers::core::abi::ethabi::ParamType::Address,
72 indexed: true,
73 },
74 ::ethers::core::abi::ethabi::EventParam {
75 name: ::std::borrow::ToOwned::to_owned("eligibility"),
76 kind: ::ethers::core::abi::ethabi::ParamType::Bool,
77 indexed: true,
78 },
79 ],
80 anonymous: false,
81 },
82 ],
83 ),
84 (
85 ::std::borrow::ToOwned::to_owned("NetworkRegistryStatusUpdated"),
86 ::std::vec![
87 ::ethers::core::abi::ethabi::Event {
88 name: ::std::borrow::ToOwned::to_owned(
89 "NetworkRegistryStatusUpdated",
90 ),
91 inputs: ::std::vec![
92 ::ethers::core::abi::ethabi::EventParam {
93 name: ::std::borrow::ToOwned::to_owned("isEnabled"),
94 kind: ::ethers::core::abi::ethabi::ParamType::Bool,
95 indexed: true,
96 },
97 ],
98 anonymous: false,
99 },
100 ],
101 ),
102 (
103 ::std::borrow::ToOwned::to_owned("Registered"),
104 ::std::vec![
105 ::ethers::core::abi::ethabi::Event {
106 name: ::std::borrow::ToOwned::to_owned("Registered"),
107 inputs: ::std::vec![
108 ::ethers::core::abi::ethabi::EventParam {
109 name: ::std::borrow::ToOwned::to_owned("stakingAccount"),
110 kind: ::ethers::core::abi::ethabi::ParamType::Address,
111 indexed: true,
112 },
113 ::ethers::core::abi::ethabi::EventParam {
114 name: ::std::borrow::ToOwned::to_owned("nodeAddress"),
115 kind: ::ethers::core::abi::ethabi::ParamType::Address,
116 indexed: true,
117 },
118 ],
119 anonymous: false,
120 },
121 ],
122 ),
123 (
124 ::std::borrow::ToOwned::to_owned("RegisteredByManager"),
125 ::std::vec![
126 ::ethers::core::abi::ethabi::Event {
127 name: ::std::borrow::ToOwned::to_owned(
128 "RegisteredByManager",
129 ),
130 inputs: ::std::vec![
131 ::ethers::core::abi::ethabi::EventParam {
132 name: ::std::borrow::ToOwned::to_owned("stakingAccount"),
133 kind: ::ethers::core::abi::ethabi::ParamType::Address,
134 indexed: true,
135 },
136 ::ethers::core::abi::ethabi::EventParam {
137 name: ::std::borrow::ToOwned::to_owned("nodeAddress"),
138 kind: ::ethers::core::abi::ethabi::ParamType::Address,
139 indexed: true,
140 },
141 ],
142 anonymous: false,
143 },
144 ],
145 ),
146 (
147 ::std::borrow::ToOwned::to_owned("RequirementUpdated"),
148 ::std::vec![
149 ::ethers::core::abi::ethabi::Event {
150 name: ::std::borrow::ToOwned::to_owned("RequirementUpdated"),
151 inputs: ::std::vec![
152 ::ethers::core::abi::ethabi::EventParam {
153 name: ::std::borrow::ToOwned::to_owned(
154 "requirementImplementation",
155 ),
156 kind: ::ethers::core::abi::ethabi::ParamType::Address,
157 indexed: true,
158 },
159 ],
160 anonymous: false,
161 },
162 ],
163 ),
164 ]),
165 errors: ::std::collections::BTreeMap::new(),
166 receive: false,
167 fallback: false,
168 }
169 }
170 pub static HOPRNETWORKREGISTRYEVENTS_ABI: ::ethers::contract::Lazy<
172 ::ethers::core::abi::Abi,
173 > = ::ethers::contract::Lazy::new(__abi);
174 pub struct HoprNetworkRegistryEvents<M>(::ethers::contract::Contract<M>);
175 impl<M> ::core::clone::Clone for HoprNetworkRegistryEvents<M> {
176 fn clone(&self) -> Self {
177 Self(::core::clone::Clone::clone(&self.0))
178 }
179 }
180 impl<M> ::core::ops::Deref for HoprNetworkRegistryEvents<M> {
181 type Target = ::ethers::contract::Contract<M>;
182 fn deref(&self) -> &Self::Target {
183 &self.0
184 }
185 }
186 impl<M> ::core::ops::DerefMut for HoprNetworkRegistryEvents<M> {
187 fn deref_mut(&mut self) -> &mut Self::Target {
188 &mut self.0
189 }
190 }
191 impl<M> ::core::fmt::Debug for HoprNetworkRegistryEvents<M> {
192 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
193 f.debug_tuple(::core::stringify!(HoprNetworkRegistryEvents))
194 .field(&self.address())
195 .finish()
196 }
197 }
198 impl<M: ::ethers::providers::Middleware> HoprNetworkRegistryEvents<M> {
199 pub fn new<T: Into<::ethers::core::types::Address>>(
202 address: T,
203 client: ::std::sync::Arc<M>,
204 ) -> Self {
205 Self(
206 ::ethers::contract::Contract::new(
207 address.into(),
208 HOPRNETWORKREGISTRYEVENTS_ABI.clone(),
209 client,
210 ),
211 )
212 }
213 pub fn deregistered_filter(
215 &self,
216 ) -> ::ethers::contract::builders::Event<
217 ::std::sync::Arc<M>,
218 M,
219 DeregisteredFilter,
220 > {
221 self.0.event()
222 }
223 pub fn deregistered_by_manager_filter(
225 &self,
226 ) -> ::ethers::contract::builders::Event<
227 ::std::sync::Arc<M>,
228 M,
229 DeregisteredByManagerFilter,
230 > {
231 self.0.event()
232 }
233 pub fn eligibility_updated_filter(
235 &self,
236 ) -> ::ethers::contract::builders::Event<
237 ::std::sync::Arc<M>,
238 M,
239 EligibilityUpdatedFilter,
240 > {
241 self.0.event()
242 }
243 pub fn network_registry_status_updated_filter(
245 &self,
246 ) -> ::ethers::contract::builders::Event<
247 ::std::sync::Arc<M>,
248 M,
249 NetworkRegistryStatusUpdatedFilter,
250 > {
251 self.0.event()
252 }
253 pub fn registered_filter(
255 &self,
256 ) -> ::ethers::contract::builders::Event<
257 ::std::sync::Arc<M>,
258 M,
259 RegisteredFilter,
260 > {
261 self.0.event()
262 }
263 pub fn registered_by_manager_filter(
265 &self,
266 ) -> ::ethers::contract::builders::Event<
267 ::std::sync::Arc<M>,
268 M,
269 RegisteredByManagerFilter,
270 > {
271 self.0.event()
272 }
273 pub fn requirement_updated_filter(
275 &self,
276 ) -> ::ethers::contract::builders::Event<
277 ::std::sync::Arc<M>,
278 M,
279 RequirementUpdatedFilter,
280 > {
281 self.0.event()
282 }
283 pub fn events(
285 &self,
286 ) -> ::ethers::contract::builders::Event<
287 ::std::sync::Arc<M>,
288 M,
289 HoprNetworkRegistryEventsEvents,
290 > {
291 self.0.event_with_filter(::core::default::Default::default())
292 }
293 }
294 impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>>
295 for HoprNetworkRegistryEvents<M> {
296 fn from(contract: ::ethers::contract::Contract<M>) -> Self {
297 Self::new(contract.address(), contract.client())
298 }
299 }
300 #[derive(
301 Clone,
302 ::ethers::contract::EthEvent,
303 ::ethers::contract::EthDisplay,
304 serde::Serialize,
305 serde::Deserialize,
306 Default,
307 Debug,
308 PartialEq,
309 Eq,
310 Hash
311 )]
312 #[ethevent(name = "Deregistered", abi = "Deregistered(address,address)")]
313 pub struct DeregisteredFilter {
314 #[ethevent(indexed)]
315 pub staking_account: ::ethers::core::types::Address,
316 #[ethevent(indexed)]
317 pub node_address: ::ethers::core::types::Address,
318 }
319 #[derive(
320 Clone,
321 ::ethers::contract::EthEvent,
322 ::ethers::contract::EthDisplay,
323 serde::Serialize,
324 serde::Deserialize,
325 Default,
326 Debug,
327 PartialEq,
328 Eq,
329 Hash
330 )]
331 #[ethevent(
332 name = "DeregisteredByManager",
333 abi = "DeregisteredByManager(address,address)"
334 )]
335 pub struct DeregisteredByManagerFilter {
336 #[ethevent(indexed)]
337 pub staking_account: ::ethers::core::types::Address,
338 #[ethevent(indexed)]
339 pub node_address: ::ethers::core::types::Address,
340 }
341 #[derive(
342 Clone,
343 ::ethers::contract::EthEvent,
344 ::ethers::contract::EthDisplay,
345 serde::Serialize,
346 serde::Deserialize,
347 Default,
348 Debug,
349 PartialEq,
350 Eq,
351 Hash
352 )]
353 #[ethevent(name = "EligibilityUpdated", abi = "EligibilityUpdated(address,bool)")]
354 pub struct EligibilityUpdatedFilter {
355 #[ethevent(indexed)]
356 pub staking_account: ::ethers::core::types::Address,
357 #[ethevent(indexed)]
358 pub eligibility: bool,
359 }
360 #[derive(
361 Clone,
362 ::ethers::contract::EthEvent,
363 ::ethers::contract::EthDisplay,
364 serde::Serialize,
365 serde::Deserialize,
366 Default,
367 Debug,
368 PartialEq,
369 Eq,
370 Hash
371 )]
372 #[ethevent(
373 name = "NetworkRegistryStatusUpdated",
374 abi = "NetworkRegistryStatusUpdated(bool)"
375 )]
376 pub struct NetworkRegistryStatusUpdatedFilter {
377 #[ethevent(indexed)]
378 pub is_enabled: bool,
379 }
380 #[derive(
381 Clone,
382 ::ethers::contract::EthEvent,
383 ::ethers::contract::EthDisplay,
384 serde::Serialize,
385 serde::Deserialize,
386 Default,
387 Debug,
388 PartialEq,
389 Eq,
390 Hash
391 )]
392 #[ethevent(name = "Registered", abi = "Registered(address,address)")]
393 pub struct RegisteredFilter {
394 #[ethevent(indexed)]
395 pub staking_account: ::ethers::core::types::Address,
396 #[ethevent(indexed)]
397 pub node_address: ::ethers::core::types::Address,
398 }
399 #[derive(
400 Clone,
401 ::ethers::contract::EthEvent,
402 ::ethers::contract::EthDisplay,
403 serde::Serialize,
404 serde::Deserialize,
405 Default,
406 Debug,
407 PartialEq,
408 Eq,
409 Hash
410 )]
411 #[ethevent(
412 name = "RegisteredByManager",
413 abi = "RegisteredByManager(address,address)"
414 )]
415 pub struct RegisteredByManagerFilter {
416 #[ethevent(indexed)]
417 pub staking_account: ::ethers::core::types::Address,
418 #[ethevent(indexed)]
419 pub node_address: ::ethers::core::types::Address,
420 }
421 #[derive(
422 Clone,
423 ::ethers::contract::EthEvent,
424 ::ethers::contract::EthDisplay,
425 serde::Serialize,
426 serde::Deserialize,
427 Default,
428 Debug,
429 PartialEq,
430 Eq,
431 Hash
432 )]
433 #[ethevent(name = "RequirementUpdated", abi = "RequirementUpdated(address)")]
434 pub struct RequirementUpdatedFilter {
435 #[ethevent(indexed)]
436 pub requirement_implementation: ::ethers::core::types::Address,
437 }
438 #[derive(
440 Clone,
441 ::ethers::contract::EthAbiType,
442 serde::Serialize,
443 serde::Deserialize,
444 Debug,
445 PartialEq,
446 Eq,
447 Hash
448 )]
449 pub enum HoprNetworkRegistryEventsEvents {
450 DeregisteredFilter(DeregisteredFilter),
451 DeregisteredByManagerFilter(DeregisteredByManagerFilter),
452 EligibilityUpdatedFilter(EligibilityUpdatedFilter),
453 NetworkRegistryStatusUpdatedFilter(NetworkRegistryStatusUpdatedFilter),
454 RegisteredFilter(RegisteredFilter),
455 RegisteredByManagerFilter(RegisteredByManagerFilter),
456 RequirementUpdatedFilter(RequirementUpdatedFilter),
457 }
458 impl ::ethers::contract::EthLogDecode for HoprNetworkRegistryEventsEvents {
459 fn decode_log(
460 log: &::ethers::core::abi::RawLog,
461 ) -> ::core::result::Result<Self, ::ethers::core::abi::Error> {
462 if let Ok(decoded) = DeregisteredFilter::decode_log(log) {
463 return Ok(HoprNetworkRegistryEventsEvents::DeregisteredFilter(decoded));
464 }
465 if let Ok(decoded) = DeregisteredByManagerFilter::decode_log(log) {
466 return Ok(
467 HoprNetworkRegistryEventsEvents::DeregisteredByManagerFilter(decoded),
468 );
469 }
470 if let Ok(decoded) = EligibilityUpdatedFilter::decode_log(log) {
471 return Ok(
472 HoprNetworkRegistryEventsEvents::EligibilityUpdatedFilter(decoded),
473 );
474 }
475 if let Ok(decoded) = NetworkRegistryStatusUpdatedFilter::decode_log(log) {
476 return Ok(
477 HoprNetworkRegistryEventsEvents::NetworkRegistryStatusUpdatedFilter(
478 decoded,
479 ),
480 );
481 }
482 if let Ok(decoded) = RegisteredFilter::decode_log(log) {
483 return Ok(HoprNetworkRegistryEventsEvents::RegisteredFilter(decoded));
484 }
485 if let Ok(decoded) = RegisteredByManagerFilter::decode_log(log) {
486 return Ok(
487 HoprNetworkRegistryEventsEvents::RegisteredByManagerFilter(decoded),
488 );
489 }
490 if let Ok(decoded) = RequirementUpdatedFilter::decode_log(log) {
491 return Ok(
492 HoprNetworkRegistryEventsEvents::RequirementUpdatedFilter(decoded),
493 );
494 }
495 Err(::ethers::core::abi::Error::InvalidData)
496 }
497 }
498 impl ::core::fmt::Display for HoprNetworkRegistryEventsEvents {
499 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
500 match self {
501 Self::DeregisteredFilter(element) => {
502 ::core::fmt::Display::fmt(element, f)
503 }
504 Self::DeregisteredByManagerFilter(element) => {
505 ::core::fmt::Display::fmt(element, f)
506 }
507 Self::EligibilityUpdatedFilter(element) => {
508 ::core::fmt::Display::fmt(element, f)
509 }
510 Self::NetworkRegistryStatusUpdatedFilter(element) => {
511 ::core::fmt::Display::fmt(element, f)
512 }
513 Self::RegisteredFilter(element) => ::core::fmt::Display::fmt(element, f),
514 Self::RegisteredByManagerFilter(element) => {
515 ::core::fmt::Display::fmt(element, f)
516 }
517 Self::RequirementUpdatedFilter(element) => {
518 ::core::fmt::Display::fmt(element, f)
519 }
520 }
521 }
522 }
523 impl ::core::convert::From<DeregisteredFilter> for HoprNetworkRegistryEventsEvents {
524 fn from(value: DeregisteredFilter) -> Self {
525 Self::DeregisteredFilter(value)
526 }
527 }
528 impl ::core::convert::From<DeregisteredByManagerFilter>
529 for HoprNetworkRegistryEventsEvents {
530 fn from(value: DeregisteredByManagerFilter) -> Self {
531 Self::DeregisteredByManagerFilter(value)
532 }
533 }
534 impl ::core::convert::From<EligibilityUpdatedFilter>
535 for HoprNetworkRegistryEventsEvents {
536 fn from(value: EligibilityUpdatedFilter) -> Self {
537 Self::EligibilityUpdatedFilter(value)
538 }
539 }
540 impl ::core::convert::From<NetworkRegistryStatusUpdatedFilter>
541 for HoprNetworkRegistryEventsEvents {
542 fn from(value: NetworkRegistryStatusUpdatedFilter) -> Self {
543 Self::NetworkRegistryStatusUpdatedFilter(value)
544 }
545 }
546 impl ::core::convert::From<RegisteredFilter> for HoprNetworkRegistryEventsEvents {
547 fn from(value: RegisteredFilter) -> Self {
548 Self::RegisteredFilter(value)
549 }
550 }
551 impl ::core::convert::From<RegisteredByManagerFilter>
552 for HoprNetworkRegistryEventsEvents {
553 fn from(value: RegisteredByManagerFilter) -> Self {
554 Self::RegisteredByManagerFilter(value)
555 }
556 }
557 impl ::core::convert::From<RequirementUpdatedFilter>
558 for HoprNetworkRegistryEventsEvents {
559 fn from(value: RequirementUpdatedFilter) -> Self {
560 Self::RequirementUpdatedFilter(value)
561 }
562 }
563}