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