1#[allow(
66 non_camel_case_types,
67 non_snake_case,
68 clippy::pub_underscore_fields,
69 clippy::style,
70 clippy::empty_structs_with_brackets
71)]
72pub mod HoprLedger {
73 use super::*;
74 use alloy::sol_types as alloy_sol_types;
75 #[rustfmt::skip]
81 #[allow(clippy::all)]
82 pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
83 b"",
84 );
85 #[rustfmt::skip]
91 #[allow(clippy::all)]
92 pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
93 b"",
94 );
95 #[derive(serde::Serialize, serde::Deserialize)]
96 #[derive(Default, Debug, PartialEq, Eq, Hash)]
97 #[allow(
102 non_camel_case_types,
103 non_snake_case,
104 clippy::pub_underscore_fields,
105 clippy::style
106 )]
107 #[derive(Clone)]
108 pub struct LedgerDomainSeparatorUpdated {
109 #[allow(missing_docs)]
110 pub ledgerDomainSeparator: alloy::sol_types::private::FixedBytes<32>,
111 }
112 #[allow(
113 non_camel_case_types,
114 non_snake_case,
115 clippy::pub_underscore_fields,
116 clippy::style
117 )]
118 const _: () = {
119 use alloy::sol_types as alloy_sol_types;
120 #[automatically_derived]
121 impl alloy_sol_types::SolEvent for LedgerDomainSeparatorUpdated {
122 type DataTuple<'a> = ();
123 type DataToken<'a> = <Self::DataTuple<
124 'a,
125 > as alloy_sol_types::SolType>::Token<'a>;
126 type TopicList = (
127 alloy_sol_types::sol_data::FixedBytes<32>,
128 alloy::sol_types::sol_data::FixedBytes<32>,
129 );
130 const SIGNATURE: &'static str = "LedgerDomainSeparatorUpdated(bytes32)";
131 const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
132 164u8, 63u8, 173u8, 131u8, 146u8, 15u8, 208u8, 148u8, 69u8, 133u8, 94u8,
133 133u8, 78u8, 115u8, 201u8, 197u8, 50u8, 225u8, 116u8, 2u8, 201u8, 206u8,
134 176u8, 153u8, 147u8, 162u8, 57u8, 40u8, 67u8, 165u8, 189u8, 185u8,
135 ]);
136 const ANONYMOUS: bool = false;
137 #[allow(unused_variables)]
138 #[inline]
139 fn new(
140 topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
141 data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
142 ) -> Self {
143 Self {
144 ledgerDomainSeparator: topics.1,
145 }
146 }
147 #[inline]
148 fn check_signature(
149 topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
150 ) -> alloy_sol_types::Result<()> {
151 if topics.0 != Self::SIGNATURE_HASH {
152 return Err(
153 alloy_sol_types::Error::invalid_event_signature_hash(
154 Self::SIGNATURE,
155 topics.0,
156 Self::SIGNATURE_HASH,
157 ),
158 );
159 }
160 Ok(())
161 }
162 #[inline]
163 fn tokenize_body(&self) -> Self::DataToken<'_> {
164 ()
165 }
166 #[inline]
167 fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
168 (Self::SIGNATURE_HASH.into(), self.ledgerDomainSeparator.clone())
169 }
170 #[inline]
171 fn encode_topics_raw(
172 &self,
173 out: &mut [alloy_sol_types::abi::token::WordToken],
174 ) -> alloy_sol_types::Result<()> {
175 if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
176 return Err(alloy_sol_types::Error::Overrun);
177 }
178 out[0usize] = alloy_sol_types::abi::token::WordToken(
179 Self::SIGNATURE_HASH,
180 );
181 out[1usize] = <alloy::sol_types::sol_data::FixedBytes<
182 32,
183 > as alloy_sol_types::EventTopic>::encode_topic(
184 &self.ledgerDomainSeparator,
185 );
186 Ok(())
187 }
188 }
189 #[automatically_derived]
190 impl alloy_sol_types::private::IntoLogData for LedgerDomainSeparatorUpdated {
191 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
192 From::from(self)
193 }
194 fn into_log_data(self) -> alloy_sol_types::private::LogData {
195 From::from(&self)
196 }
197 }
198 #[automatically_derived]
199 impl From<&LedgerDomainSeparatorUpdated> for alloy_sol_types::private::LogData {
200 #[inline]
201 fn from(
202 this: &LedgerDomainSeparatorUpdated,
203 ) -> alloy_sol_types::private::LogData {
204 alloy_sol_types::SolEvent::encode_log_data(this)
205 }
206 }
207 };
208 #[derive(serde::Serialize, serde::Deserialize)]
209 #[derive(Default, Debug, PartialEq, Eq, Hash)]
210 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
215 #[derive(Clone)]
216 pub struct LEDGER_VERSIONCall;
217 #[derive(serde::Serialize, serde::Deserialize)]
218 #[derive(Default, Debug, PartialEq, Eq, Hash)]
219 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
221 #[derive(Clone)]
222 pub struct LEDGER_VERSIONReturn {
223 #[allow(missing_docs)]
224 pub _0: alloy::sol_types::private::String,
225 }
226 #[allow(
227 non_camel_case_types,
228 non_snake_case,
229 clippy::pub_underscore_fields,
230 clippy::style
231 )]
232 const _: () = {
233 use alloy::sol_types as alloy_sol_types;
234 {
235 #[doc(hidden)]
236 type UnderlyingSolTuple<'a> = ();
237 #[doc(hidden)]
238 type UnderlyingRustTuple<'a> = ();
239 #[cfg(test)]
240 #[allow(dead_code, unreachable_patterns)]
241 fn _type_assertion(
242 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
243 ) {
244 match _t {
245 alloy_sol_types::private::AssertTypeEq::<
246 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
247 >(_) => {}
248 }
249 }
250 #[automatically_derived]
251 #[doc(hidden)]
252 impl ::core::convert::From<LEDGER_VERSIONCall> for UnderlyingRustTuple<'_> {
253 fn from(value: LEDGER_VERSIONCall) -> Self {
254 ()
255 }
256 }
257 #[automatically_derived]
258 #[doc(hidden)]
259 impl ::core::convert::From<UnderlyingRustTuple<'_>> for LEDGER_VERSIONCall {
260 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
261 Self
262 }
263 }
264 }
265 {
266 #[doc(hidden)]
267 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,);
268 #[doc(hidden)]
269 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,);
270 #[cfg(test)]
271 #[allow(dead_code, unreachable_patterns)]
272 fn _type_assertion(
273 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
274 ) {
275 match _t {
276 alloy_sol_types::private::AssertTypeEq::<
277 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
278 >(_) => {}
279 }
280 }
281 #[automatically_derived]
282 #[doc(hidden)]
283 impl ::core::convert::From<LEDGER_VERSIONReturn>
284 for UnderlyingRustTuple<'_> {
285 fn from(value: LEDGER_VERSIONReturn) -> Self {
286 (value._0,)
287 }
288 }
289 #[automatically_derived]
290 #[doc(hidden)]
291 impl ::core::convert::From<UnderlyingRustTuple<'_>>
292 for LEDGER_VERSIONReturn {
293 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
294 Self { _0: tuple.0 }
295 }
296 }
297 }
298 #[automatically_derived]
299 impl alloy_sol_types::SolCall for LEDGER_VERSIONCall {
300 type Parameters<'a> = ();
301 type Token<'a> = <Self::Parameters<
302 'a,
303 > as alloy_sol_types::SolType>::Token<'a>;
304 type Return = alloy::sol_types::private::String;
305 type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,);
306 type ReturnToken<'a> = <Self::ReturnTuple<
307 'a,
308 > as alloy_sol_types::SolType>::Token<'a>;
309 const SIGNATURE: &'static str = "LEDGER_VERSION()";
310 const SELECTOR: [u8; 4] = [221u8, 173u8, 25u8, 2u8];
311 #[inline]
312 fn new<'a>(
313 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
314 ) -> Self {
315 tuple.into()
316 }
317 #[inline]
318 fn tokenize(&self) -> Self::Token<'_> {
319 ()
320 }
321 #[inline]
322 fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
323 (
324 <alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(
325 ret,
326 ),
327 )
328 }
329 #[inline]
330 fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
331 <Self::ReturnTuple<
332 '_,
333 > as alloy_sol_types::SolType>::abi_decode_sequence(data)
334 .map(|r| {
335 let r: LEDGER_VERSIONReturn = r.into();
336 r._0
337 })
338 }
339 #[inline]
340 fn abi_decode_returns_validate(
341 data: &[u8],
342 ) -> alloy_sol_types::Result<Self::Return> {
343 <Self::ReturnTuple<
344 '_,
345 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
346 .map(|r| {
347 let r: LEDGER_VERSIONReturn = r.into();
348 r._0
349 })
350 }
351 }
352 };
353 #[derive(serde::Serialize, serde::Deserialize)]
354 #[derive(Default, Debug, PartialEq, Eq, Hash)]
355 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
360 #[derive(Clone)]
361 pub struct ledgerDomainSeparatorCall;
362 #[derive(serde::Serialize, serde::Deserialize)]
363 #[derive(Default, Debug, PartialEq, Eq, Hash)]
364 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
366 #[derive(Clone)]
367 pub struct ledgerDomainSeparatorReturn {
368 #[allow(missing_docs)]
369 pub _0: alloy::sol_types::private::FixedBytes<32>,
370 }
371 #[allow(
372 non_camel_case_types,
373 non_snake_case,
374 clippy::pub_underscore_fields,
375 clippy::style
376 )]
377 const _: () = {
378 use alloy::sol_types as alloy_sol_types;
379 {
380 #[doc(hidden)]
381 type UnderlyingSolTuple<'a> = ();
382 #[doc(hidden)]
383 type UnderlyingRustTuple<'a> = ();
384 #[cfg(test)]
385 #[allow(dead_code, unreachable_patterns)]
386 fn _type_assertion(
387 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
388 ) {
389 match _t {
390 alloy_sol_types::private::AssertTypeEq::<
391 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
392 >(_) => {}
393 }
394 }
395 #[automatically_derived]
396 #[doc(hidden)]
397 impl ::core::convert::From<ledgerDomainSeparatorCall>
398 for UnderlyingRustTuple<'_> {
399 fn from(value: ledgerDomainSeparatorCall) -> Self {
400 ()
401 }
402 }
403 #[automatically_derived]
404 #[doc(hidden)]
405 impl ::core::convert::From<UnderlyingRustTuple<'_>>
406 for ledgerDomainSeparatorCall {
407 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
408 Self
409 }
410 }
411 }
412 {
413 #[doc(hidden)]
414 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
415 #[doc(hidden)]
416 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,);
417 #[cfg(test)]
418 #[allow(dead_code, unreachable_patterns)]
419 fn _type_assertion(
420 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
421 ) {
422 match _t {
423 alloy_sol_types::private::AssertTypeEq::<
424 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
425 >(_) => {}
426 }
427 }
428 #[automatically_derived]
429 #[doc(hidden)]
430 impl ::core::convert::From<ledgerDomainSeparatorReturn>
431 for UnderlyingRustTuple<'_> {
432 fn from(value: ledgerDomainSeparatorReturn) -> Self {
433 (value._0,)
434 }
435 }
436 #[automatically_derived]
437 #[doc(hidden)]
438 impl ::core::convert::From<UnderlyingRustTuple<'_>>
439 for ledgerDomainSeparatorReturn {
440 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
441 Self { _0: tuple.0 }
442 }
443 }
444 }
445 #[automatically_derived]
446 impl alloy_sol_types::SolCall for ledgerDomainSeparatorCall {
447 type Parameters<'a> = ();
448 type Token<'a> = <Self::Parameters<
449 'a,
450 > as alloy_sol_types::SolType>::Token<'a>;
451 type Return = alloy::sol_types::private::FixedBytes<32>;
452 type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
453 type ReturnToken<'a> = <Self::ReturnTuple<
454 'a,
455 > as alloy_sol_types::SolType>::Token<'a>;
456 const SIGNATURE: &'static str = "ledgerDomainSeparator()";
457 const SELECTOR: [u8; 4] = [201u8, 102u8, 196u8, 254u8];
458 #[inline]
459 fn new<'a>(
460 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
461 ) -> Self {
462 tuple.into()
463 }
464 #[inline]
465 fn tokenize(&self) -> Self::Token<'_> {
466 ()
467 }
468 #[inline]
469 fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
470 (
471 <alloy::sol_types::sol_data::FixedBytes<
472 32,
473 > as alloy_sol_types::SolType>::tokenize(ret),
474 )
475 }
476 #[inline]
477 fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
478 <Self::ReturnTuple<
479 '_,
480 > as alloy_sol_types::SolType>::abi_decode_sequence(data)
481 .map(|r| {
482 let r: ledgerDomainSeparatorReturn = r.into();
483 r._0
484 })
485 }
486 #[inline]
487 fn abi_decode_returns_validate(
488 data: &[u8],
489 ) -> alloy_sol_types::Result<Self::Return> {
490 <Self::ReturnTuple<
491 '_,
492 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
493 .map(|r| {
494 let r: ledgerDomainSeparatorReturn = r.into();
495 r._0
496 })
497 }
498 }
499 };
500 #[derive(serde::Serialize, serde::Deserialize)]
501 #[derive(Default, Debug, PartialEq, Eq, Hash)]
502 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
507 #[derive(Clone)]
508 pub struct updateLedgerDomainSeparatorCall;
509 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
511 #[derive(Clone)]
512 pub struct updateLedgerDomainSeparatorReturn {}
513 #[allow(
514 non_camel_case_types,
515 non_snake_case,
516 clippy::pub_underscore_fields,
517 clippy::style
518 )]
519 const _: () = {
520 use alloy::sol_types as alloy_sol_types;
521 {
522 #[doc(hidden)]
523 type UnderlyingSolTuple<'a> = ();
524 #[doc(hidden)]
525 type UnderlyingRustTuple<'a> = ();
526 #[cfg(test)]
527 #[allow(dead_code, unreachable_patterns)]
528 fn _type_assertion(
529 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
530 ) {
531 match _t {
532 alloy_sol_types::private::AssertTypeEq::<
533 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
534 >(_) => {}
535 }
536 }
537 #[automatically_derived]
538 #[doc(hidden)]
539 impl ::core::convert::From<updateLedgerDomainSeparatorCall>
540 for UnderlyingRustTuple<'_> {
541 fn from(value: updateLedgerDomainSeparatorCall) -> Self {
542 ()
543 }
544 }
545 #[automatically_derived]
546 #[doc(hidden)]
547 impl ::core::convert::From<UnderlyingRustTuple<'_>>
548 for updateLedgerDomainSeparatorCall {
549 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
550 Self
551 }
552 }
553 }
554 {
555 #[doc(hidden)]
556 type UnderlyingSolTuple<'a> = ();
557 #[doc(hidden)]
558 type UnderlyingRustTuple<'a> = ();
559 #[cfg(test)]
560 #[allow(dead_code, unreachable_patterns)]
561 fn _type_assertion(
562 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
563 ) {
564 match _t {
565 alloy_sol_types::private::AssertTypeEq::<
566 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
567 >(_) => {}
568 }
569 }
570 #[automatically_derived]
571 #[doc(hidden)]
572 impl ::core::convert::From<updateLedgerDomainSeparatorReturn>
573 for UnderlyingRustTuple<'_> {
574 fn from(value: updateLedgerDomainSeparatorReturn) -> Self {
575 ()
576 }
577 }
578 #[automatically_derived]
579 #[doc(hidden)]
580 impl ::core::convert::From<UnderlyingRustTuple<'_>>
581 for updateLedgerDomainSeparatorReturn {
582 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
583 Self {}
584 }
585 }
586 }
587 impl updateLedgerDomainSeparatorReturn {
588 fn _tokenize(
589 &self,
590 ) -> <updateLedgerDomainSeparatorCall as alloy_sol_types::SolCall>::ReturnToken<
591 '_,
592 > {
593 ()
594 }
595 }
596 #[automatically_derived]
597 impl alloy_sol_types::SolCall for updateLedgerDomainSeparatorCall {
598 type Parameters<'a> = ();
599 type Token<'a> = <Self::Parameters<
600 'a,
601 > as alloy_sol_types::SolType>::Token<'a>;
602 type Return = updateLedgerDomainSeparatorReturn;
603 type ReturnTuple<'a> = ();
604 type ReturnToken<'a> = <Self::ReturnTuple<
605 'a,
606 > as alloy_sol_types::SolType>::Token<'a>;
607 const SIGNATURE: &'static str = "updateLedgerDomainSeparator()";
608 const SELECTOR: [u8; 4] = [220u8, 150u8, 253u8, 80u8];
609 #[inline]
610 fn new<'a>(
611 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
612 ) -> Self {
613 tuple.into()
614 }
615 #[inline]
616 fn tokenize(&self) -> Self::Token<'_> {
617 ()
618 }
619 #[inline]
620 fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
621 updateLedgerDomainSeparatorReturn::_tokenize(ret)
622 }
623 #[inline]
624 fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
625 <Self::ReturnTuple<
626 '_,
627 > as alloy_sol_types::SolType>::abi_decode_sequence(data)
628 .map(Into::into)
629 }
630 #[inline]
631 fn abi_decode_returns_validate(
632 data: &[u8],
633 ) -> alloy_sol_types::Result<Self::Return> {
634 <Self::ReturnTuple<
635 '_,
636 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
637 .map(Into::into)
638 }
639 }
640 };
641 #[derive(serde::Serialize, serde::Deserialize)]
643 #[derive()]
644 pub enum HoprLedgerCalls {
645 #[allow(missing_docs)]
646 LEDGER_VERSION(LEDGER_VERSIONCall),
647 #[allow(missing_docs)]
648 ledgerDomainSeparator(ledgerDomainSeparatorCall),
649 #[allow(missing_docs)]
650 updateLedgerDomainSeparator(updateLedgerDomainSeparatorCall),
651 }
652 #[automatically_derived]
653 impl HoprLedgerCalls {
654 pub const SELECTORS: &'static [[u8; 4usize]] = &[
661 [201u8, 102u8, 196u8, 254u8],
662 [220u8, 150u8, 253u8, 80u8],
663 [221u8, 173u8, 25u8, 2u8],
664 ];
665 }
666 #[automatically_derived]
667 impl alloy_sol_types::SolInterface for HoprLedgerCalls {
668 const NAME: &'static str = "HoprLedgerCalls";
669 const MIN_DATA_LENGTH: usize = 0usize;
670 const COUNT: usize = 3usize;
671 #[inline]
672 fn selector(&self) -> [u8; 4] {
673 match self {
674 Self::LEDGER_VERSION(_) => {
675 <LEDGER_VERSIONCall as alloy_sol_types::SolCall>::SELECTOR
676 }
677 Self::ledgerDomainSeparator(_) => {
678 <ledgerDomainSeparatorCall as alloy_sol_types::SolCall>::SELECTOR
679 }
680 Self::updateLedgerDomainSeparator(_) => {
681 <updateLedgerDomainSeparatorCall as alloy_sol_types::SolCall>::SELECTOR
682 }
683 }
684 }
685 #[inline]
686 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
687 Self::SELECTORS.get(i).copied()
688 }
689 #[inline]
690 fn valid_selector(selector: [u8; 4]) -> bool {
691 Self::SELECTORS.binary_search(&selector).is_ok()
692 }
693 #[inline]
694 #[allow(non_snake_case)]
695 fn abi_decode_raw(
696 selector: [u8; 4],
697 data: &[u8],
698 ) -> alloy_sol_types::Result<Self> {
699 static DECODE_SHIMS: &[fn(
700 &[u8],
701 ) -> alloy_sol_types::Result<HoprLedgerCalls>] = &[
702 {
703 fn ledgerDomainSeparator(
704 data: &[u8],
705 ) -> alloy_sol_types::Result<HoprLedgerCalls> {
706 <ledgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_decode_raw(
707 data,
708 )
709 .map(HoprLedgerCalls::ledgerDomainSeparator)
710 }
711 ledgerDomainSeparator
712 },
713 {
714 fn updateLedgerDomainSeparator(
715 data: &[u8],
716 ) -> alloy_sol_types::Result<HoprLedgerCalls> {
717 <updateLedgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_decode_raw(
718 data,
719 )
720 .map(HoprLedgerCalls::updateLedgerDomainSeparator)
721 }
722 updateLedgerDomainSeparator
723 },
724 {
725 fn LEDGER_VERSION(
726 data: &[u8],
727 ) -> alloy_sol_types::Result<HoprLedgerCalls> {
728 <LEDGER_VERSIONCall as alloy_sol_types::SolCall>::abi_decode_raw(
729 data,
730 )
731 .map(HoprLedgerCalls::LEDGER_VERSION)
732 }
733 LEDGER_VERSION
734 },
735 ];
736 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
737 return Err(
738 alloy_sol_types::Error::unknown_selector(
739 <Self as alloy_sol_types::SolInterface>::NAME,
740 selector,
741 ),
742 );
743 };
744 DECODE_SHIMS[idx](data)
745 }
746 #[inline]
747 #[allow(non_snake_case)]
748 fn abi_decode_raw_validate(
749 selector: [u8; 4],
750 data: &[u8],
751 ) -> alloy_sol_types::Result<Self> {
752 static DECODE_VALIDATE_SHIMS: &[fn(
753 &[u8],
754 ) -> alloy_sol_types::Result<HoprLedgerCalls>] = &[
755 {
756 fn ledgerDomainSeparator(
757 data: &[u8],
758 ) -> alloy_sol_types::Result<HoprLedgerCalls> {
759 <ledgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
760 data,
761 )
762 .map(HoprLedgerCalls::ledgerDomainSeparator)
763 }
764 ledgerDomainSeparator
765 },
766 {
767 fn updateLedgerDomainSeparator(
768 data: &[u8],
769 ) -> alloy_sol_types::Result<HoprLedgerCalls> {
770 <updateLedgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
771 data,
772 )
773 .map(HoprLedgerCalls::updateLedgerDomainSeparator)
774 }
775 updateLedgerDomainSeparator
776 },
777 {
778 fn LEDGER_VERSION(
779 data: &[u8],
780 ) -> alloy_sol_types::Result<HoprLedgerCalls> {
781 <LEDGER_VERSIONCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
782 data,
783 )
784 .map(HoprLedgerCalls::LEDGER_VERSION)
785 }
786 LEDGER_VERSION
787 },
788 ];
789 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
790 return Err(
791 alloy_sol_types::Error::unknown_selector(
792 <Self as alloy_sol_types::SolInterface>::NAME,
793 selector,
794 ),
795 );
796 };
797 DECODE_VALIDATE_SHIMS[idx](data)
798 }
799 #[inline]
800 fn abi_encoded_size(&self) -> usize {
801 match self {
802 Self::LEDGER_VERSION(inner) => {
803 <LEDGER_VERSIONCall as alloy_sol_types::SolCall>::abi_encoded_size(
804 inner,
805 )
806 }
807 Self::ledgerDomainSeparator(inner) => {
808 <ledgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_encoded_size(
809 inner,
810 )
811 }
812 Self::updateLedgerDomainSeparator(inner) => {
813 <updateLedgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_encoded_size(
814 inner,
815 )
816 }
817 }
818 }
819 #[inline]
820 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
821 match self {
822 Self::LEDGER_VERSION(inner) => {
823 <LEDGER_VERSIONCall as alloy_sol_types::SolCall>::abi_encode_raw(
824 inner,
825 out,
826 )
827 }
828 Self::ledgerDomainSeparator(inner) => {
829 <ledgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_encode_raw(
830 inner,
831 out,
832 )
833 }
834 Self::updateLedgerDomainSeparator(inner) => {
835 <updateLedgerDomainSeparatorCall as alloy_sol_types::SolCall>::abi_encode_raw(
836 inner,
837 out,
838 )
839 }
840 }
841 }
842 }
843 #[derive(serde::Serialize, serde::Deserialize)]
845 #[derive(Debug, PartialEq, Eq, Hash)]
846 pub enum HoprLedgerEvents {
847 #[allow(missing_docs)]
848 LedgerDomainSeparatorUpdated(LedgerDomainSeparatorUpdated),
849 }
850 #[automatically_derived]
851 impl HoprLedgerEvents {
852 pub const SELECTORS: &'static [[u8; 32usize]] = &[
859 [
860 164u8, 63u8, 173u8, 131u8, 146u8, 15u8, 208u8, 148u8, 69u8, 133u8, 94u8,
861 133u8, 78u8, 115u8, 201u8, 197u8, 50u8, 225u8, 116u8, 2u8, 201u8, 206u8,
862 176u8, 153u8, 147u8, 162u8, 57u8, 40u8, 67u8, 165u8, 189u8, 185u8,
863 ],
864 ];
865 }
866 #[automatically_derived]
867 impl alloy_sol_types::SolEventInterface for HoprLedgerEvents {
868 const NAME: &'static str = "HoprLedgerEvents";
869 const COUNT: usize = 1usize;
870 fn decode_raw_log(
871 topics: &[alloy_sol_types::Word],
872 data: &[u8],
873 ) -> alloy_sol_types::Result<Self> {
874 match topics.first().copied() {
875 Some(
876 <LedgerDomainSeparatorUpdated as alloy_sol_types::SolEvent>::SIGNATURE_HASH,
877 ) => {
878 <LedgerDomainSeparatorUpdated as alloy_sol_types::SolEvent>::decode_raw_log(
879 topics,
880 data,
881 )
882 .map(Self::LedgerDomainSeparatorUpdated)
883 }
884 _ => {
885 alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
886 name: <Self as alloy_sol_types::SolEventInterface>::NAME,
887 log: alloy_sol_types::private::Box::new(
888 alloy_sol_types::private::LogData::new_unchecked(
889 topics.to_vec(),
890 data.to_vec().into(),
891 ),
892 ),
893 })
894 }
895 }
896 }
897 }
898 #[automatically_derived]
899 impl alloy_sol_types::private::IntoLogData for HoprLedgerEvents {
900 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
901 match self {
902 Self::LedgerDomainSeparatorUpdated(inner) => {
903 alloy_sol_types::private::IntoLogData::to_log_data(inner)
904 }
905 }
906 }
907 fn into_log_data(self) -> alloy_sol_types::private::LogData {
908 match self {
909 Self::LedgerDomainSeparatorUpdated(inner) => {
910 alloy_sol_types::private::IntoLogData::into_log_data(inner)
911 }
912 }
913 }
914 }
915 use alloy::contract as alloy_contract;
916 #[inline]
920 pub const fn new<
921 P: alloy_contract::private::Provider<N>,
922 N: alloy_contract::private::Network,
923 >(
924 address: alloy_sol_types::private::Address,
925 provider: P,
926 ) -> HoprLedgerInstance<P, N> {
927 HoprLedgerInstance::<P, N>::new(address, provider)
928 }
929 #[inline]
935 pub fn deploy<
936 P: alloy_contract::private::Provider<N>,
937 N: alloy_contract::private::Network,
938 >(
939 provider: P,
940 ) -> impl ::core::future::Future<
941 Output = alloy_contract::Result<HoprLedgerInstance<P, N>>,
942 > {
943 HoprLedgerInstance::<P, N>::deploy(provider)
944 }
945 #[inline]
951 pub fn deploy_builder<
952 P: alloy_contract::private::Provider<N>,
953 N: alloy_contract::private::Network,
954 >(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
955 HoprLedgerInstance::<P, N>::deploy_builder(provider)
956 }
957 #[derive(Clone)]
969 pub struct HoprLedgerInstance<P, N = alloy_contract::private::Ethereum> {
970 address: alloy_sol_types::private::Address,
971 provider: P,
972 _network: ::core::marker::PhantomData<N>,
973 }
974 #[automatically_derived]
975 impl<P, N> ::core::fmt::Debug for HoprLedgerInstance<P, N> {
976 #[inline]
977 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
978 f.debug_tuple("HoprLedgerInstance").field(&self.address).finish()
979 }
980 }
981 #[automatically_derived]
983 impl<
984 P: alloy_contract::private::Provider<N>,
985 N: alloy_contract::private::Network,
986 > HoprLedgerInstance<P, N> {
987 #[inline]
991 pub const fn new(
992 address: alloy_sol_types::private::Address,
993 provider: P,
994 ) -> Self {
995 Self {
996 address,
997 provider,
998 _network: ::core::marker::PhantomData,
999 }
1000 }
1001 #[inline]
1007 pub async fn deploy(
1008 provider: P,
1009 ) -> alloy_contract::Result<HoprLedgerInstance<P, N>> {
1010 let call_builder = Self::deploy_builder(provider);
1011 let contract_address = call_builder.deploy().await?;
1012 Ok(Self::new(contract_address, call_builder.provider))
1013 }
1014 #[inline]
1020 pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
1021 alloy_contract::RawCallBuilder::new_raw_deploy(
1022 provider,
1023 ::core::clone::Clone::clone(&BYTECODE),
1024 )
1025 }
1026 #[inline]
1028 pub const fn address(&self) -> &alloy_sol_types::private::Address {
1029 &self.address
1030 }
1031 #[inline]
1033 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
1034 self.address = address;
1035 }
1036 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
1038 self.set_address(address);
1039 self
1040 }
1041 #[inline]
1043 pub const fn provider(&self) -> &P {
1044 &self.provider
1045 }
1046 }
1047 impl<P: ::core::clone::Clone, N> HoprLedgerInstance<&P, N> {
1048 #[inline]
1050 pub fn with_cloned_provider(self) -> HoprLedgerInstance<P, N> {
1051 HoprLedgerInstance {
1052 address: self.address,
1053 provider: ::core::clone::Clone::clone(&self.provider),
1054 _network: ::core::marker::PhantomData,
1055 }
1056 }
1057 }
1058 #[automatically_derived]
1060 impl<
1061 P: alloy_contract::private::Provider<N>,
1062 N: alloy_contract::private::Network,
1063 > HoprLedgerInstance<P, N> {
1064 pub fn call_builder<C: alloy_sol_types::SolCall>(
1069 &self,
1070 call: &C,
1071 ) -> alloy_contract::SolCallBuilder<&P, C, N> {
1072 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
1073 }
1074 pub fn LEDGER_VERSION(
1076 &self,
1077 ) -> alloy_contract::SolCallBuilder<&P, LEDGER_VERSIONCall, N> {
1078 self.call_builder(&LEDGER_VERSIONCall)
1079 }
1080 pub fn ledgerDomainSeparator(
1082 &self,
1083 ) -> alloy_contract::SolCallBuilder<&P, ledgerDomainSeparatorCall, N> {
1084 self.call_builder(&ledgerDomainSeparatorCall)
1085 }
1086 pub fn updateLedgerDomainSeparator(
1088 &self,
1089 ) -> alloy_contract::SolCallBuilder<&P, updateLedgerDomainSeparatorCall, N> {
1090 self.call_builder(&updateLedgerDomainSeparatorCall)
1091 }
1092 }
1093 #[automatically_derived]
1095 impl<
1096 P: alloy_contract::private::Provider<N>,
1097 N: alloy_contract::private::Network,
1098 > HoprLedgerInstance<P, N> {
1099 pub fn event_filter<E: alloy_sol_types::SolEvent>(
1104 &self,
1105 ) -> alloy_contract::Event<&P, E, N> {
1106 alloy_contract::Event::new_sol(&self.provider, &self.address)
1107 }
1108 pub fn LedgerDomainSeparatorUpdated_filter(
1110 &self,
1111 ) -> alloy_contract::Event<&P, LedgerDomainSeparatorUpdated, N> {
1112 self.event_filter::<LedgerDomainSeparatorUpdated>()
1113 }
1114 }
1115}