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#\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#\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::abi_decode_raw_with_config(
194 data,
195 alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
196 )
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::abi_decode_raw_with_config(
277 data,
278 alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
279 )
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::abi_decode_raw_with_config(
351 data,
352 alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
353 )
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::abi_decode_raw_with_config(
425 data,
426 alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
427 )
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(Clone)]
623 #[derive(serde::Serialize, serde::Deserialize)]
624 #[derive(Debug, PartialEq, Eq, Hash)]
625 pub enum ERC1967ProxyErrors {
626 #[allow(missing_docs)]
627 AddressEmptyCode(AddressEmptyCode),
628 #[allow(missing_docs)]
629 ERC1967InvalidImplementation(ERC1967InvalidImplementation),
630 #[allow(missing_docs)]
631 ERC1967NonPayable(ERC1967NonPayable),
632 #[allow(missing_docs)]
633 FailedInnerCall(FailedInnerCall),
634 }
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 pub const VARIANT_NAMES: &'static [&'static str] = &[
650 ::core::stringify!(FailedInnerCall),
651 ::core::stringify!(ERC1967InvalidImplementation),
652 ::core::stringify!(AddressEmptyCode),
653 ::core::stringify!(ERC1967NonPayable),
654 ];
655 pub const SIGNATURES: &'static [&'static str] = &[
657 <FailedInnerCall as alloy_sol_types::SolError>::SIGNATURE,
658 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::SIGNATURE,
659 <AddressEmptyCode as alloy_sol_types::SolError>::SIGNATURE,
660 <ERC1967NonPayable as alloy_sol_types::SolError>::SIGNATURE,
661 ];
662 #[inline]
664 pub fn signature_by_selector(
665 selector: [u8; 4usize],
666 ) -> ::core::option::Option<&'static str> {
667 match Self::SELECTORS.binary_search(&selector) {
668 ::core::result::Result::Ok(idx) => {
669 ::core::option::Option::Some(Self::SIGNATURES[idx])
670 }
671 ::core::result::Result::Err(_) => ::core::option::Option::None,
672 }
673 }
674 #[inline]
676 pub fn name_by_selector(
677 selector: [u8; 4usize],
678 ) -> ::core::option::Option<&'static str> {
679 let sig = Self::signature_by_selector(selector)?;
680 sig.split_once('(').map(|(name, _)| name)
681 }
682 }
683 #[automatically_derived]
684 impl alloy_sol_types::SolInterface for ERC1967ProxyErrors {
685 const NAME: &'static str = "ERC1967ProxyErrors";
686 const MIN_DATA_LENGTH: usize = 0usize;
687 const COUNT: usize = 4usize;
688 #[inline]
689 fn selector(&self) -> [u8; 4] {
690 match self {
691 Self::AddressEmptyCode(_) => {
692 <AddressEmptyCode as alloy_sol_types::SolError>::SELECTOR
693 }
694 Self::ERC1967InvalidImplementation(_) => {
695 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::SELECTOR
696 }
697 Self::ERC1967NonPayable(_) => {
698 <ERC1967NonPayable as alloy_sol_types::SolError>::SELECTOR
699 }
700 Self::FailedInnerCall(_) => {
701 <FailedInnerCall as alloy_sol_types::SolError>::SELECTOR
702 }
703 }
704 }
705 #[inline]
706 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
707 Self::SELECTORS.get(i).copied()
708 }
709 #[inline]
710 fn valid_selector(selector: [u8; 4]) -> bool {
711 Self::SELECTORS.binary_search(&selector).is_ok()
712 }
713 #[inline]
714 #[allow(non_snake_case)]
715 fn abi_decode_raw(
716 selector: [u8; 4],
717 data: &[u8],
718 ) -> alloy_sol_types::Result<Self> {
719 Self::abi_decode_raw_with_config(
720 selector,
721 data,
722 alloy_sol_types::abi::AbiDecoderConfig::default(),
723 )
724 }
725 #[inline]
726 #[allow(non_snake_case)]
727 fn abi_decode_raw_with_config(
728 selector: [u8; 4],
729 data: &[u8],
730 config: alloy_sol_types::abi::AbiDecoderConfig,
731 ) -> alloy_sol_types::Result<Self> {
732 static DECODE_SHIMS: &[fn(
733 &[u8],
734 alloy_sol_types::abi::AbiDecoderConfig,
735 ) -> alloy_sol_types::Result<ERC1967ProxyErrors>] = &[
736 {
737 fn FailedInnerCall(
738 data: &[u8],
739 config: alloy_sol_types::abi::AbiDecoderConfig,
740 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
741 <FailedInnerCall as alloy_sol_types::SolError>::abi_decode_raw_with_config(
742 data,
743 config,
744 )
745 .map(ERC1967ProxyErrors::FailedInnerCall)
746 }
747 FailedInnerCall
748 },
749 {
750 fn ERC1967InvalidImplementation(
751 data: &[u8],
752 config: alloy_sol_types::abi::AbiDecoderConfig,
753 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
754 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_decode_raw_with_config(
755 data,
756 config,
757 )
758 .map(ERC1967ProxyErrors::ERC1967InvalidImplementation)
759 }
760 ERC1967InvalidImplementation
761 },
762 {
763 fn AddressEmptyCode(
764 data: &[u8],
765 config: alloy_sol_types::abi::AbiDecoderConfig,
766 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
767 <AddressEmptyCode as alloy_sol_types::SolError>::abi_decode_raw_with_config(
768 data,
769 config,
770 )
771 .map(ERC1967ProxyErrors::AddressEmptyCode)
772 }
773 AddressEmptyCode
774 },
775 {
776 fn ERC1967NonPayable(
777 data: &[u8],
778 config: alloy_sol_types::abi::AbiDecoderConfig,
779 ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
780 <ERC1967NonPayable as alloy_sol_types::SolError>::abi_decode_raw_with_config(
781 data,
782 config,
783 )
784 .map(ERC1967ProxyErrors::ERC1967NonPayable)
785 }
786 ERC1967NonPayable
787 },
788 ];
789 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
790 return Err(
791 alloy_sol_types::Error::unknown_selector(
792 <Self as alloy_sol_types::SolInterface>::NAME,
793 selector,
794 ),
795 );
796 };
797 DECODE_SHIMS[idx](data, config)
798 }
799 #[inline]
800 #[allow(non_snake_case)]
801 fn abi_decode_raw_validate(
802 selector: [u8; 4],
803 data: &[u8],
804 ) -> alloy_sol_types::Result<Self> {
805 Self::abi_decode_raw_with_config(
806 selector,
807 data,
808 alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
809 )
810 }
811 #[inline]
812 fn abi_encoded_size(&self) -> usize {
813 match self {
814 Self::AddressEmptyCode(inner) => {
815 <AddressEmptyCode as alloy_sol_types::SolError>::abi_encoded_size(
816 inner,
817 )
818 }
819 Self::ERC1967InvalidImplementation(inner) => {
820 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encoded_size(
821 inner,
822 )
823 }
824 Self::ERC1967NonPayable(inner) => {
825 <ERC1967NonPayable as alloy_sol_types::SolError>::abi_encoded_size(
826 inner,
827 )
828 }
829 Self::FailedInnerCall(inner) => {
830 <FailedInnerCall as alloy_sol_types::SolError>::abi_encoded_size(
831 inner,
832 )
833 }
834 }
835 }
836 #[inline]
837 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
838 match self {
839 Self::AddressEmptyCode(inner) => {
840 <AddressEmptyCode as alloy_sol_types::SolError>::abi_encode_raw(
841 inner,
842 out,
843 )
844 }
845 Self::ERC1967InvalidImplementation(inner) => {
846 <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encode_raw(
847 inner,
848 out,
849 )
850 }
851 Self::ERC1967NonPayable(inner) => {
852 <ERC1967NonPayable as alloy_sol_types::SolError>::abi_encode_raw(
853 inner,
854 out,
855 )
856 }
857 Self::FailedInnerCall(inner) => {
858 <FailedInnerCall as alloy_sol_types::SolError>::abi_encode_raw(
859 inner,
860 out,
861 )
862 }
863 }
864 }
865 }
866 #[automatically_derived]
867 impl ERC1967ProxyErrors {
868 #[inline]
874 pub fn address_empty_code(target: alloy::sol_types::private::Address) -> Self {
875 Self::AddressEmptyCode(AddressEmptyCode { target: target })
876 }
877 #[inline]
883 pub fn erc_1967_invalid_implementation(
884 implementation: alloy::sol_types::private::Address,
885 ) -> Self {
886 Self::ERC1967InvalidImplementation(ERC1967InvalidImplementation {
887 implementation: implementation,
888 })
889 }
890 #[inline]
896 pub fn erc_1967_non_payable() -> Self {
897 Self::ERC1967NonPayable(ERC1967NonPayable)
898 }
899 #[inline]
905 pub fn failed_inner_call() -> Self {
906 Self::FailedInnerCall(FailedInnerCall)
907 }
908 }
909 #[derive(Clone)]
911 #[derive(serde::Serialize, serde::Deserialize)]
912 #[derive(Debug, PartialEq, Eq, Hash)]
913 pub enum ERC1967ProxyEvents {
914 #[allow(missing_docs)]
915 Upgraded(Upgraded),
916 }
917 impl ERC1967ProxyEvents {
918 pub const SELECTORS: &'static [[u8; 32usize]] = &[
925 [
926 188u8, 124u8, 215u8, 90u8, 32u8, 238u8, 39u8, 253u8, 154u8, 222u8, 186u8,
927 179u8, 32u8, 65u8, 247u8, 85u8, 33u8, 77u8, 188u8, 107u8, 255u8, 169u8,
928 12u8, 192u8, 34u8, 91u8, 57u8, 218u8, 46u8, 92u8, 45u8, 59u8,
929 ],
930 ];
931 pub const VARIANT_NAMES: &'static [&'static str] = &[
933 ::core::stringify!(Upgraded),
934 ];
935 pub const SIGNATURES: &'static [&'static str] = &[
937 <Upgraded as alloy_sol_types::SolEvent>::SIGNATURE,
938 ];
939 #[inline]
941 pub fn signature_by_selector(
942 selector: [u8; 32usize],
943 ) -> ::core::option::Option<&'static str> {
944 match Self::SELECTORS.binary_search(&selector) {
945 ::core::result::Result::Ok(idx) => {
946 ::core::option::Option::Some(Self::SIGNATURES[idx])
947 }
948 ::core::result::Result::Err(_) => ::core::option::Option::None,
949 }
950 }
951 #[inline]
953 pub fn name_by_selector(
954 selector: [u8; 32usize],
955 ) -> ::core::option::Option<&'static str> {
956 let sig = Self::signature_by_selector(selector)?;
957 sig.split_once('(').map(|(name, _)| name)
958 }
959 }
960 #[automatically_derived]
961 impl alloy_sol_types::SolEventInterface for ERC1967ProxyEvents {
962 const NAME: &'static str = "ERC1967ProxyEvents";
963 const COUNT: usize = 1usize;
964 fn decode_raw_log(
965 topics: &[alloy_sol_types::Word],
966 data: &[u8],
967 ) -> alloy_sol_types::Result<Self> {
968 <Self as alloy_sol_types::SolEventInterface>::decode_raw_log_with_config(
969 topics,
970 data,
971 alloy_sol_types::abi::AbiDecoderConfig::default(),
972 )
973 }
974 fn decode_raw_log_with_config(
975 topics: &[alloy_sol_types::Word],
976 data: &[u8],
977 config: alloy_sol_types::abi::AbiDecoderConfig,
978 ) -> alloy_sol_types::Result<Self> {
979 match topics.first().copied() {
980 Some(<Upgraded as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
981 <Upgraded as alloy_sol_types::SolEvent>::decode_raw_log_with_config(
982 topics,
983 data,
984 config,
985 )
986 .map(Self::Upgraded)
987 }
988 _ => {
989 if topics
990 .len()
991 .checked_mul(alloy_sol_types::Word::len_bytes())
992 .and_then(|len| len.checked_add(data.len()))
993 .is_none_or(|len| len > config.get_memory_limit())
994 {
995 return alloy_sol_types::private::Err(
996 alloy_sol_types::Error::MemoryLimitExceeded(
997 config.get_memory_limit(),
998 ),
999 );
1000 }
1001 alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
1002 name: <Self as alloy_sol_types::SolEventInterface>::NAME,
1003 log: alloy_sol_types::private::Box::new(
1004 alloy_sol_types::private::LogData::new_unchecked(
1005 topics.to_vec(),
1006 data.to_vec().into(),
1007 ),
1008 ),
1009 })
1010 }
1011 }
1012 }
1013 }
1014 #[automatically_derived]
1015 impl alloy_sol_types::private::IntoLogData for ERC1967ProxyEvents {
1016 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
1017 match self {
1018 Self::Upgraded(inner) => {
1019 alloy_sol_types::private::IntoLogData::to_log_data(inner)
1020 }
1021 }
1022 }
1023 fn into_log_data(self) -> alloy_sol_types::private::LogData {
1024 match self {
1025 Self::Upgraded(inner) => {
1026 alloy_sol_types::private::IntoLogData::into_log_data(inner)
1027 }
1028 }
1029 }
1030 }
1031 #[automatically_derived]
1032 impl ERC1967ProxyEvents {
1033 #[inline]
1039 pub fn upgraded(implementation: alloy::sol_types::private::Address) -> Self {
1040 Self::Upgraded(Upgraded {
1041 implementation: implementation,
1042 })
1043 }
1044 }
1045 use alloy::contract as alloy_contract;
1046 #[inline]
1050 pub const fn new<
1051 P: alloy_contract::private::Provider<N>,
1052 N: alloy_contract::private::Network,
1053 >(
1054 address: alloy_sol_types::private::Address,
1055 __provider: P,
1056 ) -> ERC1967ProxyInstance<P, N> {
1057 ERC1967ProxyInstance::<P, N>::new(address, __provider)
1058 }
1059 #[inline]
1065 pub fn deploy<
1066 P: alloy_contract::private::Provider<N>,
1067 N: alloy_contract::private::Network,
1068 >(
1069 __provider: P,
1070 implementation: alloy::sol_types::private::Address,
1071 _data: alloy::sol_types::private::Bytes,
1072 ) -> impl ::core::future::Future<
1073 Output = alloy_contract::Result<ERC1967ProxyInstance<P, N>>,
1074 > {
1075 ERC1967ProxyInstance::<P, N>::deploy(__provider, implementation, _data)
1076 }
1077 #[inline]
1083 pub fn deploy_builder<
1084 P: alloy_contract::private::Provider<N>,
1085 N: alloy_contract::private::Network,
1086 >(
1087 __provider: P,
1088 implementation: alloy::sol_types::private::Address,
1089 _data: alloy::sol_types::private::Bytes,
1090 ) -> alloy_contract::RawCallBuilder<P, N> {
1091 ERC1967ProxyInstance::<P, N>::deploy_builder(__provider, implementation, _data)
1092 }
1093 #[derive(Clone)]
1105 pub struct ERC1967ProxyInstance<P, N = alloy_contract::private::Ethereum> {
1106 address: alloy_sol_types::private::Address,
1107 provider: P,
1108 _network: ::core::marker::PhantomData<N>,
1109 }
1110 #[automatically_derived]
1111 impl<P, N> ::core::fmt::Debug for ERC1967ProxyInstance<P, N> {
1112 #[inline]
1113 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1114 f.debug_tuple("ERC1967ProxyInstance").field(&self.address).finish()
1115 }
1116 }
1117 impl<
1119 P: alloy_contract::private::Provider<N>,
1120 N: alloy_contract::private::Network,
1121 > ERC1967ProxyInstance<P, N> {
1122 #[inline]
1126 pub const fn new(
1127 address: alloy_sol_types::private::Address,
1128 __provider: P,
1129 ) -> Self {
1130 Self {
1131 address,
1132 provider: __provider,
1133 _network: ::core::marker::PhantomData,
1134 }
1135 }
1136 #[inline]
1142 pub async fn deploy(
1143 __provider: P,
1144 implementation: alloy::sol_types::private::Address,
1145 _data: alloy::sol_types::private::Bytes,
1146 ) -> alloy_contract::Result<ERC1967ProxyInstance<P, N>> {
1147 let call_builder = Self::deploy_builder(__provider, implementation, _data);
1148 let contract_address = call_builder.deploy().await?;
1149 Ok(Self::new(contract_address, call_builder.provider))
1150 }
1151 #[inline]
1157 pub fn deploy_builder(
1158 __provider: P,
1159 implementation: alloy::sol_types::private::Address,
1160 _data: alloy::sol_types::private::Bytes,
1161 ) -> alloy_contract::RawCallBuilder<P, N> {
1162 alloy_contract::RawCallBuilder::new_raw_deploy(
1163 __provider,
1164 [
1165 &BYTECODE[..],
1166 &alloy_sol_types::SolConstructor::abi_encode(
1167 &constructorCall {
1168 implementation,
1169 _data,
1170 },
1171 )[..],
1172 ]
1173 .concat()
1174 .into(),
1175 )
1176 }
1177 #[inline]
1179 pub const fn address(&self) -> &alloy_sol_types::private::Address {
1180 &self.address
1181 }
1182 #[inline]
1184 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
1185 self.address = address;
1186 }
1187 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
1189 self.set_address(address);
1190 self
1191 }
1192 #[inline]
1194 pub const fn provider(&self) -> &P {
1195 &self.provider
1196 }
1197 }
1198 impl<P: ::core::clone::Clone, N> ERC1967ProxyInstance<&P, N> {
1199 #[inline]
1201 pub fn with_cloned_provider(self) -> ERC1967ProxyInstance<P, N> {
1202 ERC1967ProxyInstance {
1203 address: self.address,
1204 provider: ::core::clone::Clone::clone(&self.provider),
1205 _network: ::core::marker::PhantomData,
1206 }
1207 }
1208 }
1209 impl<
1211 P: alloy_contract::private::Provider<N>,
1212 N: alloy_contract::private::Network,
1213 > ERC1967ProxyInstance<P, N> {
1214 pub fn call_builder<C: alloy_sol_types::SolCall>(
1219 &self,
1220 call: &C,
1221 ) -> alloy_contract::SolCallBuilder<&P, C, N> {
1222 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
1223 }
1224 }
1225 impl<
1227 P: alloy_contract::private::Provider<N>,
1228 N: alloy_contract::private::Network,
1229 > ERC1967ProxyInstance<P, N> {
1230 pub fn event_filter<E: alloy_sol_types::SolEvent>(
1235 &self,
1236 ) -> alloy_contract::Event<&P, E, N> {
1237 alloy_contract::Event::new_sol(&self.provider, &self.address)
1238 }
1239 pub fn Upgraded_filter(&self) -> alloy_contract::Event<&P, Upgraded, N> {
1241 self.event_filter::<Upgraded>()
1242 }
1243 }
1244}