1#[allow(
90 non_camel_case_types,
91 non_snake_case,
92 clippy::pub_underscore_fields,
93 clippy::style,
94 clippy::empty_structs_with_brackets
95)]
96pub mod ERC1967Proxy {
97 use super::*;
98 use alloy::sol_types as alloy_sol_types;
99 #[rustfmt::skip]
105 #[allow(clippy::all)]
106 pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
107 b"`\x80`@R`@Qa\x03\xA78\x03\x80a\x03\xA7\x839\x81\x01`@\x81\x90Ra\0\"\x91a\x02<V[a\0,\x82\x82a\x003V[PPa\x03!V[a\0<\x82a\0\x91V[`@Q`\x01`\x01`\xA0\x1B\x03\x83\x16\x90\x7F\xBC|\xD7Z \xEE'\xFD\x9A\xDE\xBA\xB3 A\xF7U!M\xBCk\xFF\xA9\x0C\xC0\"[9\xDA.\\-;\x90_\x90\xA2\x80Q\x15a\0\x85Wa\0\x80\x82\x82a\x01\x0CV[PPPV[a\0\x8Da\x01\x7FV[PPV[\x80`\x01`\x01`\xA0\x1B\x03\x16;_\x03a\0\xCBW`@QcL\x9C\x8C\xE3`\xE0\x1B\x81R`\x01`\x01`\xA0\x1B\x03\x82\x16`\x04\x82\x01R`$\x01[`@Q\x80\x91\x03\x90\xFD[\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBC\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x92\x90\x92\x16\x91\x90\x91\x17\x90UV[``__\x84`\x01`\x01`\xA0\x1B\x03\x16\x84`@Qa\x01(\x91\x90a\x03\x0BV[_`@Q\x80\x83\x03\x81\x85Z\xF4\x91PP=\x80_\x81\x14a\x01`W`@Q\x91P`\x1F\x19`?=\x01\x16\x82\x01`@R=\x82R=_` \x84\x01>a\x01eV[``\x91P[P\x90\x92P\x90Pa\x01v\x85\x83\x83a\x01\xA0V[\x95\x94PPPPPV[4\x15a\x01\x9EW`@Qc\xB3\x98\x97\x9F`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[V[``\x82a\x01\xB5Wa\x01\xB0\x82a\x01\xFFV[a\x01\xF8V[\x81Q\x15\x80\x15a\x01\xCCWP`\x01`\x01`\xA0\x1B\x03\x84\x16;\x15[\x15a\x01\xF5W`@Qc\x99\x96\xB3\x15`\xE0\x1B\x81R`\x01`\x01`\xA0\x1B\x03\x85\x16`\x04\x82\x01R`$\x01a\0\xC2V[P\x80[\x93\x92PPPV[\x80Q\x15a\x02\x0FW\x80Q\x80\x82` \x01\xFD[`@Qc\n\x12\xF5!`\xE1\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[__`@\x83\x85\x03\x12\x15a\x02MW__\xFD[\x82Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x02cW__\xFD[` \x84\x01Q\x90\x92P`\x01`\x01`@\x1B\x03\x81\x11\x15a\x02~W__\xFD[\x83\x01`\x1F\x81\x01\x85\x13a\x02\x8EW__\xFD[\x80Q`\x01`\x01`@\x1B\x03\x81\x11\x15a\x02\xA7Wa\x02\xA7a\x02(V[`@Q`\x1F\x82\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17\x15a\x02\xD5Wa\x02\xD5a\x02(V[`@R\x81\x81R\x82\x82\x01` \x01\x87\x10\x15a\x02\xECW__\xFD[\x81` \x84\x01` \x83\x01^_` \x83\x83\x01\x01R\x80\x93PPPP\x92P\x92\x90PV[_\x82Q\x80` \x85\x01\x84^_\x92\x01\x91\x82RP\x91\x90PV[`z\x80a\x03-_9_\xF3\xFE`\x80`@R`\n`\x0CV[\0[`\x18`\x14`\x1AV[`PV[V[_`K\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBCT`\x01`\x01`\xA0\x1B\x03\x16\x90V[\x90P\x90V[6__7__6_\x84Z\xF4=__>\x80\x80\x15`iW=_\xF3[=_\xFD\xFE\xA1dsolcC\0\x08\x1C\0\n",
108 );
109 #[rustfmt::skip]
115 #[allow(clippy::all)]
116 pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
117 b"`\x80`@R`\n`\x0CV[\0[`\x18`\x14`\x1AV[`PV[V[_`K\x7F6\x08\x94\xA1;\xA1\xA3!\x06g\xC8(I-\xB9\x8D\xCA> v\xCC75\xA9 \xA3\xCAP]8+\xBCT`\x01`\x01`\xA0\x1B\x03\x16\x90V[\x90P\x90V[6__7__6_\x84Z\xF4=__>\x80\x80\x15`iW=_\xF3[=_\xFD\xFE\xA1dsolcC\0\x08\x1C\0\n",
118 );
119 #[derive(Default, Debug, PartialEq, Eq, Hash)]
120 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
125 #[derive(Clone)]
126 pub struct AddressEmptyCode {
127 #[allow(missing_docs)]
128 pub target: alloy::sol_types::private::Address,
129 }
130 #[allow(
131 non_camel_case_types,
132 non_snake_case,
133 clippy::pub_underscore_fields,
134 clippy::style
135 )]
136 const _: () = {
137 use alloy::sol_types as alloy_sol_types;
138 #[doc(hidden)]
139 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
140 #[doc(hidden)]
141 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
142 #[cfg(test)]
143 #[allow(dead_code, unreachable_patterns)]
144 fn _type_assertion(
145 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
146 ) {
147 match _t {
148 alloy_sol_types::private::AssertTypeEq::<
149 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
150 >(_) => {}
151 }
152 }
153 #[automatically_derived]
154 #[doc(hidden)]
155 impl ::core::convert::From<AddressEmptyCode> for UnderlyingRustTuple<'_> {
156 fn from(value: AddressEmptyCode) -> Self {
157 (value.target,)
158 }
159 }
160 #[automatically_derived]
161 #[doc(hidden)]
162 impl ::core::convert::From<UnderlyingRustTuple<'_>> for AddressEmptyCode {
163 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
164 Self { target: tuple.0 }
165 }
166 }
167 #[automatically_derived]
168 impl alloy_sol_types::SolError for AddressEmptyCode {
169 type Parameters<'a> = UnderlyingSolTuple<'a>;
170 type Token<'a> = <Self::Parameters<
171 'a,
172 > as alloy_sol_types::SolType>::Token<'a>;
173 const SIGNATURE: &'static str = "AddressEmptyCode(address)";
174 const SELECTOR: [u8; 4] = [153u8, 150u8, 179u8, 21u8];
175 #[inline]
176 fn new<'a>(
177 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
178 ) -> Self {
179 tuple.into()
180 }
181 #[inline]
182 fn tokenize(&self) -> Self::Token<'_> {
183 (
184 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
185 &self.target,
186 ),
187 )
188 }
189 }
190 };
191 #[derive(Default, Debug, PartialEq, Eq, Hash)]
192 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
197 #[derive(Clone)]
198 pub struct ERC1967InvalidImplementation {
199 #[allow(missing_docs)]
200 pub implementation: alloy::sol_types::private::Address,
201 }
202 #[allow(
203 non_camel_case_types,
204 non_snake_case,
205 clippy::pub_underscore_fields,
206 clippy::style
207 )]
208 const _: () = {
209 use alloy::sol_types as alloy_sol_types;
210 #[doc(hidden)]
211 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
212 #[doc(hidden)]
213 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
214 #[cfg(test)]
215 #[allow(dead_code, unreachable_patterns)]
216 fn _type_assertion(
217 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
218 ) {
219 match _t {
220 alloy_sol_types::private::AssertTypeEq::<
221 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
222 >(_) => {}
223 }
224 }
225 #[automatically_derived]
226 #[doc(hidden)]
227 impl ::core::convert::From<ERC1967InvalidImplementation>
228 for UnderlyingRustTuple<'_> {
229 fn from(value: ERC1967InvalidImplementation) -> Self {
230 (value.implementation,)
231 }
232 }
233 #[automatically_derived]
234 #[doc(hidden)]
235 impl ::core::convert::From<UnderlyingRustTuple<'_>>
236 for ERC1967InvalidImplementation {
237 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
238 Self { implementation: tuple.0 }
239 }
240 }
241 #[automatically_derived]
242 impl alloy_sol_types::SolError for ERC1967InvalidImplementation {
243 type Parameters<'a> = UnderlyingSolTuple<'a>;
244 type Token<'a> = <Self::Parameters<
245 'a,
246 > as alloy_sol_types::SolType>::Token<'a>;
247 const SIGNATURE: &'static str = "ERC1967InvalidImplementation(address)";
248 const SELECTOR: [u8; 4] = [76u8, 156u8, 140u8, 227u8];
249 #[inline]
250 fn new<'a>(
251 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
252 ) -> Self {
253 tuple.into()
254 }
255 #[inline]
256 fn tokenize(&self) -> Self::Token<'_> {
257 (
258 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
259 &self.implementation,
260 ),
261 )
262 }
263 }
264 };
265 #[derive(Default, Debug, PartialEq, Eq, Hash)]
266 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
271 #[derive(Clone)]
272 pub struct ERC1967NonPayable {}
273 #[allow(
274 non_camel_case_types,
275 non_snake_case,
276 clippy::pub_underscore_fields,
277 clippy::style
278 )]
279 const _: () = {
280 use alloy::sol_types as alloy_sol_types;
281 #[doc(hidden)]
282 type UnderlyingSolTuple<'a> = ();
283 #[doc(hidden)]
284 type UnderlyingRustTuple<'a> = ();
285 #[cfg(test)]
286 #[allow(dead_code, unreachable_patterns)]
287 fn _type_assertion(
288 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
289 ) {
290 match _t {
291 alloy_sol_types::private::AssertTypeEq::<
292 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
293 >(_) => {}
294 }
295 }
296 #[automatically_derived]
297 #[doc(hidden)]
298 impl ::core::convert::From<ERC1967NonPayable> for UnderlyingRustTuple<'_> {
299 fn from(value: ERC1967NonPayable) -> Self {
300 ()
301 }
302 }
303 #[automatically_derived]
304 #[doc(hidden)]
305 impl ::core::convert::From<UnderlyingRustTuple<'_>> for ERC1967NonPayable {
306 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
307 Self {}
308 }
309 }
310 #[automatically_derived]
311 impl alloy_sol_types::SolError for ERC1967NonPayable {
312 type Parameters<'a> = UnderlyingSolTuple<'a>;
313 type Token<'a> = <Self::Parameters<
314 'a,
315 > as alloy_sol_types::SolType>::Token<'a>;
316 const SIGNATURE: &'static str = "ERC1967NonPayable()";
317 const SELECTOR: [u8; 4] = [179u8, 152u8, 151u8, 159u8];
318 #[inline]
319 fn new<'a>(
320 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
321 ) -> Self {
322 tuple.into()
323 }
324 #[inline]
325 fn tokenize(&self) -> Self::Token<'_> {
326 ()
327 }
328 }
329 };
330 #[derive(Default, Debug, PartialEq, Eq, Hash)]
331 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
336 #[derive(Clone)]
337 pub struct FailedInnerCall {}
338 #[allow(
339 non_camel_case_types,
340 non_snake_case,
341 clippy::pub_underscore_fields,
342 clippy::style
343 )]
344 const _: () = {
345 use alloy::sol_types as alloy_sol_types;
346 #[doc(hidden)]
347 type UnderlyingSolTuple<'a> = ();
348 #[doc(hidden)]
349 type UnderlyingRustTuple<'a> = ();
350 #[cfg(test)]
351 #[allow(dead_code, unreachable_patterns)]
352 fn _type_assertion(
353 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
354 ) {
355 match _t {
356 alloy_sol_types::private::AssertTypeEq::<
357 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
358 >(_) => {}
359 }
360 }
361 #[automatically_derived]
362 #[doc(hidden)]
363 impl ::core::convert::From<FailedInnerCall> for UnderlyingRustTuple<'_> {
364 fn from(value: FailedInnerCall) -> Self {
365 ()
366 }
367 }
368 #[automatically_derived]
369 #[doc(hidden)]
370 impl ::core::convert::From<UnderlyingRustTuple<'_>> for FailedInnerCall {
371 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
372 Self {}
373 }
374 }
375 #[automatically_derived]
376 impl alloy_sol_types::SolError for FailedInnerCall {
377 type Parameters<'a> = UnderlyingSolTuple<'a>;
378 type Token<'a> = <Self::Parameters<
379 'a,
380 > as alloy_sol_types::SolType>::Token<'a>;
381 const SIGNATURE: &'static str = "FailedInnerCall()";
382 const SELECTOR: [u8; 4] = [20u8, 37u8, 234u8, 66u8];
383 #[inline]
384 fn new<'a>(
385 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
386 ) -> Self {
387 tuple.into()
388 }
389 #[inline]
390 fn tokenize(&self) -> Self::Token<'_> {
391 ()
392 }
393 }
394 };
395 #[derive(Default, Debug, PartialEq, Eq, Hash)]
396 #[allow(
401 non_camel_case_types,
402 non_snake_case,
403 clippy::pub_underscore_fields,
404 clippy::style
405 )]
406 #[derive(Clone)]
407 pub struct Upgraded {
408 #[allow(missing_docs)]
409 pub implementation: alloy::sol_types::private::Address,
410 }
411 #[allow(
412 non_camel_case_types,
413 non_snake_case,
414 clippy::pub_underscore_fields,
415 clippy::style
416 )]
417 const _: () = {
418 use alloy::sol_types as alloy_sol_types;
419 #[automatically_derived]
420 impl alloy_sol_types::SolEvent for Upgraded {
421 type DataTuple<'a> = ();
422 type DataToken<'a> = <Self::DataTuple<
423 'a,
424 > as alloy_sol_types::SolType>::Token<'a>;
425 type TopicList = (
426 alloy_sol_types::sol_data::FixedBytes<32>,
427 alloy::sol_types::sol_data::Address,
428 );
429 const SIGNATURE: &'static str = "Upgraded(address)";
430 const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
431 188u8, 124u8, 215u8, 90u8, 32u8, 238u8, 39u8, 253u8, 154u8, 222u8, 186u8,
432 179u8, 32u8, 65u8, 247u8, 85u8, 33u8, 77u8, 188u8, 107u8, 255u8, 169u8,
433 12u8, 192u8, 34u8, 91u8, 57u8, 218u8, 46u8, 92u8, 45u8, 59u8,
434 ]);
435 const ANONYMOUS: bool = false;
436 #[allow(unused_variables)]
437 #[inline]
438 fn new(
439 topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
440 data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
441 ) -> Self {
442 Self { implementation: topics.1 }
443 }
444 #[inline]
445 fn check_signature(
446 topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
447 ) -> alloy_sol_types::Result<()> {
448 if topics.0 != Self::SIGNATURE_HASH {
449 return Err(
450 alloy_sol_types::Error::invalid_event_signature_hash(
451 Self::SIGNATURE,
452 topics.0,
453 Self::SIGNATURE_HASH,
454 ),
455 );
456 }
457 Ok(())
458 }
459 #[inline]
460 fn tokenize_body(&self) -> Self::DataToken<'_> {
461 ()
462 }
463 #[inline]
464 fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
465 (Self::SIGNATURE_HASH.into(), self.implementation.clone())
466 }
467 #[inline]
468 fn encode_topics_raw(
469 &self,
470 out: &mut [alloy_sol_types::abi::token::WordToken],
471 ) -> alloy_sol_types::Result<()> {
472 if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
473 return Err(alloy_sol_types::Error::Overrun);
474 }
475 out[0usize] = alloy_sol_types::abi::token::WordToken(
476 Self::SIGNATURE_HASH,
477 );
478 out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
479 &self.implementation,
480 );
481 Ok(())
482 }
483 }
484 #[automatically_derived]
485 impl alloy_sol_types::private::IntoLogData for Upgraded {
486 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
487 From::from(self)
488 }
489 fn into_log_data(self) -> alloy_sol_types::private::LogData {
490 From::from(&self)
491 }
492 }
493 #[automatically_derived]
494 impl From<&Upgraded> for alloy_sol_types::private::LogData {
495 #[inline]
496 fn from(this: &Upgraded) -> alloy_sol_types::private::LogData {
497 alloy_sol_types::SolEvent::encode_log_data(this)
498 }
499 }
500 };
501 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
506 #[derive(Clone)]
507 pub struct constructorCall {
508 #[allow(missing_docs)]
509 pub implementation: alloy::sol_types::private::Address,
510 #[allow(missing_docs)]
511 pub _data: alloy::sol_types::private::Bytes,
512 }
513 const _: () = {
514 use alloy::sol_types as alloy_sol_types;
515 {
516 #[doc(hidden)]
517 type UnderlyingSolTuple<'a> = (
518 alloy::sol_types::sol_data::Address,
519 alloy::sol_types::sol_data::Bytes,
520 );
521 #[doc(hidden)]
522 type UnderlyingRustTuple<'a> = (
523 alloy::sol_types::private::Address,
524 alloy::sol_types::private::Bytes,
525 );
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<constructorCall> for UnderlyingRustTuple<'_> {
540 fn from(value: constructorCall) -> Self {
541 (value.implementation, value._data)
542 }
543 }
544 #[automatically_derived]
545 #[doc(hidden)]
546 impl ::core::convert::From<UnderlyingRustTuple<'_>> for constructorCall {
547 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
548 Self {
549 implementation: tuple.0,
550 _data: tuple.1,
551 }
552 }
553 }
554 }
555 #[automatically_derived]
556 impl alloy_sol_types::SolConstructor for constructorCall {
557 type Parameters<'a> = (
558 alloy::sol_types::sol_data::Address,
559 alloy::sol_types::sol_data::Bytes,
560 );
561 type Token<'a> = <Self::Parameters<
562 'a,
563 > as alloy_sol_types::SolType>::Token<'a>;
564 #[inline]
565 fn new<'a>(
566 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
567 ) -> Self {
568 tuple.into()
569 }
570 #[inline]
571 fn tokenize(&self) -> Self::Token<'_> {
572 (
573 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
574 &self.implementation,
575 ),
576 <alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
577 &self._data,
578 ),
579 )
580 }
581 }
582 };
583 #[derive(Debug, PartialEq, Eq, Hash)]
585 pub enum ERC1967ProxyErrors {
586 #[allow(missing_docs)]
587 AddressEmptyCode(AddressEmptyCode),
588 #[allow(missing_docs)]
589 ERC1967InvalidImplementation(ERC1967InvalidImplementation),
590 #[allow(missing_docs)]
591 ERC1967NonPayable(ERC1967NonPayable),
592 #[allow(missing_docs)]
593 FailedInnerCall(FailedInnerCall),
594 }
595 #[automatically_derived]
596 impl ERC1967ProxyErrors {
597 pub const SELECTORS: &'static [[u8; 4usize]] = &[
604 [20u8, 37u8, 234u8, 66u8],
605 [76u8, 156u8, 140u8, 227u8],
606 [153u8, 150u8, 179u8, 21u8],
607 [179u8, 152u8, 151u8, 159u8],
608 ];
609 }
610 #[automatically_derived]
611 impl alloy_sol_types::SolInterface for ERC1967ProxyErrors {
612 const NAME: &'static str = "ERC1967ProxyErrors";
613 const MIN_DATA_LENGTH: usize = 0usize;
614 const COUNT: usize = 4usize;
615 #[inline]
616 fn selector(&self) -> [u8; 4] {
617 match self {
618 Self::AddressEmptyCode(_) => {
619 <AddressEmptyCode as alloy_sol_types::SolError>::SELECTOR
620 }
621 Self::ERC1967InvalidImplementation(_) => {
622 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::SELECTOR
623 }
624 Self::ERC1967NonPayable(_) => {
625 <ERC1967NonPayable as alloy_sol_types::SolError>::SELECTOR
626 }
627 Self::FailedInnerCall(_) => {
628 <FailedInnerCall as alloy_sol_types::SolError>::SELECTOR
629 }
630 }
631 }
632 #[inline]
633 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
634 Self::SELECTORS.get(i).copied()
635 }
636 #[inline]
637 fn valid_selector(selector: [u8; 4]) -> bool {
638 Self::SELECTORS.binary_search(&selector).is_ok()
639 }
640 #[inline]
641 #[allow(non_snake_case)]
642 fn abi_decode_raw(
643 selector: [u8; 4],
644 data: &[u8],
645 validate: bool,
646 ) -> alloy_sol_types::Result<Self> {
647 static DECODE_SHIMS: &[fn(
648 &[u8],
649 bool,
650 ) -> alloy_sol_types::Result<ERC1967ProxyErrors>] = &[
651 {
652 fn FailedInnerCall(
653 data: &[u8],
654 validate: bool,
655 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
656 <FailedInnerCall as alloy_sol_types::SolError>::abi_decode_raw(
657 data,
658 validate,
659 )
660 .map(ERC1967ProxyErrors::FailedInnerCall)
661 }
662 FailedInnerCall
663 },
664 {
665 fn ERC1967InvalidImplementation(
666 data: &[u8],
667 validate: bool,
668 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
669 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_decode_raw(
670 data,
671 validate,
672 )
673 .map(ERC1967ProxyErrors::ERC1967InvalidImplementation)
674 }
675 ERC1967InvalidImplementation
676 },
677 {
678 fn AddressEmptyCode(
679 data: &[u8],
680 validate: bool,
681 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
682 <AddressEmptyCode as alloy_sol_types::SolError>::abi_decode_raw(
683 data,
684 validate,
685 )
686 .map(ERC1967ProxyErrors::AddressEmptyCode)
687 }
688 AddressEmptyCode
689 },
690 {
691 fn ERC1967NonPayable(
692 data: &[u8],
693 validate: bool,
694 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
695 <ERC1967NonPayable as alloy_sol_types::SolError>::abi_decode_raw(
696 data,
697 validate,
698 )
699 .map(ERC1967ProxyErrors::ERC1967NonPayable)
700 }
701 ERC1967NonPayable
702 },
703 ];
704 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
705 return Err(
706 alloy_sol_types::Error::unknown_selector(
707 <Self as alloy_sol_types::SolInterface>::NAME,
708 selector,
709 ),
710 );
711 };
712 DECODE_SHIMS[idx](data, validate)
713 }
714 #[inline]
715 fn abi_encoded_size(&self) -> usize {
716 match self {
717 Self::AddressEmptyCode(inner) => {
718 <AddressEmptyCode as alloy_sol_types::SolError>::abi_encoded_size(
719 inner,
720 )
721 }
722 Self::ERC1967InvalidImplementation(inner) => {
723 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encoded_size(
724 inner,
725 )
726 }
727 Self::ERC1967NonPayable(inner) => {
728 <ERC1967NonPayable as alloy_sol_types::SolError>::abi_encoded_size(
729 inner,
730 )
731 }
732 Self::FailedInnerCall(inner) => {
733 <FailedInnerCall as alloy_sol_types::SolError>::abi_encoded_size(
734 inner,
735 )
736 }
737 }
738 }
739 #[inline]
740 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
741 match self {
742 Self::AddressEmptyCode(inner) => {
743 <AddressEmptyCode as alloy_sol_types::SolError>::abi_encode_raw(
744 inner,
745 out,
746 )
747 }
748 Self::ERC1967InvalidImplementation(inner) => {
749 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encode_raw(
750 inner,
751 out,
752 )
753 }
754 Self::ERC1967NonPayable(inner) => {
755 <ERC1967NonPayable as alloy_sol_types::SolError>::abi_encode_raw(
756 inner,
757 out,
758 )
759 }
760 Self::FailedInnerCall(inner) => {
761 <FailedInnerCall as alloy_sol_types::SolError>::abi_encode_raw(
762 inner,
763 out,
764 )
765 }
766 }
767 }
768 }
769 #[derive(Debug, PartialEq, Eq, Hash)]
771 pub enum ERC1967ProxyEvents {
772 #[allow(missing_docs)]
773 Upgraded(Upgraded),
774 }
775 #[automatically_derived]
776 impl ERC1967ProxyEvents {
777 pub const SELECTORS: &'static [[u8; 32usize]] = &[
784 [
785 188u8, 124u8, 215u8, 90u8, 32u8, 238u8, 39u8, 253u8, 154u8, 222u8, 186u8,
786 179u8, 32u8, 65u8, 247u8, 85u8, 33u8, 77u8, 188u8, 107u8, 255u8, 169u8,
787 12u8, 192u8, 34u8, 91u8, 57u8, 218u8, 46u8, 92u8, 45u8, 59u8,
788 ],
789 ];
790 }
791 #[automatically_derived]
792 impl alloy_sol_types::SolEventInterface for ERC1967ProxyEvents {
793 const NAME: &'static str = "ERC1967ProxyEvents";
794 const COUNT: usize = 1usize;
795 fn decode_raw_log(
796 topics: &[alloy_sol_types::Word],
797 data: &[u8],
798 validate: bool,
799 ) -> alloy_sol_types::Result<Self> {
800 match topics.first().copied() {
801 Some(<Upgraded as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
802 <Upgraded as alloy_sol_types::SolEvent>::decode_raw_log(
803 topics,
804 data,
805 validate,
806 )
807 .map(Self::Upgraded)
808 }
809 _ => {
810 alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
811 name: <Self as alloy_sol_types::SolEventInterface>::NAME,
812 log: alloy_sol_types::private::Box::new(
813 alloy_sol_types::private::LogData::new_unchecked(
814 topics.to_vec(),
815 data.to_vec().into(),
816 ),
817 ),
818 })
819 }
820 }
821 }
822 }
823 #[automatically_derived]
824 impl alloy_sol_types::private::IntoLogData for ERC1967ProxyEvents {
825 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
826 match self {
827 Self::Upgraded(inner) => {
828 alloy_sol_types::private::IntoLogData::to_log_data(inner)
829 }
830 }
831 }
832 fn into_log_data(self) -> alloy_sol_types::private::LogData {
833 match self {
834 Self::Upgraded(inner) => {
835 alloy_sol_types::private::IntoLogData::into_log_data(inner)
836 }
837 }
838 }
839 }
840 use alloy::contract as alloy_contract;
841 #[inline]
845 pub const fn new<
846 T: alloy_contract::private::Transport + ::core::clone::Clone,
847 P: alloy_contract::private::Provider<T, N>,
848 N: alloy_contract::private::Network,
849 >(
850 address: alloy_sol_types::private::Address,
851 provider: P,
852 ) -> ERC1967ProxyInstance<T, P, N> {
853 ERC1967ProxyInstance::<T, P, N>::new(address, provider)
854 }
855 #[inline]
861 pub fn deploy<
862 T: alloy_contract::private::Transport + ::core::clone::Clone,
863 P: alloy_contract::private::Provider<T, N>,
864 N: alloy_contract::private::Network,
865 >(
866 provider: P,
867 implementation: alloy::sol_types::private::Address,
868 _data: alloy::sol_types::private::Bytes,
869 ) -> impl ::core::future::Future<
870 Output = alloy_contract::Result<ERC1967ProxyInstance<T, P, N>>,
871 > {
872 ERC1967ProxyInstance::<T, P, N>::deploy(provider, implementation, _data)
873 }
874 #[inline]
880 pub fn deploy_builder<
881 T: alloy_contract::private::Transport + ::core::clone::Clone,
882 P: alloy_contract::private::Provider<T, N>,
883 N: alloy_contract::private::Network,
884 >(
885 provider: P,
886 implementation: alloy::sol_types::private::Address,
887 _data: alloy::sol_types::private::Bytes,
888 ) -> alloy_contract::RawCallBuilder<T, P, N> {
889 ERC1967ProxyInstance::<T, P, N>::deploy_builder(provider, implementation, _data)
890 }
891 #[derive(Clone)]
903 pub struct ERC1967ProxyInstance<T, P, N = alloy_contract::private::Ethereum> {
904 address: alloy_sol_types::private::Address,
905 provider: P,
906 _network_transport: ::core::marker::PhantomData<(N, T)>,
907 }
908 #[automatically_derived]
909 impl<T, P, N> ::core::fmt::Debug for ERC1967ProxyInstance<T, P, N> {
910 #[inline]
911 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
912 f.debug_tuple("ERC1967ProxyInstance").field(&self.address).finish()
913 }
914 }
915 #[automatically_derived]
917 impl<
918 T: alloy_contract::private::Transport + ::core::clone::Clone,
919 P: alloy_contract::private::Provider<T, N>,
920 N: alloy_contract::private::Network,
921 > ERC1967ProxyInstance<T, P, N> {
922 #[inline]
926 pub const fn new(
927 address: alloy_sol_types::private::Address,
928 provider: P,
929 ) -> Self {
930 Self {
931 address,
932 provider,
933 _network_transport: ::core::marker::PhantomData,
934 }
935 }
936 #[inline]
942 pub async fn deploy(
943 provider: P,
944 implementation: alloy::sol_types::private::Address,
945 _data: alloy::sol_types::private::Bytes,
946 ) -> alloy_contract::Result<ERC1967ProxyInstance<T, P, N>> {
947 let call_builder = Self::deploy_builder(provider, implementation, _data);
948 let contract_address = call_builder.deploy().await?;
949 Ok(Self::new(contract_address, call_builder.provider))
950 }
951 #[inline]
957 pub fn deploy_builder(
958 provider: P,
959 implementation: alloy::sol_types::private::Address,
960 _data: alloy::sol_types::private::Bytes,
961 ) -> alloy_contract::RawCallBuilder<T, P, N> {
962 alloy_contract::RawCallBuilder::new_raw_deploy(
963 provider,
964 [
965 &BYTECODE[..],
966 &alloy_sol_types::SolConstructor::abi_encode(
967 &constructorCall {
968 implementation,
969 _data,
970 },
971 )[..],
972 ]
973 .concat()
974 .into(),
975 )
976 }
977 #[inline]
979 pub const fn address(&self) -> &alloy_sol_types::private::Address {
980 &self.address
981 }
982 #[inline]
984 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
985 self.address = address;
986 }
987 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
989 self.set_address(address);
990 self
991 }
992 #[inline]
994 pub const fn provider(&self) -> &P {
995 &self.provider
996 }
997 }
998 impl<T, P: ::core::clone::Clone, N> ERC1967ProxyInstance<T, &P, N> {
999 #[inline]
1001 pub fn with_cloned_provider(self) -> ERC1967ProxyInstance<T, P, N> {
1002 ERC1967ProxyInstance {
1003 address: self.address,
1004 provider: ::core::clone::Clone::clone(&self.provider),
1005 _network_transport: ::core::marker::PhantomData,
1006 }
1007 }
1008 }
1009 #[automatically_derived]
1011 impl<
1012 T: alloy_contract::private::Transport + ::core::clone::Clone,
1013 P: alloy_contract::private::Provider<T, N>,
1014 N: alloy_contract::private::Network,
1015 > ERC1967ProxyInstance<T, P, N> {
1016 pub fn call_builder<C: alloy_sol_types::SolCall>(
1021 &self,
1022 call: &C,
1023 ) -> alloy_contract::SolCallBuilder<T, &P, C, N> {
1024 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
1025 }
1026 }
1027 #[automatically_derived]
1029 impl<
1030 T: alloy_contract::private::Transport + ::core::clone::Clone,
1031 P: alloy_contract::private::Provider<T, N>,
1032 N: alloy_contract::private::Network,
1033 > ERC1967ProxyInstance<T, P, N> {
1034 pub fn event_filter<E: alloy_sol_types::SolEvent>(
1039 &self,
1040 ) -> alloy_contract::Event<T, &P, E, N> {
1041 alloy_contract::Event::new_sol(&self.provider, &self.address)
1042 }
1043 pub fn Upgraded_filter(&self) -> alloy_contract::Event<T, &P, Upgraded, N> {
1045 self.event_filter::<Upgraded>()
1046 }
1047 }
1048}