eigenlayer_contract_deployer/bindings/core/
emptycontract.rs

1#![allow(clippy::all, clippy::pedantic, clippy::nursery, warnings, unknown_lints, rustdoc::all, elided_lifetimes_in_paths)]
2use EmptyContract::*;
3
4/**
5
6Generated by the following Solidity interface...
7```solidity
8interface EmptyContract {
9    function foo() external pure returns (uint256);
10}
11```
12
13...which was generated by the following JSON ABI:
14```json
15[
16  {
17    "type": "function",
18    "name": "foo",
19    "inputs": [],
20    "outputs": [
21      {
22        "name": "",
23        "type": "uint256",
24        "internalType": "uint256"
25      }
26    ],
27    "stateMutability": "pure"
28  }
29]
30```*/
31#[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    /// The creation / init bytecode of the contract.
42    ///
43    /// ```text
44    ///0x6080604052348015600e575f5ffd5b50607380601a5f395ff3fe6080604052348015600e575f5ffd5b50600436106026575f3560e01c8063c298557814602a575b5f5ffd5b5f60405190815260200160405180910390f3fea26469706673582212204900a59461016f453d44104e6f0628c7e6b6b501f97b246f8690fae2ec41d65064736f6c634300081b0033
45    /// ```
46    #[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    /// The runtime bytecode of the contract, as deployed on the network.
52    ///
53    /// ```text
54    ///0x6080604052348015600e575f5ffd5b50600436106026575f3560e01c8063c298557814602a575b5f5ffd5b5f60405190815260200160405180910390f3fea26469706673582212204900a59461016f453d44104e6f0628c7e6b6b501f97b246f8690fae2ec41d65064736f6c634300081b0033
55    /// ```
56    #[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    /**Function with signature `foo()` and selector `0xc2985578`.
63```solidity
64function foo() external pure returns (uint256);
65```*/
66    #[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    ///Container type for the return parameters of the [`foo()`](fooCall) function.
71    #[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    ///Container for all the [`EmptyContract`](self) function calls.
185    #[derive()]
186    pub enum EmptyContractCalls {
187        #[allow(missing_docs)]
188        foo(fooCall),
189    }
190    #[automatically_derived]
191    impl EmptyContractCalls {
192        /// All the selectors of this enum.
193        ///
194        /// Note that the selectors might not be in the same order as the variants.
195        /// No guarantees are made about the order of the selectors.
196        ///
197        /// Prefer using `SolInterface` methods instead.
198        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    /**Creates a new wrapper around an on-chain [`EmptyContract`](self) contract instance.
273
274See the [wrapper's documentation](`EmptyContractInstance`) for more details.*/
275    #[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    /**Deploys this contract using the given `provider` and constructor arguments, if any.
287
288Returns a new instance of the contract, if the deployment was successful.
289
290For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
291    #[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    /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
304and constructor arguments, if any.
305
306This is a simple wrapper around creating a `RawCallBuilder` with the data set to
307the bytecode concatenated with the constructor's ABI-encoded arguments.*/
308    #[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    /**A [`EmptyContract`](self) instance.
317
318Contains type-safe methods for interacting with an on-chain instance of the
319[`EmptyContract`](self) contract located at a given `address`, using a given
320provider `P`.
321
322If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
323documentation on how to provide it), the `deploy` and `deploy_builder` methods can
324be used to deploy a new instance of the contract.
325
326See the [module-level documentation](self) for all the available methods.*/
327    #[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    /// Instantiation and getters/setters.
341    #[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        /**Creates a new wrapper around an on-chain [`EmptyContract`](self) contract instance.
348
349See the [wrapper's documentation](`EmptyContractInstance`) for more details.*/
350        #[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        /**Deploys this contract using the given `provider` and constructor arguments, if any.
362
363Returns a new instance of the contract, if the deployment was successful.
364
365For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
366        #[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        /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
375and constructor arguments, if any.
376
377This is a simple wrapper around creating a `RawCallBuilder` with the data set to
378the bytecode concatenated with the constructor's ABI-encoded arguments.*/
379        #[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        /// Returns a reference to the address.
387        #[inline]
388        pub const fn address(&self) -> &alloy_sol_types::private::Address {
389            &self.address
390        }
391        /// Sets the address.
392        #[inline]
393        pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
394            self.address = address;
395        }
396        /// Sets the address and returns `self`.
397        pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
398            self.set_address(address);
399            self
400        }
401        /// Returns a reference to the provider.
402        #[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        /// Clones the provider and returns a new instance with the cloned provider.
409        #[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    /// Function calls.
419    #[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        /// Creates a new call builder using this contract instance's provider and address.
426        ///
427        /// Note that the call can be any function call, not just those defined in this
428        /// contract. Prefer using the other methods for building type-safe contract calls.
429        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        ///Creates a new call builder for the [`foo`] function.
436        pub fn foo(&self) -> alloy_contract::SolCallBuilder<T, &P, fooCall, N> {
437            self.call_builder(&fooCall {})
438        }
439    }
440    /// Event filters.
441    #[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        /// Creates a new event filter using this contract instance's provider and address.
448        ///
449        /// Note that the type can be any event, not just those defined in this contract.
450        /// Prefer using the other methods for building type-safe event filters.
451        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}