1#![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 I\0\xA5\x94a\x01oE=D\x10No\x06(\xC7\xE6\xB6\xB5\x01\xF9{$o\x86\x90\xFA\xE2\xECA\xD6PdsolcC\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 I\0\xA5\x94a\x01oE=D\x10No\x06(\xC7\xE6\xB6\xB5\x01\xF9{$o\x86\x90\xFA\xE2\xECA\xD6PdsolcC\0\x08\x1B\x003",
60 );
61 #[derive(Default, Debug, PartialEq, Eq, Hash)]
62 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
67 #[derive(Clone)]
68 pub struct fooCall {}
69 #[derive(Default, Debug, PartialEq, Eq, Hash)]
70 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
72 #[derive(Clone)]
73 pub struct fooReturn {
74 #[allow(missing_docs)]
75 pub _0: alloy::sol_types::private::primitives::aliases::U256,
76 }
77 #[allow(
78 non_camel_case_types,
79 non_snake_case,
80 clippy::pub_underscore_fields,
81 clippy::style
82 )]
83 const _: () = {
84 use alloy::sol_types as alloy_sol_types;
85 {
86 #[doc(hidden)]
87 type UnderlyingSolTuple<'a> = ();
88 #[doc(hidden)]
89 type UnderlyingRustTuple<'a> = ();
90 #[cfg(test)]
91 #[allow(dead_code, unreachable_patterns)]
92 fn _type_assertion(
93 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
94 ) {
95 match _t {
96 alloy_sol_types::private::AssertTypeEq::<
97 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
98 >(_) => {}
99 }
100 }
101 #[automatically_derived]
102 #[doc(hidden)]
103 impl ::core::convert::From<fooCall> for UnderlyingRustTuple<'_> {
104 fn from(value: fooCall) -> Self {
105 ()
106 }
107 }
108 #[automatically_derived]
109 #[doc(hidden)]
110 impl ::core::convert::From<UnderlyingRustTuple<'_>> for fooCall {
111 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
112 Self {}
113 }
114 }
115 }
116 {
117 #[doc(hidden)]
118 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
119 #[doc(hidden)]
120 type UnderlyingRustTuple<'a> = (
121 alloy::sol_types::private::primitives::aliases::U256,
122 );
123 #[cfg(test)]
124 #[allow(dead_code, unreachable_patterns)]
125 fn _type_assertion(
126 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
127 ) {
128 match _t {
129 alloy_sol_types::private::AssertTypeEq::<
130 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
131 >(_) => {}
132 }
133 }
134 #[automatically_derived]
135 #[doc(hidden)]
136 impl ::core::convert::From<fooReturn> for UnderlyingRustTuple<'_> {
137 fn from(value: fooReturn) -> Self {
138 (value._0,)
139 }
140 }
141 #[automatically_derived]
142 #[doc(hidden)]
143 impl ::core::convert::From<UnderlyingRustTuple<'_>> for fooReturn {
144 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
145 Self { _0: tuple.0 }
146 }
147 }
148 }
149 #[automatically_derived]
150 impl alloy_sol_types::SolCall for fooCall {
151 type Parameters<'a> = ();
152 type Token<'a> = <Self::Parameters<
153 'a,
154 > as alloy_sol_types::SolType>::Token<'a>;
155 type Return = fooReturn;
156 type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
157 type ReturnToken<'a> = <Self::ReturnTuple<
158 'a,
159 > as alloy_sol_types::SolType>::Token<'a>;
160 const SIGNATURE: &'static str = "foo()";
161 const SELECTOR: [u8; 4] = [194u8, 152u8, 85u8, 120u8];
162 #[inline]
163 fn new<'a>(
164 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
165 ) -> Self {
166 tuple.into()
167 }
168 #[inline]
169 fn tokenize(&self) -> Self::Token<'_> {
170 ()
171 }
172 #[inline]
173 fn abi_decode_returns(
174 data: &[u8],
175 validate: bool,
176 ) -> alloy_sol_types::Result<Self::Return> {
177 <Self::ReturnTuple<
178 '_,
179 > as alloy_sol_types::SolType>::abi_decode_sequence(data, validate)
180 .map(Into::into)
181 }
182 }
183 };
184 #[derive()]
186 pub enum EmptyContractCalls {
187 #[allow(missing_docs)]
188 foo(fooCall),
189 }
190 #[automatically_derived]
191 impl EmptyContractCalls {
192 pub const SELECTORS: &'static [[u8; 4usize]] = &[[194u8, 152u8, 85u8, 120u8]];
199 }
200 #[automatically_derived]
201 impl alloy_sol_types::SolInterface for EmptyContractCalls {
202 const NAME: &'static str = "EmptyContractCalls";
203 const MIN_DATA_LENGTH: usize = 0usize;
204 const COUNT: usize = 1usize;
205 #[inline]
206 fn selector(&self) -> [u8; 4] {
207 match self {
208 Self::foo(_) => <fooCall as alloy_sol_types::SolCall>::SELECTOR,
209 }
210 }
211 #[inline]
212 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
213 Self::SELECTORS.get(i).copied()
214 }
215 #[inline]
216 fn valid_selector(selector: [u8; 4]) -> bool {
217 Self::SELECTORS.binary_search(&selector).is_ok()
218 }
219 #[inline]
220 #[allow(non_snake_case)]
221 fn abi_decode_raw(
222 selector: [u8; 4],
223 data: &[u8],
224 validate: bool,
225 ) -> alloy_sol_types::Result<Self> {
226 static DECODE_SHIMS: &[fn(
227 &[u8],
228 bool,
229 ) -> alloy_sol_types::Result<EmptyContractCalls>] = &[
230 {
231 fn foo(
232 data: &[u8],
233 validate: bool,
234 ) -> alloy_sol_types::Result<EmptyContractCalls> {
235 <fooCall as alloy_sol_types::SolCall>::abi_decode_raw(
236 data,
237 validate,
238 )
239 .map(EmptyContractCalls::foo)
240 }
241 foo
242 },
243 ];
244 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
245 return Err(
246 alloy_sol_types::Error::unknown_selector(
247 <Self as alloy_sol_types::SolInterface>::NAME,
248 selector,
249 ),
250 );
251 };
252 DECODE_SHIMS[idx](data, validate)
253 }
254 #[inline]
255 fn abi_encoded_size(&self) -> usize {
256 match self {
257 Self::foo(inner) => {
258 <fooCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
259 }
260 }
261 }
262 #[inline]
263 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
264 match self {
265 Self::foo(inner) => {
266 <fooCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
267 }
268 }
269 }
270 }
271 use alloy::contract as alloy_contract;
272 #[inline]
276 pub const fn new<
277 T: alloy_contract::private::Transport + ::core::clone::Clone,
278 P: alloy_contract::private::Provider<T, N>,
279 N: alloy_contract::private::Network,
280 >(
281 address: alloy_sol_types::private::Address,
282 provider: P,
283 ) -> EmptyContractInstance<T, P, N> {
284 EmptyContractInstance::<T, P, N>::new(address, provider)
285 }
286 #[inline]
292 pub fn deploy<
293 T: alloy_contract::private::Transport + ::core::clone::Clone,
294 P: alloy_contract::private::Provider<T, N>,
295 N: alloy_contract::private::Network,
296 >(
297 provider: P,
298 ) -> impl ::core::future::Future<
299 Output = alloy_contract::Result<EmptyContractInstance<T, P, N>>,
300 > {
301 EmptyContractInstance::<T, P, N>::deploy(provider)
302 }
303 #[inline]
309 pub fn deploy_builder<
310 T: alloy_contract::private::Transport + ::core::clone::Clone,
311 P: alloy_contract::private::Provider<T, N>,
312 N: alloy_contract::private::Network,
313 >(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
314 EmptyContractInstance::<T, P, N>::deploy_builder(provider)
315 }
316 #[derive(Clone)]
328 pub struct EmptyContractInstance<T, P, N = alloy_contract::private::Ethereum> {
329 address: alloy_sol_types::private::Address,
330 provider: P,
331 _network_transport: ::core::marker::PhantomData<(N, T)>,
332 }
333 #[automatically_derived]
334 impl<T, P, N> ::core::fmt::Debug for EmptyContractInstance<T, P, N> {
335 #[inline]
336 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
337 f.debug_tuple("EmptyContractInstance").field(&self.address).finish()
338 }
339 }
340 #[automatically_derived]
342 impl<
343 T: alloy_contract::private::Transport + ::core::clone::Clone,
344 P: alloy_contract::private::Provider<T, N>,
345 N: alloy_contract::private::Network,
346 > EmptyContractInstance<T, P, N> {
347 #[inline]
351 pub const fn new(
352 address: alloy_sol_types::private::Address,
353 provider: P,
354 ) -> Self {
355 Self {
356 address,
357 provider,
358 _network_transport: ::core::marker::PhantomData,
359 }
360 }
361 #[inline]
367 pub async fn deploy(
368 provider: P,
369 ) -> alloy_contract::Result<EmptyContractInstance<T, P, N>> {
370 let call_builder = Self::deploy_builder(provider);
371 let contract_address = call_builder.deploy().await?;
372 Ok(Self::new(contract_address, call_builder.provider))
373 }
374 #[inline]
380 pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
381 alloy_contract::RawCallBuilder::new_raw_deploy(
382 provider,
383 ::core::clone::Clone::clone(&BYTECODE),
384 )
385 }
386 #[inline]
388 pub const fn address(&self) -> &alloy_sol_types::private::Address {
389 &self.address
390 }
391 #[inline]
393 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
394 self.address = address;
395 }
396 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
398 self.set_address(address);
399 self
400 }
401 #[inline]
403 pub const fn provider(&self) -> &P {
404 &self.provider
405 }
406 }
407 impl<T, P: ::core::clone::Clone, N> EmptyContractInstance<T, &P, N> {
408 #[inline]
410 pub fn with_cloned_provider(self) -> EmptyContractInstance<T, P, N> {
411 EmptyContractInstance {
412 address: self.address,
413 provider: ::core::clone::Clone::clone(&self.provider),
414 _network_transport: ::core::marker::PhantomData,
415 }
416 }
417 }
418 #[automatically_derived]
420 impl<
421 T: alloy_contract::private::Transport + ::core::clone::Clone,
422 P: alloy_contract::private::Provider<T, N>,
423 N: alloy_contract::private::Network,
424 > EmptyContractInstance<T, P, N> {
425 pub fn call_builder<C: alloy_sol_types::SolCall>(
430 &self,
431 call: &C,
432 ) -> alloy_contract::SolCallBuilder<T, &P, C, N> {
433 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
434 }
435 pub fn foo(&self) -> alloy_contract::SolCallBuilder<T, &P, fooCall, N> {
437 self.call_builder(&fooCall {})
438 }
439 }
440 #[automatically_derived]
442 impl<
443 T: alloy_contract::private::Transport + ::core::clone::Clone,
444 P: alloy_contract::private::Provider<T, N>,
445 N: alloy_contract::private::Network,
446 > EmptyContractInstance<T, P, N> {
447 pub fn event_filter<E: alloy_sol_types::SolEvent>(
452 &self,
453 ) -> alloy_contract::Event<T, &P, E, N> {
454 alloy_contract::Event::new_sol(&self.provider, &self.address)
455 }
456 }
457}