1#[allow(
42 non_camel_case_types,
43 non_snake_case,
44 clippy::pub_underscore_fields,
45 clippy::style,
46 clippy::empty_structs_with_brackets
47)]
48pub mod ContextUpgradeable {
49 use super::*;
50 use alloy::sol_types as alloy_sol_types;
51 #[rustfmt::skip]
57 #[allow(clippy::all)]
58 pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
59 b"",
60 );
61 #[rustfmt::skip]
67 #[allow(clippy::all)]
68 pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
69 b"",
70 );
71 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
76 #[derive(Clone)]
77 pub struct InvalidInitialization {}
78 #[allow(
79 non_camel_case_types,
80 non_snake_case,
81 clippy::pub_underscore_fields,
82 clippy::style
83 )]
84 const _: () = {
85 use alloy::sol_types as alloy_sol_types;
86 #[doc(hidden)]
87 type UnderlyingSolTuple<'a> = ();
88 #[doc(hidden)]
89 type UnderlyingRustTuple<'a> = ();
90 #[cfg(test)]
91 #[allow(dead_code, unreachable_patterns)]
92 fn _type_assertion(
93 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
94 ) {
95 match _t {
96 alloy_sol_types::private::AssertTypeEq::<
97 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
98 >(_) => {}
99 }
100 }
101 #[automatically_derived]
102 #[doc(hidden)]
103 impl ::core::convert::From<InvalidInitialization> for UnderlyingRustTuple<'_> {
104 fn from(value: InvalidInitialization) -> Self {
105 ()
106 }
107 }
108 #[automatically_derived]
109 #[doc(hidden)]
110 impl ::core::convert::From<UnderlyingRustTuple<'_>> for InvalidInitialization {
111 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
112 Self {}
113 }
114 }
115 #[automatically_derived]
116 impl alloy_sol_types::SolError for InvalidInitialization {
117 type Parameters<'a> = UnderlyingSolTuple<'a>;
118 type Token<'a> = <Self::Parameters<
119 'a,
120 > as alloy_sol_types::SolType>::Token<'a>;
121 const SIGNATURE: &'static str = "InvalidInitialization()";
122 const SELECTOR: [u8; 4] = [249u8, 46u8, 232u8, 169u8];
123 #[inline]
124 fn new<'a>(
125 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
126 ) -> Self {
127 tuple.into()
128 }
129 #[inline]
130 fn tokenize(&self) -> Self::Token<'_> {
131 ()
132 }
133 }
134 };
135 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
140 #[derive(Clone)]
141 pub struct NotInitializing {}
142 #[allow(
143 non_camel_case_types,
144 non_snake_case,
145 clippy::pub_underscore_fields,
146 clippy::style
147 )]
148 const _: () = {
149 use alloy::sol_types as alloy_sol_types;
150 #[doc(hidden)]
151 type UnderlyingSolTuple<'a> = ();
152 #[doc(hidden)]
153 type UnderlyingRustTuple<'a> = ();
154 #[cfg(test)]
155 #[allow(dead_code, unreachable_patterns)]
156 fn _type_assertion(
157 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
158 ) {
159 match _t {
160 alloy_sol_types::private::AssertTypeEq::<
161 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
162 >(_) => {}
163 }
164 }
165 #[automatically_derived]
166 #[doc(hidden)]
167 impl ::core::convert::From<NotInitializing> for UnderlyingRustTuple<'_> {
168 fn from(value: NotInitializing) -> Self {
169 ()
170 }
171 }
172 #[automatically_derived]
173 #[doc(hidden)]
174 impl ::core::convert::From<UnderlyingRustTuple<'_>> for NotInitializing {
175 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
176 Self {}
177 }
178 }
179 #[automatically_derived]
180 impl alloy_sol_types::SolError for NotInitializing {
181 type Parameters<'a> = UnderlyingSolTuple<'a>;
182 type Token<'a> = <Self::Parameters<
183 'a,
184 > as alloy_sol_types::SolType>::Token<'a>;
185 const SIGNATURE: &'static str = "NotInitializing()";
186 const SELECTOR: [u8; 4] = [215u8, 230u8, 188u8, 248u8];
187 #[inline]
188 fn new<'a>(
189 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
190 ) -> Self {
191 tuple.into()
192 }
193 #[inline]
194 fn tokenize(&self) -> Self::Token<'_> {
195 ()
196 }
197 }
198 };
199 #[allow(
204 non_camel_case_types,
205 non_snake_case,
206 clippy::pub_underscore_fields,
207 clippy::style
208 )]
209 #[derive(Clone)]
210 pub struct Initialized {
211 #[allow(missing_docs)]
212 pub version: u64,
213 }
214 #[allow(
215 non_camel_case_types,
216 non_snake_case,
217 clippy::pub_underscore_fields,
218 clippy::style
219 )]
220 const _: () = {
221 use alloy::sol_types as alloy_sol_types;
222 #[automatically_derived]
223 impl alloy_sol_types::SolEvent for Initialized {
224 type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<64>,);
225 type DataToken<'a> = <Self::DataTuple<
226 'a,
227 > as alloy_sol_types::SolType>::Token<'a>;
228 type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,);
229 const SIGNATURE: &'static str = "Initialized(uint64)";
230 const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
231 199u8,
232 245u8,
233 5u8,
234 178u8,
235 243u8,
236 113u8,
237 174u8,
238 33u8,
239 117u8,
240 238u8,
241 73u8,
242 19u8,
243 244u8,
244 73u8,
245 158u8,
246 31u8,
247 38u8,
248 51u8,
249 167u8,
250 181u8,
251 147u8,
252 99u8,
253 33u8,
254 238u8,
255 209u8,
256 205u8,
257 174u8,
258 182u8,
259 17u8,
260 81u8,
261 129u8,
262 210u8,
263 ]);
264 const ANONYMOUS: bool = false;
265 #[allow(unused_variables)]
266 #[inline]
267 fn new(
268 topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
269 data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
270 ) -> Self {
271 Self { version: data.0 }
272 }
273 #[inline]
274 fn check_signature(
275 topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
276 ) -> alloy_sol_types::Result<()> {
277 if topics.0 != Self::SIGNATURE_HASH {
278 return Err(
279 alloy_sol_types::Error::invalid_event_signature_hash(
280 Self::SIGNATURE,
281 topics.0,
282 Self::SIGNATURE_HASH,
283 ),
284 );
285 }
286 Ok(())
287 }
288 #[inline]
289 fn tokenize_body(&self) -> Self::DataToken<'_> {
290 (
291 <alloy::sol_types::sol_data::Uint<
292 64,
293 > as alloy_sol_types::SolType>::tokenize(&self.version),
294 )
295 }
296 #[inline]
297 fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
298 (Self::SIGNATURE_HASH.into(),)
299 }
300 #[inline]
301 fn encode_topics_raw(
302 &self,
303 out: &mut [alloy_sol_types::abi::token::WordToken],
304 ) -> alloy_sol_types::Result<()> {
305 if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
306 return Err(alloy_sol_types::Error::Overrun);
307 }
308 out[0usize] = alloy_sol_types::abi::token::WordToken(
309 Self::SIGNATURE_HASH,
310 );
311 Ok(())
312 }
313 }
314 #[automatically_derived]
315 impl alloy_sol_types::private::IntoLogData for Initialized {
316 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
317 From::from(self)
318 }
319 fn into_log_data(self) -> alloy_sol_types::private::LogData {
320 From::from(&self)
321 }
322 }
323 #[automatically_derived]
324 impl From<&Initialized> for alloy_sol_types::private::LogData {
325 #[inline]
326 fn from(this: &Initialized) -> alloy_sol_types::private::LogData {
327 alloy_sol_types::SolEvent::encode_log_data(this)
328 }
329 }
330 };
331 pub enum ContextUpgradeableErrors {
333 #[allow(missing_docs)]
334 InvalidInitialization(InvalidInitialization),
335 #[allow(missing_docs)]
336 NotInitializing(NotInitializing),
337 }
338 #[automatically_derived]
339 impl ContextUpgradeableErrors {
340 pub const SELECTORS: &'static [[u8; 4usize]] = &[
347 [215u8, 230u8, 188u8, 248u8],
348 [249u8, 46u8, 232u8, 169u8],
349 ];
350 }
351 #[automatically_derived]
352 impl alloy_sol_types::SolInterface for ContextUpgradeableErrors {
353 const NAME: &'static str = "ContextUpgradeableErrors";
354 const MIN_DATA_LENGTH: usize = 0usize;
355 const COUNT: usize = 2usize;
356 #[inline]
357 fn selector(&self) -> [u8; 4] {
358 match self {
359 Self::InvalidInitialization(_) => {
360 <InvalidInitialization as alloy_sol_types::SolError>::SELECTOR
361 }
362 Self::NotInitializing(_) => {
363 <NotInitializing as alloy_sol_types::SolError>::SELECTOR
364 }
365 }
366 }
367 #[inline]
368 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
369 Self::SELECTORS.get(i).copied()
370 }
371 #[inline]
372 fn valid_selector(selector: [u8; 4]) -> bool {
373 Self::SELECTORS.binary_search(&selector).is_ok()
374 }
375 #[inline]
376 #[allow(non_snake_case)]
377 fn abi_decode_raw(
378 selector: [u8; 4],
379 data: &[u8],
380 validate: bool,
381 ) -> alloy_sol_types::Result<Self> {
382 static DECODE_SHIMS: &[fn(
383 &[u8],
384 bool,
385 ) -> alloy_sol_types::Result<ContextUpgradeableErrors>] = &[
386 {
387 fn NotInitializing(
388 data: &[u8],
389 validate: bool,
390 ) -> alloy_sol_types::Result<ContextUpgradeableErrors> {
391 <NotInitializing as alloy_sol_types::SolError>::abi_decode_raw(
392 data,
393 validate,
394 )
395 .map(ContextUpgradeableErrors::NotInitializing)
396 }
397 NotInitializing
398 },
399 {
400 fn InvalidInitialization(
401 data: &[u8],
402 validate: bool,
403 ) -> alloy_sol_types::Result<ContextUpgradeableErrors> {
404 <InvalidInitialization as alloy_sol_types::SolError>::abi_decode_raw(
405 data,
406 validate,
407 )
408 .map(ContextUpgradeableErrors::InvalidInitialization)
409 }
410 InvalidInitialization
411 },
412 ];
413 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
414 return Err(
415 alloy_sol_types::Error::unknown_selector(
416 <Self as alloy_sol_types::SolInterface>::NAME,
417 selector,
418 ),
419 );
420 };
421 DECODE_SHIMS[idx](data, validate)
422 }
423 #[inline]
424 fn abi_encoded_size(&self) -> usize {
425 match self {
426 Self::InvalidInitialization(inner) => {
427 <InvalidInitialization as alloy_sol_types::SolError>::abi_encoded_size(
428 inner,
429 )
430 }
431 Self::NotInitializing(inner) => {
432 <NotInitializing as alloy_sol_types::SolError>::abi_encoded_size(
433 inner,
434 )
435 }
436 }
437 }
438 #[inline]
439 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
440 match self {
441 Self::InvalidInitialization(inner) => {
442 <InvalidInitialization as alloy_sol_types::SolError>::abi_encode_raw(
443 inner,
444 out,
445 )
446 }
447 Self::NotInitializing(inner) => {
448 <NotInitializing as alloy_sol_types::SolError>::abi_encode_raw(
449 inner,
450 out,
451 )
452 }
453 }
454 }
455 }
456 pub enum ContextUpgradeableEvents {
458 #[allow(missing_docs)]
459 Initialized(Initialized),
460 }
461 #[automatically_derived]
462 impl ContextUpgradeableEvents {
463 pub const SELECTORS: &'static [[u8; 32usize]] = &[
470 [
471 199u8,
472 245u8,
473 5u8,
474 178u8,
475 243u8,
476 113u8,
477 174u8,
478 33u8,
479 117u8,
480 238u8,
481 73u8,
482 19u8,
483 244u8,
484 73u8,
485 158u8,
486 31u8,
487 38u8,
488 51u8,
489 167u8,
490 181u8,
491 147u8,
492 99u8,
493 33u8,
494 238u8,
495 209u8,
496 205u8,
497 174u8,
498 182u8,
499 17u8,
500 81u8,
501 129u8,
502 210u8,
503 ],
504 ];
505 }
506 #[automatically_derived]
507 impl alloy_sol_types::SolEventInterface for ContextUpgradeableEvents {
508 const NAME: &'static str = "ContextUpgradeableEvents";
509 const COUNT: usize = 1usize;
510 fn decode_raw_log(
511 topics: &[alloy_sol_types::Word],
512 data: &[u8],
513 validate: bool,
514 ) -> alloy_sol_types::Result<Self> {
515 match topics.first().copied() {
516 Some(<Initialized as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
517 <Initialized as alloy_sol_types::SolEvent>::decode_raw_log(
518 topics,
519 data,
520 validate,
521 )
522 .map(Self::Initialized)
523 }
524 _ => {
525 alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
526 name: <Self as alloy_sol_types::SolEventInterface>::NAME,
527 log: alloy_sol_types::private::Box::new(
528 alloy_sol_types::private::LogData::new_unchecked(
529 topics.to_vec(),
530 data.to_vec().into(),
531 ),
532 ),
533 })
534 }
535 }
536 }
537 }
538 #[automatically_derived]
539 impl alloy_sol_types::private::IntoLogData for ContextUpgradeableEvents {
540 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
541 match self {
542 Self::Initialized(inner) => {
543 alloy_sol_types::private::IntoLogData::to_log_data(inner)
544 }
545 }
546 }
547 fn into_log_data(self) -> alloy_sol_types::private::LogData {
548 match self {
549 Self::Initialized(inner) => {
550 alloy_sol_types::private::IntoLogData::into_log_data(inner)
551 }
552 }
553 }
554 }
555 use alloy::contract as alloy_contract;
556 #[inline]
560 pub const fn new<
561 T: alloy_contract::private::Transport + ::core::clone::Clone,
562 P: alloy_contract::private::Provider<T, N>,
563 N: alloy_contract::private::Network,
564 >(
565 address: alloy_sol_types::private::Address,
566 provider: P,
567 ) -> ContextUpgradeableInstance<T, P, N> {
568 ContextUpgradeableInstance::<T, P, N>::new(address, provider)
569 }
570 #[inline]
576 pub fn deploy<
577 T: alloy_contract::private::Transport + ::core::clone::Clone,
578 P: alloy_contract::private::Provider<T, N>,
579 N: alloy_contract::private::Network,
580 >(
581 provider: P,
582 ) -> impl ::core::future::Future<
583 Output = alloy_contract::Result<ContextUpgradeableInstance<T, P, N>>,
584 > {
585 ContextUpgradeableInstance::<T, P, N>::deploy(provider)
586 }
587 #[inline]
593 pub fn deploy_builder<
594 T: alloy_contract::private::Transport + ::core::clone::Clone,
595 P: alloy_contract::private::Provider<T, N>,
596 N: alloy_contract::private::Network,
597 >(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
598 ContextUpgradeableInstance::<T, P, N>::deploy_builder(provider)
599 }
600 #[derive(Clone)]
612 pub struct ContextUpgradeableInstance<T, P, N = alloy_contract::private::Ethereum> {
613 address: alloy_sol_types::private::Address,
614 provider: P,
615 _network_transport: ::core::marker::PhantomData<(N, T)>,
616 }
617 #[automatically_derived]
618 impl<T, P, N> ::core::fmt::Debug for ContextUpgradeableInstance<T, P, N> {
619 #[inline]
620 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
621 f.debug_tuple("ContextUpgradeableInstance").field(&self.address).finish()
622 }
623 }
624 #[automatically_derived]
626 impl<
627 T: alloy_contract::private::Transport + ::core::clone::Clone,
628 P: alloy_contract::private::Provider<T, N>,
629 N: alloy_contract::private::Network,
630 > ContextUpgradeableInstance<T, P, N> {
631 #[inline]
635 pub const fn new(
636 address: alloy_sol_types::private::Address,
637 provider: P,
638 ) -> Self {
639 Self {
640 address,
641 provider,
642 _network_transport: ::core::marker::PhantomData,
643 }
644 }
645 #[inline]
651 pub async fn deploy(
652 provider: P,
653 ) -> alloy_contract::Result<ContextUpgradeableInstance<T, P, N>> {
654 let call_builder = Self::deploy_builder(provider);
655 let contract_address = call_builder.deploy().await?;
656 Ok(Self::new(contract_address, call_builder.provider))
657 }
658 #[inline]
664 pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
665 alloy_contract::RawCallBuilder::new_raw_deploy(
666 provider,
667 ::core::clone::Clone::clone(&BYTECODE),
668 )
669 }
670 #[inline]
672 pub const fn address(&self) -> &alloy_sol_types::private::Address {
673 &self.address
674 }
675 #[inline]
677 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
678 self.address = address;
679 }
680 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
682 self.set_address(address);
683 self
684 }
685 #[inline]
687 pub const fn provider(&self) -> &P {
688 &self.provider
689 }
690 }
691 impl<T, P: ::core::clone::Clone, N> ContextUpgradeableInstance<T, &P, N> {
692 #[inline]
694 pub fn with_cloned_provider(self) -> ContextUpgradeableInstance<T, P, N> {
695 ContextUpgradeableInstance {
696 address: self.address,
697 provider: ::core::clone::Clone::clone(&self.provider),
698 _network_transport: ::core::marker::PhantomData,
699 }
700 }
701 }
702 #[automatically_derived]
704 impl<
705 T: alloy_contract::private::Transport + ::core::clone::Clone,
706 P: alloy_contract::private::Provider<T, N>,
707 N: alloy_contract::private::Network,
708 > ContextUpgradeableInstance<T, P, N> {
709 pub fn call_builder<C: alloy_sol_types::SolCall>(
714 &self,
715 call: &C,
716 ) -> alloy_contract::SolCallBuilder<T, &P, C, N> {
717 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
718 }
719 }
720 #[automatically_derived]
722 impl<
723 T: alloy_contract::private::Transport + ::core::clone::Clone,
724 P: alloy_contract::private::Provider<T, N>,
725 N: alloy_contract::private::Network,
726 > ContextUpgradeableInstance<T, P, N> {
727 pub fn event_filter<E: alloy_sol_types::SolEvent>(
732 &self,
733 ) -> alloy_contract::Event<T, &P, E, N> {
734 alloy_contract::Event::new_sol(&self.provider, &self.address)
735 }
736 pub fn Initialized_filter(
738 &self,
739 ) -> alloy_contract::Event<T, &P, Initialized, N> {
740 self.event_filter::<Initialized>()
741 }
742 }
743}