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(serde::Serialize, serde::Deserialize)]
120 #[derive(Default, Debug, PartialEq, Eq, Hash)]
121 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
126 #[derive(Clone)]
127 pub struct AddressEmptyCode {
128 #[allow(missing_docs)]
129 pub target: alloy::sol_types::private::Address,
130 }
131 #[allow(
132 non_camel_case_types,
133 non_snake_case,
134 clippy::pub_underscore_fields,
135 clippy::style
136 )]
137 const _: () = {
138 use alloy::sol_types as alloy_sol_types;
139 #[doc(hidden)]
140 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
141 #[doc(hidden)]
142 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
143 #[cfg(test)]
144 #[allow(dead_code, unreachable_patterns)]
145 fn _type_assertion(
146 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
147 ) {
148 match _t {
149 alloy_sol_types::private::AssertTypeEq::<
150 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
151 >(_) => {}
152 }
153 }
154 #[automatically_derived]
155 #[doc(hidden)]
156 impl ::core::convert::From<AddressEmptyCode> for UnderlyingRustTuple<'_> {
157 fn from(value: AddressEmptyCode) -> Self {
158 (value.target,)
159 }
160 }
161 #[automatically_derived]
162 #[doc(hidden)]
163 impl ::core::convert::From<UnderlyingRustTuple<'_>> for AddressEmptyCode {
164 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
165 Self { target: tuple.0 }
166 }
167 }
168 #[automatically_derived]
169 impl alloy_sol_types::SolError for AddressEmptyCode {
170 type Parameters<'a> = UnderlyingSolTuple<'a>;
171 type Token<'a> = <Self::Parameters<
172 'a,
173 > as alloy_sol_types::SolType>::Token<'a>;
174 const SIGNATURE: &'static str = "AddressEmptyCode(address)";
175 const SELECTOR: [u8; 4] = [153u8, 150u8, 179u8, 21u8];
176 #[inline]
177 fn new<'a>(
178 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
179 ) -> Self {
180 tuple.into()
181 }
182 #[inline]
183 fn tokenize(&self) -> Self::Token<'_> {
184 (
185 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
186 &self.target,
187 ),
188 )
189 }
190 #[inline]
191 fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
192 <Self::Parameters<
193 '_,
194 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
195 .map(Self::new)
196 }
197 }
198 };
199 #[derive(serde::Serialize, serde::Deserialize)]
200 #[derive(Default, Debug, PartialEq, Eq, Hash)]
201 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
206 #[derive(Clone)]
207 pub struct ERC1967InvalidImplementation {
208 #[allow(missing_docs)]
209 pub implementation: alloy::sol_types::private::Address,
210 }
211 #[allow(
212 non_camel_case_types,
213 non_snake_case,
214 clippy::pub_underscore_fields,
215 clippy::style
216 )]
217 const _: () = {
218 use alloy::sol_types as alloy_sol_types;
219 #[doc(hidden)]
220 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
221 #[doc(hidden)]
222 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
223 #[cfg(test)]
224 #[allow(dead_code, unreachable_patterns)]
225 fn _type_assertion(
226 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
227 ) {
228 match _t {
229 alloy_sol_types::private::AssertTypeEq::<
230 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
231 >(_) => {}
232 }
233 }
234 #[automatically_derived]
235 #[doc(hidden)]
236 impl ::core::convert::From<ERC1967InvalidImplementation>
237 for UnderlyingRustTuple<'_> {
238 fn from(value: ERC1967InvalidImplementation) -> Self {
239 (value.implementation,)
240 }
241 }
242 #[automatically_derived]
243 #[doc(hidden)]
244 impl ::core::convert::From<UnderlyingRustTuple<'_>>
245 for ERC1967InvalidImplementation {
246 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
247 Self { implementation: tuple.0 }
248 }
249 }
250 #[automatically_derived]
251 impl alloy_sol_types::SolError for ERC1967InvalidImplementation {
252 type Parameters<'a> = UnderlyingSolTuple<'a>;
253 type Token<'a> = <Self::Parameters<
254 'a,
255 > as alloy_sol_types::SolType>::Token<'a>;
256 const SIGNATURE: &'static str = "ERC1967InvalidImplementation(address)";
257 const SELECTOR: [u8; 4] = [76u8, 156u8, 140u8, 227u8];
258 #[inline]
259 fn new<'a>(
260 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
261 ) -> Self {
262 tuple.into()
263 }
264 #[inline]
265 fn tokenize(&self) -> Self::Token<'_> {
266 (
267 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
268 &self.implementation,
269 ),
270 )
271 }
272 #[inline]
273 fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
274 <Self::Parameters<
275 '_,
276 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
277 .map(Self::new)
278 }
279 }
280 };
281 #[derive(serde::Serialize, serde::Deserialize)]
282 #[derive(Default, Debug, PartialEq, Eq, Hash)]
283 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
288 #[derive(Clone)]
289 pub struct ERC1967NonPayable;
290 #[allow(
291 non_camel_case_types,
292 non_snake_case,
293 clippy::pub_underscore_fields,
294 clippy::style
295 )]
296 const _: () = {
297 use alloy::sol_types as alloy_sol_types;
298 #[doc(hidden)]
299 type UnderlyingSolTuple<'a> = ();
300 #[doc(hidden)]
301 type UnderlyingRustTuple<'a> = ();
302 #[cfg(test)]
303 #[allow(dead_code, unreachable_patterns)]
304 fn _type_assertion(
305 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
306 ) {
307 match _t {
308 alloy_sol_types::private::AssertTypeEq::<
309 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
310 >(_) => {}
311 }
312 }
313 #[automatically_derived]
314 #[doc(hidden)]
315 impl ::core::convert::From<ERC1967NonPayable> for UnderlyingRustTuple<'_> {
316 fn from(value: ERC1967NonPayable) -> Self {
317 ()
318 }
319 }
320 #[automatically_derived]
321 #[doc(hidden)]
322 impl ::core::convert::From<UnderlyingRustTuple<'_>> for ERC1967NonPayable {
323 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
324 Self
325 }
326 }
327 #[automatically_derived]
328 impl alloy_sol_types::SolError for ERC1967NonPayable {
329 type Parameters<'a> = UnderlyingSolTuple<'a>;
330 type Token<'a> = <Self::Parameters<
331 'a,
332 > as alloy_sol_types::SolType>::Token<'a>;
333 const SIGNATURE: &'static str = "ERC1967NonPayable()";
334 const SELECTOR: [u8; 4] = [179u8, 152u8, 151u8, 159u8];
335 #[inline]
336 fn new<'a>(
337 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
338 ) -> Self {
339 tuple.into()
340 }
341 #[inline]
342 fn tokenize(&self) -> Self::Token<'_> {
343 ()
344 }
345 #[inline]
346 fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
347 <Self::Parameters<
348 '_,
349 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
350 .map(Self::new)
351 }
352 }
353 };
354 #[derive(serde::Serialize, serde::Deserialize)]
355 #[derive(Default, Debug, PartialEq, Eq, Hash)]
356 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
361 #[derive(Clone)]
362 pub struct FailedInnerCall;
363 #[allow(
364 non_camel_case_types,
365 non_snake_case,
366 clippy::pub_underscore_fields,
367 clippy::style
368 )]
369 const _: () = {
370 use alloy::sol_types as alloy_sol_types;
371 #[doc(hidden)]
372 type UnderlyingSolTuple<'a> = ();
373 #[doc(hidden)]
374 type UnderlyingRustTuple<'a> = ();
375 #[cfg(test)]
376 #[allow(dead_code, unreachable_patterns)]
377 fn _type_assertion(
378 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
379 ) {
380 match _t {
381 alloy_sol_types::private::AssertTypeEq::<
382 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
383 >(_) => {}
384 }
385 }
386 #[automatically_derived]
387 #[doc(hidden)]
388 impl ::core::convert::From<FailedInnerCall> for UnderlyingRustTuple<'_> {
389 fn from(value: FailedInnerCall) -> Self {
390 ()
391 }
392 }
393 #[automatically_derived]
394 #[doc(hidden)]
395 impl ::core::convert::From<UnderlyingRustTuple<'_>> for FailedInnerCall {
396 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
397 Self
398 }
399 }
400 #[automatically_derived]
401 impl alloy_sol_types::SolError for FailedInnerCall {
402 type Parameters<'a> = UnderlyingSolTuple<'a>;
403 type Token<'a> = <Self::Parameters<
404 'a,
405 > as alloy_sol_types::SolType>::Token<'a>;
406 const SIGNATURE: &'static str = "FailedInnerCall()";
407 const SELECTOR: [u8; 4] = [20u8, 37u8, 234u8, 66u8];
408 #[inline]
409 fn new<'a>(
410 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
411 ) -> Self {
412 tuple.into()
413 }
414 #[inline]
415 fn tokenize(&self) -> Self::Token<'_> {
416 ()
417 }
418 #[inline]
419 fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
420 <Self::Parameters<
421 '_,
422 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
423 .map(Self::new)
424 }
425 }
426 };
427 #[derive(serde::Serialize, serde::Deserialize)]
428 #[derive(Default, Debug, PartialEq, Eq, Hash)]
429 #[allow(
434 non_camel_case_types,
435 non_snake_case,
436 clippy::pub_underscore_fields,
437 clippy::style
438 )]
439 #[derive(Clone)]
440 pub struct Upgraded {
441 #[allow(missing_docs)]
442 pub implementation: alloy::sol_types::private::Address,
443 }
444 #[allow(
445 non_camel_case_types,
446 non_snake_case,
447 clippy::pub_underscore_fields,
448 clippy::style
449 )]
450 const _: () = {
451 use alloy::sol_types as alloy_sol_types;
452 #[automatically_derived]
453 impl alloy_sol_types::SolEvent for Upgraded {
454 type DataTuple<'a> = ();
455 type DataToken<'a> = <Self::DataTuple<
456 'a,
457 > as alloy_sol_types::SolType>::Token<'a>;
458 type TopicList = (
459 alloy_sol_types::sol_data::FixedBytes<32>,
460 alloy::sol_types::sol_data::Address,
461 );
462 const SIGNATURE: &'static str = "Upgraded(address)";
463 const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
464 188u8, 124u8, 215u8, 90u8, 32u8, 238u8, 39u8, 253u8, 154u8, 222u8, 186u8,
465 179u8, 32u8, 65u8, 247u8, 85u8, 33u8, 77u8, 188u8, 107u8, 255u8, 169u8,
466 12u8, 192u8, 34u8, 91u8, 57u8, 218u8, 46u8, 92u8, 45u8, 59u8,
467 ]);
468 const ANONYMOUS: bool = false;
469 #[allow(unused_variables)]
470 #[inline]
471 fn new(
472 topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
473 data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
474 ) -> Self {
475 Self { implementation: topics.1 }
476 }
477 #[inline]
478 fn check_signature(
479 topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
480 ) -> alloy_sol_types::Result<()> {
481 if topics.0 != Self::SIGNATURE_HASH {
482 return Err(
483 alloy_sol_types::Error::invalid_event_signature_hash(
484 Self::SIGNATURE,
485 topics.0,
486 Self::SIGNATURE_HASH,
487 ),
488 );
489 }
490 Ok(())
491 }
492 #[inline]
493 fn tokenize_body(&self) -> Self::DataToken<'_> {
494 ()
495 }
496 #[inline]
497 fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
498 (Self::SIGNATURE_HASH.into(), self.implementation.clone())
499 }
500 #[inline]
501 fn encode_topics_raw(
502 &self,
503 out: &mut [alloy_sol_types::abi::token::WordToken],
504 ) -> alloy_sol_types::Result<()> {
505 if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
506 return Err(alloy_sol_types::Error::Overrun);
507 }
508 out[0usize] = alloy_sol_types::abi::token::WordToken(
509 Self::SIGNATURE_HASH,
510 );
511 out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
512 &self.implementation,
513 );
514 Ok(())
515 }
516 }
517 #[automatically_derived]
518 impl alloy_sol_types::private::IntoLogData for Upgraded {
519 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
520 From::from(self)
521 }
522 fn into_log_data(self) -> alloy_sol_types::private::LogData {
523 From::from(&self)
524 }
525 }
526 #[automatically_derived]
527 impl From<&Upgraded> for alloy_sol_types::private::LogData {
528 #[inline]
529 fn from(this: &Upgraded) -> alloy_sol_types::private::LogData {
530 alloy_sol_types::SolEvent::encode_log_data(this)
531 }
532 }
533 };
534 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
539 #[derive(Clone)]
540 pub struct constructorCall {
541 #[allow(missing_docs)]
542 pub implementation: alloy::sol_types::private::Address,
543 #[allow(missing_docs)]
544 pub _data: alloy::sol_types::private::Bytes,
545 }
546 const _: () = {
547 use alloy::sol_types as alloy_sol_types;
548 {
549 #[doc(hidden)]
550 type UnderlyingSolTuple<'a> = (
551 alloy::sol_types::sol_data::Address,
552 alloy::sol_types::sol_data::Bytes,
553 );
554 #[doc(hidden)]
555 type UnderlyingRustTuple<'a> = (
556 alloy::sol_types::private::Address,
557 alloy::sol_types::private::Bytes,
558 );
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<constructorCall> for UnderlyingRustTuple<'_> {
573 fn from(value: constructorCall) -> Self {
574 (value.implementation, value._data)
575 }
576 }
577 #[automatically_derived]
578 #[doc(hidden)]
579 impl ::core::convert::From<UnderlyingRustTuple<'_>> for constructorCall {
580 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
581 Self {
582 implementation: tuple.0,
583 _data: tuple.1,
584 }
585 }
586 }
587 }
588 #[automatically_derived]
589 impl alloy_sol_types::SolConstructor for constructorCall {
590 type Parameters<'a> = (
591 alloy::sol_types::sol_data::Address,
592 alloy::sol_types::sol_data::Bytes,
593 );
594 type Token<'a> = <Self::Parameters<
595 'a,
596 > as alloy_sol_types::SolType>::Token<'a>;
597 #[inline]
598 fn new<'a>(
599 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
600 ) -> Self {
601 tuple.into()
602 }
603 #[inline]
604 fn tokenize(&self) -> Self::Token<'_> {
605 (
606 <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
607 &self.implementation,
608 ),
609 <alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
610 &self._data,
611 ),
612 )
613 }
614 }
615 };
616 #[derive(serde::Serialize, serde::Deserialize)]
618 #[derive(Debug, PartialEq, Eq, Hash)]
619 pub enum ERC1967ProxyErrors {
620 #[allow(missing_docs)]
621 AddressEmptyCode(AddressEmptyCode),
622 #[allow(missing_docs)]
623 ERC1967InvalidImplementation(ERC1967InvalidImplementation),
624 #[allow(missing_docs)]
625 ERC1967NonPayable(ERC1967NonPayable),
626 #[allow(missing_docs)]
627 FailedInnerCall(FailedInnerCall),
628 }
629 #[automatically_derived]
630 impl ERC1967ProxyErrors {
631 pub const SELECTORS: &'static [[u8; 4usize]] = &[
638 [20u8, 37u8, 234u8, 66u8],
639 [76u8, 156u8, 140u8, 227u8],
640 [153u8, 150u8, 179u8, 21u8],
641 [179u8, 152u8, 151u8, 159u8],
642 ];
643 }
644 #[automatically_derived]
645 impl alloy_sol_types::SolInterface for ERC1967ProxyErrors {
646 const NAME: &'static str = "ERC1967ProxyErrors";
647 const MIN_DATA_LENGTH: usize = 0usize;
648 const COUNT: usize = 4usize;
649 #[inline]
650 fn selector(&self) -> [u8; 4] {
651 match self {
652 Self::AddressEmptyCode(_) => {
653 <AddressEmptyCode as alloy_sol_types::SolError>::SELECTOR
654 }
655 Self::ERC1967InvalidImplementation(_) => {
656 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::SELECTOR
657 }
658 Self::ERC1967NonPayable(_) => {
659 <ERC1967NonPayable as alloy_sol_types::SolError>::SELECTOR
660 }
661 Self::FailedInnerCall(_) => {
662 <FailedInnerCall as alloy_sol_types::SolError>::SELECTOR
663 }
664 }
665 }
666 #[inline]
667 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
668 Self::SELECTORS.get(i).copied()
669 }
670 #[inline]
671 fn valid_selector(selector: [u8; 4]) -> bool {
672 Self::SELECTORS.binary_search(&selector).is_ok()
673 }
674 #[inline]
675 #[allow(non_snake_case)]
676 fn abi_decode_raw(
677 selector: [u8; 4],
678 data: &[u8],
679 ) -> alloy_sol_types::Result<Self> {
680 static DECODE_SHIMS: &[fn(
681 &[u8],
682 ) -> alloy_sol_types::Result<ERC1967ProxyErrors>] = &[
683 {
684 fn FailedInnerCall(
685 data: &[u8],
686 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
687 <FailedInnerCall as alloy_sol_types::SolError>::abi_decode_raw(
688 data,
689 )
690 .map(ERC1967ProxyErrors::FailedInnerCall)
691 }
692 FailedInnerCall
693 },
694 {
695 fn ERC1967InvalidImplementation(
696 data: &[u8],
697 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
698 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_decode_raw(
699 data,
700 )
701 .map(ERC1967ProxyErrors::ERC1967InvalidImplementation)
702 }
703 ERC1967InvalidImplementation
704 },
705 {
706 fn AddressEmptyCode(
707 data: &[u8],
708 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
709 <AddressEmptyCode as alloy_sol_types::SolError>::abi_decode_raw(
710 data,
711 )
712 .map(ERC1967ProxyErrors::AddressEmptyCode)
713 }
714 AddressEmptyCode
715 },
716 {
717 fn ERC1967NonPayable(
718 data: &[u8],
719 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
720 <ERC1967NonPayable as alloy_sol_types::SolError>::abi_decode_raw(
721 data,
722 )
723 .map(ERC1967ProxyErrors::ERC1967NonPayable)
724 }
725 ERC1967NonPayable
726 },
727 ];
728 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
729 return Err(
730 alloy_sol_types::Error::unknown_selector(
731 <Self as alloy_sol_types::SolInterface>::NAME,
732 selector,
733 ),
734 );
735 };
736 DECODE_SHIMS[idx](data)
737 }
738 #[inline]
739 #[allow(non_snake_case)]
740 fn abi_decode_raw_validate(
741 selector: [u8; 4],
742 data: &[u8],
743 ) -> alloy_sol_types::Result<Self> {
744 static DECODE_VALIDATE_SHIMS: &[fn(
745 &[u8],
746 ) -> alloy_sol_types::Result<ERC1967ProxyErrors>] = &[
747 {
748 fn FailedInnerCall(
749 data: &[u8],
750 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
751 <FailedInnerCall as alloy_sol_types::SolError>::abi_decode_raw_validate(
752 data,
753 )
754 .map(ERC1967ProxyErrors::FailedInnerCall)
755 }
756 FailedInnerCall
757 },
758 {
759 fn ERC1967InvalidImplementation(
760 data: &[u8],
761 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
762 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_decode_raw_validate(
763 data,
764 )
765 .map(ERC1967ProxyErrors::ERC1967InvalidImplementation)
766 }
767 ERC1967InvalidImplementation
768 },
769 {
770 fn AddressEmptyCode(
771 data: &[u8],
772 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
773 <AddressEmptyCode as alloy_sol_types::SolError>::abi_decode_raw_validate(
774 data,
775 )
776 .map(ERC1967ProxyErrors::AddressEmptyCode)
777 }
778 AddressEmptyCode
779 },
780 {
781 fn ERC1967NonPayable(
782 data: &[u8],
783 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
784 <ERC1967NonPayable as alloy_sol_types::SolError>::abi_decode_raw_validate(
785 data,
786 )
787 .map(ERC1967ProxyErrors::ERC1967NonPayable)
788 }
789 ERC1967NonPayable
790 },
791 ];
792 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
793 return Err(
794 alloy_sol_types::Error::unknown_selector(
795 <Self as alloy_sol_types::SolInterface>::NAME,
796 selector,
797 ),
798 );
799 };
800 DECODE_VALIDATE_SHIMS[idx](data)
801 }
802 #[inline]
803 fn abi_encoded_size(&self) -> usize {
804 match self {
805 Self::AddressEmptyCode(inner) => {
806 <AddressEmptyCode as alloy_sol_types::SolError>::abi_encoded_size(
807 inner,
808 )
809 }
810 Self::ERC1967InvalidImplementation(inner) => {
811 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encoded_size(
812 inner,
813 )
814 }
815 Self::ERC1967NonPayable(inner) => {
816 <ERC1967NonPayable as alloy_sol_types::SolError>::abi_encoded_size(
817 inner,
818 )
819 }
820 Self::FailedInnerCall(inner) => {
821 <FailedInnerCall as alloy_sol_types::SolError>::abi_encoded_size(
822 inner,
823 )
824 }
825 }
826 }
827 #[inline]
828 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
829 match self {
830 Self::AddressEmptyCode(inner) => {
831 <AddressEmptyCode as alloy_sol_types::SolError>::abi_encode_raw(
832 inner,
833 out,
834 )
835 }
836 Self::ERC1967InvalidImplementation(inner) => {
837 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encode_raw(
838 inner,
839 out,
840 )
841 }
842 Self::ERC1967NonPayable(inner) => {
843 <ERC1967NonPayable as alloy_sol_types::SolError>::abi_encode_raw(
844 inner,
845 out,
846 )
847 }
848 Self::FailedInnerCall(inner) => {
849 <FailedInnerCall as alloy_sol_types::SolError>::abi_encode_raw(
850 inner,
851 out,
852 )
853 }
854 }
855 }
856 }
857 #[derive(serde::Serialize, serde::Deserialize)]
859 #[derive(Debug, PartialEq, Eq, Hash)]
860 pub enum ERC1967ProxyEvents {
861 #[allow(missing_docs)]
862 Upgraded(Upgraded),
863 }
864 #[automatically_derived]
865 impl ERC1967ProxyEvents {
866 pub const SELECTORS: &'static [[u8; 32usize]] = &[
873 [
874 188u8, 124u8, 215u8, 90u8, 32u8, 238u8, 39u8, 253u8, 154u8, 222u8, 186u8,
875 179u8, 32u8, 65u8, 247u8, 85u8, 33u8, 77u8, 188u8, 107u8, 255u8, 169u8,
876 12u8, 192u8, 34u8, 91u8, 57u8, 218u8, 46u8, 92u8, 45u8, 59u8,
877 ],
878 ];
879 }
880 #[automatically_derived]
881 impl alloy_sol_types::SolEventInterface for ERC1967ProxyEvents {
882 const NAME: &'static str = "ERC1967ProxyEvents";
883 const COUNT: usize = 1usize;
884 fn decode_raw_log(
885 topics: &[alloy_sol_types::Word],
886 data: &[u8],
887 ) -> alloy_sol_types::Result<Self> {
888 match topics.first().copied() {
889 Some(<Upgraded as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
890 <Upgraded as alloy_sol_types::SolEvent>::decode_raw_log(topics, data)
891 .map(Self::Upgraded)
892 }
893 _ => {
894 alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
895 name: <Self as alloy_sol_types::SolEventInterface>::NAME,
896 log: alloy_sol_types::private::Box::new(
897 alloy_sol_types::private::LogData::new_unchecked(
898 topics.to_vec(),
899 data.to_vec().into(),
900 ),
901 ),
902 })
903 }
904 }
905 }
906 }
907 #[automatically_derived]
908 impl alloy_sol_types::private::IntoLogData for ERC1967ProxyEvents {
909 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
910 match self {
911 Self::Upgraded(inner) => {
912 alloy_sol_types::private::IntoLogData::to_log_data(inner)
913 }
914 }
915 }
916 fn into_log_data(self) -> alloy_sol_types::private::LogData {
917 match self {
918 Self::Upgraded(inner) => {
919 alloy_sol_types::private::IntoLogData::into_log_data(inner)
920 }
921 }
922 }
923 }
924 use alloy::contract as alloy_contract;
925 #[inline]
929 pub const fn new<
930 P: alloy_contract::private::Provider<N>,
931 N: alloy_contract::private::Network,
932 >(
933 address: alloy_sol_types::private::Address,
934 provider: P,
935 ) -> ERC1967ProxyInstance<P, N> {
936 ERC1967ProxyInstance::<P, N>::new(address, provider)
937 }
938 #[inline]
944 pub fn deploy<
945 P: alloy_contract::private::Provider<N>,
946 N: alloy_contract::private::Network,
947 >(
948 provider: P,
949 implementation: alloy::sol_types::private::Address,
950 _data: alloy::sol_types::private::Bytes,
951 ) -> impl ::core::future::Future<
952 Output = alloy_contract::Result<ERC1967ProxyInstance<P, N>>,
953 > {
954 ERC1967ProxyInstance::<P, N>::deploy(provider, implementation, _data)
955 }
956 #[inline]
962 pub fn deploy_builder<
963 P: alloy_contract::private::Provider<N>,
964 N: alloy_contract::private::Network,
965 >(
966 provider: P,
967 implementation: alloy::sol_types::private::Address,
968 _data: alloy::sol_types::private::Bytes,
969 ) -> alloy_contract::RawCallBuilder<P, N> {
970 ERC1967ProxyInstance::<P, N>::deploy_builder(provider, implementation, _data)
971 }
972 #[derive(Clone)]
984 pub struct ERC1967ProxyInstance<P, N = alloy_contract::private::Ethereum> {
985 address: alloy_sol_types::private::Address,
986 provider: P,
987 _network: ::core::marker::PhantomData<N>,
988 }
989 #[automatically_derived]
990 impl<P, N> ::core::fmt::Debug for ERC1967ProxyInstance<P, N> {
991 #[inline]
992 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
993 f.debug_tuple("ERC1967ProxyInstance").field(&self.address).finish()
994 }
995 }
996 #[automatically_derived]
998 impl<
999 P: alloy_contract::private::Provider<N>,
1000 N: alloy_contract::private::Network,
1001 > ERC1967ProxyInstance<P, N> {
1002 #[inline]
1006 pub const fn new(
1007 address: alloy_sol_types::private::Address,
1008 provider: P,
1009 ) -> Self {
1010 Self {
1011 address,
1012 provider,
1013 _network: ::core::marker::PhantomData,
1014 }
1015 }
1016 #[inline]
1022 pub async fn deploy(
1023 provider: P,
1024 implementation: alloy::sol_types::private::Address,
1025 _data: alloy::sol_types::private::Bytes,
1026 ) -> alloy_contract::Result<ERC1967ProxyInstance<P, N>> {
1027 let call_builder = Self::deploy_builder(provider, implementation, _data);
1028 let contract_address = call_builder.deploy().await?;
1029 Ok(Self::new(contract_address, call_builder.provider))
1030 }
1031 #[inline]
1037 pub fn deploy_builder(
1038 provider: P,
1039 implementation: alloy::sol_types::private::Address,
1040 _data: alloy::sol_types::private::Bytes,
1041 ) -> alloy_contract::RawCallBuilder<P, N> {
1042 alloy_contract::RawCallBuilder::new_raw_deploy(
1043 provider,
1044 [
1045 &BYTECODE[..],
1046 &alloy_sol_types::SolConstructor::abi_encode(
1047 &constructorCall {
1048 implementation,
1049 _data,
1050 },
1051 )[..],
1052 ]
1053 .concat()
1054 .into(),
1055 )
1056 }
1057 #[inline]
1059 pub const fn address(&self) -> &alloy_sol_types::private::Address {
1060 &self.address
1061 }
1062 #[inline]
1064 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
1065 self.address = address;
1066 }
1067 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
1069 self.set_address(address);
1070 self
1071 }
1072 #[inline]
1074 pub const fn provider(&self) -> &P {
1075 &self.provider
1076 }
1077 }
1078 impl<P: ::core::clone::Clone, N> ERC1967ProxyInstance<&P, N> {
1079 #[inline]
1081 pub fn with_cloned_provider(self) -> ERC1967ProxyInstance<P, N> {
1082 ERC1967ProxyInstance {
1083 address: self.address,
1084 provider: ::core::clone::Clone::clone(&self.provider),
1085 _network: ::core::marker::PhantomData,
1086 }
1087 }
1088 }
1089 #[automatically_derived]
1091 impl<
1092 P: alloy_contract::private::Provider<N>,
1093 N: alloy_contract::private::Network,
1094 > ERC1967ProxyInstance<P, N> {
1095 pub fn call_builder<C: alloy_sol_types::SolCall>(
1100 &self,
1101 call: &C,
1102 ) -> alloy_contract::SolCallBuilder<&P, C, N> {
1103 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
1104 }
1105 }
1106 #[automatically_derived]
1108 impl<
1109 P: alloy_contract::private::Provider<N>,
1110 N: alloy_contract::private::Network,
1111 > ERC1967ProxyInstance<P, N> {
1112 pub fn event_filter<E: alloy_sol_types::SolEvent>(
1117 &self,
1118 ) -> alloy_contract::Event<&P, E, N> {
1119 alloy_contract::Event::new_sol(&self.provider, &self.address)
1120 }
1121 pub fn Upgraded_filter(&self) -> alloy_contract::Event<&P, Upgraded, N> {
1123 self.event_filter::<Upgraded>()
1124 }
1125 }
1126}