eigenlayer_contract_deployer/bindings/core/
empty_contract.rs1#![allow(clippy::all, clippy::pedantic, clippy::nursery, warnings, unknown_lints, rustdoc::all, elided_lifetimes_in_paths)]
2use EmptyContract::*;
3
4#[allow(
32 non_camel_case_types,
33 non_snake_case,
34 clippy::pub_underscore_fields,
35 clippy::style,
36 clippy::empty_structs_with_brackets
37)]
38pub mod EmptyContract {
39 use super::*;
40 use alloy::sol_types as alloy_sol_types;
41 #[rustfmt::skip]
47 #[allow(clippy::all)]
48 pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
49 b"`\x80`@R4\x80\x15`\x0EW__\xFD[P`s\x80`\x1A_9_\xF3\xFE`\x80`@R4\x80\x15`\x0EW__\xFD[P`\x046\x10`&W_5`\xE0\x1C\x80c\xC2\x98Ux\x14`*W[__\xFD[_`@Q\x90\x81R` \x01`@Q\x80\x91\x03\x90\xF3\xFE\xA2dipfsX\"\x12 \x06\\\xC1\xFC!\xB4\xEB{\xC9/\x84gE3\0\x8D%~\x86P(\t\xB2S\xC8\x9C\\\xDC\xEAF;\xAFdsolcC\0\x08\x1B\x003",
50 );
51 #[rustfmt::skip]
57 #[allow(clippy::all)]
58 pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
59 b"`\x80`@R4\x80\x15`\x0EW__\xFD[P`\x046\x10`&W_5`\xE0\x1C\x80c\xC2\x98Ux\x14`*W[__\xFD[_`@Q\x90\x81R` \x01`@Q\x80\x91\x03\x90\xF3\xFE\xA2dipfsX\"\x12 \x06\\\xC1\xFC!\xB4\xEB{\xC9/\x84gE3\0\x8D%~\x86P(\t\xB2S\xC8\x9C\\\xDC\xEAF;\xAFdsolcC\0\x08\x1B\x003",
60 );
61 #[derive(serde::Serialize, serde::Deserialize)]
62 #[derive(Default, Debug, PartialEq, Eq, Hash)]
63 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
68 #[derive(Clone)]
69 pub struct fooCall;
70 #[derive(serde::Serialize, serde::Deserialize)]
71 #[derive(Default, Debug, PartialEq, Eq, Hash)]
72 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
74 #[derive(Clone)]
75 pub struct fooReturn {
76 #[allow(missing_docs)]
77 pub _0: alloy::sol_types::private::primitives::aliases::U256,
78 }
79 #[allow(
80 non_camel_case_types,
81 non_snake_case,
82 clippy::pub_underscore_fields,
83 clippy::style
84 )]
85 const _: () = {
86 use alloy::sol_types as alloy_sol_types;
87 {
88 #[doc(hidden)]
89 type UnderlyingSolTuple<'a> = ();
90 #[doc(hidden)]
91 type UnderlyingRustTuple<'a> = ();
92 #[cfg(test)]
93 #[allow(dead_code, unreachable_patterns)]
94 fn _type_assertion(
95 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
96 ) {
97 match _t {
98 alloy_sol_types::private::AssertTypeEq::<
99 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
100 >(_) => {}
101 }
102 }
103 #[automatically_derived]
104 #[doc(hidden)]
105 impl ::core::convert::From<fooCall> for UnderlyingRustTuple<'_> {
106 fn from(value: fooCall) -> Self {
107 ()
108 }
109 }
110 #[automatically_derived]
111 #[doc(hidden)]
112 impl ::core::convert::From<UnderlyingRustTuple<'_>> for fooCall {
113 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
114 Self
115 }
116 }
117 }
118 {
119 #[doc(hidden)]
120 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
121 #[doc(hidden)]
122 type UnderlyingRustTuple<'a> = (
123 alloy::sol_types::private::primitives::aliases::U256,
124 );
125 #[cfg(test)]
126 #[allow(dead_code, unreachable_patterns)]
127 fn _type_assertion(
128 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
129 ) {
130 match _t {
131 alloy_sol_types::private::AssertTypeEq::<
132 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
133 >(_) => {}
134 }
135 }
136 #[automatically_derived]
137 #[doc(hidden)]
138 impl ::core::convert::From<fooReturn> for UnderlyingRustTuple<'_> {
139 fn from(value: fooReturn) -> Self {
140 (value._0,)
141 }
142 }
143 #[automatically_derived]
144 #[doc(hidden)]
145 impl ::core::convert::From<UnderlyingRustTuple<'_>> for fooReturn {
146 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
147 Self { _0: tuple.0 }
148 }
149 }
150 }
151 #[automatically_derived]
152 impl alloy_sol_types::SolCall for fooCall {
153 type Parameters<'a> = ();
154 type Token<'a> = <Self::Parameters<
155 'a,
156 > as alloy_sol_types::SolType>::Token<'a>;
157 type Return = alloy::sol_types::private::primitives::aliases::U256;
158 type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
159 type ReturnToken<'a> = <Self::ReturnTuple<
160 'a,
161 > as alloy_sol_types::SolType>::Token<'a>;
162 const SIGNATURE: &'static str = "foo()";
163 const SELECTOR: [u8; 4] = [194u8, 152u8, 85u8, 120u8];
164 #[inline]
165 fn new<'a>(
166 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
167 ) -> Self {
168 tuple.into()
169 }
170 #[inline]
171 fn tokenize(&self) -> Self::Token<'_> {
172 ()
173 }
174 #[inline]
175 fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
176 (
177 <alloy::sol_types::sol_data::Uint<
178 256,
179 > as alloy_sol_types::SolType>::tokenize(ret),
180 )
181 }
182 #[inline]
183 fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
184 <Self::ReturnTuple<
185 '_,
186 > as alloy_sol_types::SolType>::abi_decode_sequence(data)
187 .map(|r| {
188 let r: fooReturn = r.into();
189 r._0
190 })
191 }
192 #[inline]
193 fn abi_decode_returns_validate(
194 data: &[u8],
195 ) -> alloy_sol_types::Result<Self::Return> {
196 <Self::ReturnTuple<
197 '_,
198 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
199 .map(|r| {
200 let r: fooReturn = r.into();
201 r._0
202 })
203 }
204 }
205 };
206 #[derive(serde::Serialize, serde::Deserialize)]
208 #[derive()]
209 pub enum EmptyContractCalls {
210 #[allow(missing_docs)]
211 foo(fooCall),
212 }
213 #[automatically_derived]
214 impl EmptyContractCalls {
215 pub const SELECTORS: &'static [[u8; 4usize]] = &[[194u8, 152u8, 85u8, 120u8]];
222 }
223 #[automatically_derived]
224 impl alloy_sol_types::SolInterface for EmptyContractCalls {
225 const NAME: &'static str = "EmptyContractCalls";
226 const MIN_DATA_LENGTH: usize = 0usize;
227 const COUNT: usize = 1usize;
228 #[inline]
229 fn selector(&self) -> [u8; 4] {
230 match self {
231 Self::foo(_) => <fooCall as alloy_sol_types::SolCall>::SELECTOR,
232 }
233 }
234 #[inline]
235 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
236 Self::SELECTORS.get(i).copied()
237 }
238 #[inline]
239 fn valid_selector(selector: [u8; 4]) -> bool {
240 Self::SELECTORS.binary_search(&selector).is_ok()
241 }
242 #[inline]
243 #[allow(non_snake_case)]
244 fn abi_decode_raw(
245 selector: [u8; 4],
246 data: &[u8],
247 ) -> alloy_sol_types::Result<Self> {
248 static DECODE_SHIMS: &[fn(
249 &[u8],
250 ) -> alloy_sol_types::Result<EmptyContractCalls>] = &[
251 {
252 fn foo(data: &[u8]) -> alloy_sol_types::Result<EmptyContractCalls> {
253 <fooCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
254 .map(EmptyContractCalls::foo)
255 }
256 foo
257 },
258 ];
259 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
260 return Err(
261 alloy_sol_types::Error::unknown_selector(
262 <Self as alloy_sol_types::SolInterface>::NAME,
263 selector,
264 ),
265 );
266 };
267 DECODE_SHIMS[idx](data)
268 }
269 #[inline]
270 #[allow(non_snake_case)]
271 fn abi_decode_raw_validate(
272 selector: [u8; 4],
273 data: &[u8],
274 ) -> alloy_sol_types::Result<Self> {
275 static DECODE_VALIDATE_SHIMS: &[fn(
276 &[u8],
277 ) -> alloy_sol_types::Result<EmptyContractCalls>] = &[
278 {
279 fn foo(data: &[u8]) -> alloy_sol_types::Result<EmptyContractCalls> {
280 <fooCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
281 data,
282 )
283 .map(EmptyContractCalls::foo)
284 }
285 foo
286 },
287 ];
288 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
289 return Err(
290 alloy_sol_types::Error::unknown_selector(
291 <Self as alloy_sol_types::SolInterface>::NAME,
292 selector,
293 ),
294 );
295 };
296 DECODE_VALIDATE_SHIMS[idx](data)
297 }
298 #[inline]
299 fn abi_encoded_size(&self) -> usize {
300 match self {
301 Self::foo(inner) => {
302 <fooCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
303 }
304 }
305 }
306 #[inline]
307 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
308 match self {
309 Self::foo(inner) => {
310 <fooCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
311 }
312 }
313 }
314 }
315 use alloy::contract as alloy_contract;
316 #[inline]
320 pub const fn new<
321 P: alloy_contract::private::Provider<N>,
322 N: alloy_contract::private::Network,
323 >(
324 address: alloy_sol_types::private::Address,
325 provider: P,
326 ) -> EmptyContractInstance<P, N> {
327 EmptyContractInstance::<P, N>::new(address, provider)
328 }
329 #[inline]
335 pub fn deploy<
336 P: alloy_contract::private::Provider<N>,
337 N: alloy_contract::private::Network,
338 >(
339 provider: P,
340 ) -> impl ::core::future::Future<
341 Output = alloy_contract::Result<EmptyContractInstance<P, N>>,
342 > {
343 EmptyContractInstance::<P, N>::deploy(provider)
344 }
345 #[inline]
351 pub fn deploy_builder<
352 P: alloy_contract::private::Provider<N>,
353 N: alloy_contract::private::Network,
354 >(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
355 EmptyContractInstance::<P, N>::deploy_builder(provider)
356 }
357 #[derive(Clone)]
369 pub struct EmptyContractInstance<P, N = alloy_contract::private::Ethereum> {
370 address: alloy_sol_types::private::Address,
371 provider: P,
372 _network: ::core::marker::PhantomData<N>,
373 }
374 #[automatically_derived]
375 impl<P, N> ::core::fmt::Debug for EmptyContractInstance<P, N> {
376 #[inline]
377 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
378 f.debug_tuple("EmptyContractInstance").field(&self.address).finish()
379 }
380 }
381 #[automatically_derived]
383 impl<
384 P: alloy_contract::private::Provider<N>,
385 N: alloy_contract::private::Network,
386 > EmptyContractInstance<P, N> {
387 #[inline]
391 pub const fn new(
392 address: alloy_sol_types::private::Address,
393 provider: P,
394 ) -> Self {
395 Self {
396 address,
397 provider,
398 _network: ::core::marker::PhantomData,
399 }
400 }
401 #[inline]
407 pub async fn deploy(
408 provider: P,
409 ) -> alloy_contract::Result<EmptyContractInstance<P, N>> {
410 let call_builder = Self::deploy_builder(provider);
411 let contract_address = call_builder.deploy().await?;
412 Ok(Self::new(contract_address, call_builder.provider))
413 }
414 #[inline]
420 pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
421 alloy_contract::RawCallBuilder::new_raw_deploy(
422 provider,
423 ::core::clone::Clone::clone(&BYTECODE),
424 )
425 }
426 #[inline]
428 pub const fn address(&self) -> &alloy_sol_types::private::Address {
429 &self.address
430 }
431 #[inline]
433 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
434 self.address = address;
435 }
436 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
438 self.set_address(address);
439 self
440 }
441 #[inline]
443 pub const fn provider(&self) -> &P {
444 &self.provider
445 }
446 }
447 impl<P: ::core::clone::Clone, N> EmptyContractInstance<&P, N> {
448 #[inline]
450 pub fn with_cloned_provider(self) -> EmptyContractInstance<P, N> {
451 EmptyContractInstance {
452 address: self.address,
453 provider: ::core::clone::Clone::clone(&self.provider),
454 _network: ::core::marker::PhantomData,
455 }
456 }
457 }
458 #[automatically_derived]
460 impl<
461 P: alloy_contract::private::Provider<N>,
462 N: alloy_contract::private::Network,
463 > EmptyContractInstance<P, N> {
464 pub fn call_builder<C: alloy_sol_types::SolCall>(
469 &self,
470 call: &C,
471 ) -> alloy_contract::SolCallBuilder<&P, C, N> {
472 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
473 }
474 pub fn foo(&self) -> alloy_contract::SolCallBuilder<&P, fooCall, N> {
476 self.call_builder(&fooCall)
477 }
478 }
479 #[automatically_derived]
481 impl<
482 P: alloy_contract::private::Provider<N>,
483 N: alloy_contract::private::Network,
484 > EmptyContractInstance<P, N> {
485 pub fn event_filter<E: alloy_sol_types::SolEvent>(
490 &self,
491 ) -> alloy_contract::Event<&P, E, N> {
492 alloy_contract::Event::new_sol(&self.provider, &self.address)
493 }
494 }
495}