Skip to main content

hotshot_contract_adapter/bindings/
erc1967_proxy.rs

1/**
2
3Generated by the following Solidity interface...
4```solidity
5interface ERC1967Proxy {
6    error AddressEmptyCode(address target);
7    error ERC1967InvalidImplementation(address implementation);
8    error ERC1967NonPayable();
9    error FailedInnerCall();
10
11    event Upgraded(address indexed implementation);
12
13    constructor(address implementation, bytes _data) payable;
14
15    fallback() external payable;
16}
17```
18
19...which was generated by the following JSON ABI:
20```json
21[
22  {
23    "type": "constructor",
24    "inputs": [
25      {
26        "name": "implementation",
27        "type": "address",
28        "internalType": "address"
29      },
30      {
31        "name": "_data",
32        "type": "bytes",
33        "internalType": "bytes"
34      }
35    ],
36    "stateMutability": "payable"
37  },
38  {
39    "type": "fallback",
40    "stateMutability": "payable"
41  },
42  {
43    "type": "event",
44    "name": "Upgraded",
45    "inputs": [
46      {
47        "name": "implementation",
48        "type": "address",
49        "indexed": true,
50        "internalType": "address"
51      }
52    ],
53    "anonymous": false
54  },
55  {
56    "type": "error",
57    "name": "AddressEmptyCode",
58    "inputs": [
59      {
60        "name": "target",
61        "type": "address",
62        "internalType": "address"
63      }
64    ]
65  },
66  {
67    "type": "error",
68    "name": "ERC1967InvalidImplementation",
69    "inputs": [
70      {
71        "name": "implementation",
72        "type": "address",
73        "internalType": "address"
74      }
75    ]
76  },
77  {
78    "type": "error",
79    "name": "ERC1967NonPayable",
80    "inputs": []
81  },
82  {
83    "type": "error",
84    "name": "FailedInnerCall",
85    "inputs": []
86  }
87]
88```*/
89#[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    /// The creation / init bytecode of the contract.
100    ///
101    /// ```text
102    ///0x60806040526040516103a73803806103a78339810160408190526100229161023c565b61002c8282610033565b5050610321565b61003c82610091565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a280511561008557610080828261010c565b505050565b61008d61017f565b5050565b806001600160a01b03163b5f036100cb57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60605f5f846001600160a01b031684604051610128919061030b565b5f60405180830381855af49150503d805f8114610160576040519150601f19603f3d011682016040523d82523d5f602084013e610165565b606091505b5090925090506101768583836101a0565b95945050505050565b341561019e5760405163b398979f60e01b815260040160405180910390fd5b565b6060826101b5576101b0826101ff565b6101f8565b81511580156101cc57506001600160a01b0384163b155b156101f557604051639996b31560e01b81526001600160a01b03851660048201526024016100c2565b50805b9392505050565b80511561020f5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561024d575f5ffd5b82516001600160a01b0381168114610263575f5ffd5b60208401519092506001600160401b0381111561027e575f5ffd5b8301601f8101851361028e575f5ffd5b80516001600160401b038111156102a7576102a7610228565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102d5576102d5610228565b6040528181528282016020018710156102ec575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b5f82518060208501845e5f920191825250919050565b607a8061032d5f395ff3fe6080604052600a600c565b005b60186014601a565b6050565b565b5f604b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b365f5f375f5f365f845af43d5f5f3e8080156069573d5ff35b3d5ffdfea164736f6c6343000823000a
103    /// ```
104    #[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    /// The runtime bytecode of the contract, as deployed on the network.
110    ///
111    /// ```text
112    ///0x6080604052600a600c565b005b60186014601a565b6050565b565b5f604b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b365f5f375f5f365f845af43d5f5f3e8080156069573d5ff35b3d5ffdfea164736f6c6343000823000a
113    /// ```
114    #[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    /**Custom error with signature `AddressEmptyCode(address)` and selector `0x9996b315`.
122```solidity
123error AddressEmptyCode(address target);
124```*/
125    #[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    /**Custom error with signature `ERC1967InvalidImplementation(address)` and selector `0x4c9c8ce3`.
203```solidity
204error ERC1967InvalidImplementation(address implementation);
205```*/
206    #[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    /**Custom error with signature `ERC1967NonPayable()` and selector `0xb398979f`.
286```solidity
287error ERC1967NonPayable();
288```*/
289    #[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    /**Custom error with signature `FailedInnerCall()` and selector `0x1425ea42`.
360```solidity
361error FailedInnerCall();
362```*/
363    #[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    /**Event with signature `Upgraded(address)` and selector `0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b`.
434```solidity
435event Upgraded(address indexed implementation);
436```*/
437    #[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    /**Constructor`.
539```solidity
540constructor(address implementation, bytes _data) payable;
541```*/
542    #[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    ///Container for all the [`ERC1967Proxy`](self) custom errors.
622    #[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        /// All the selectors of this enum.
637        ///
638        /// Note that the selectors might not be in the same order as the variants.
639        /// No guarantees are made about the order of the selectors.
640        ///
641        /// Prefer using `SolInterface` methods instead.
642        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        /// The names of the variants in the same order as `SELECTORS`.
649        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        /// The signatures in the same order as `SELECTORS`.
656        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        /// Returns the signature for the given selector, if known.
663        #[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        /// Returns the enum variant name for the given selector, if known.
675        #[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        /**Creates a [`AddressEmptyCode`] error.
869
870```solidity
871error AddressEmptyCode(address)
872```*/
873        #[inline]
874        pub fn address_empty_code(target: alloy::sol_types::private::Address) -> Self {
875            Self::AddressEmptyCode(AddressEmptyCode { target: target })
876        }
877        /**Creates a [`ERC1967InvalidImplementation`] error.
878
879```solidity
880error ERC1967InvalidImplementation(address)
881```*/
882        #[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        /**Creates a [`ERC1967NonPayable`] error.
891
892```solidity
893error ERC1967NonPayable()
894```*/
895        #[inline]
896        pub fn erc_1967_non_payable() -> Self {
897            Self::ERC1967NonPayable(ERC1967NonPayable)
898        }
899        /**Creates a [`FailedInnerCall`] error.
900
901```solidity
902error FailedInnerCall()
903```*/
904        #[inline]
905        pub fn failed_inner_call() -> Self {
906            Self::FailedInnerCall(FailedInnerCall)
907        }
908    }
909    ///Container for all the [`ERC1967Proxy`](self) events.
910    #[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        /// All the selectors of this enum.
919        ///
920        /// Note that the selectors might not be in the same order as the variants.
921        /// No guarantees are made about the order of the selectors.
922        ///
923        /// Prefer using `SolInterface` methods instead.
924        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        /// The names of the variants in the same order as `SELECTORS`.
932        pub const VARIANT_NAMES: &'static [&'static str] = &[
933            ::core::stringify!(Upgraded),
934        ];
935        /// The signatures in the same order as `SELECTORS`.
936        pub const SIGNATURES: &'static [&'static str] = &[
937            <Upgraded as alloy_sol_types::SolEvent>::SIGNATURE,
938        ];
939        /// Returns the signature for the given selector, if known.
940        #[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        /// Returns the enum variant name for the given selector, if known.
952        #[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        /**Creates a [`Upgraded`] event.
1034
1035```solidity
1036event Upgraded(address)
1037```*/
1038        #[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    /**Creates a new wrapper around an on-chain [`ERC1967Proxy`](self) contract instance.
1047
1048See the [wrapper's documentation](`ERC1967ProxyInstance`) for more details.*/
1049    #[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    /**Deploys this contract using the given `provider` and constructor arguments, if any.
1060
1061Returns a new instance of the contract, if the deployment was successful.
1062
1063For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
1064    #[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    /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
1078and constructor arguments, if any.
1079
1080This is a simple wrapper around creating a `RawCallBuilder` with the data set to
1081the bytecode concatenated with the constructor's ABI-encoded arguments.*/
1082    #[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    /**A [`ERC1967Proxy`](self) instance.
1094
1095Contains type-safe methods for interacting with an on-chain instance of the
1096[`ERC1967Proxy`](self) contract located at a given `address`, using a given
1097provider `P`.
1098
1099If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
1100documentation on how to provide it), the `deploy` and `deploy_builder` methods can
1101be used to deploy a new instance of the contract.
1102
1103See the [module-level documentation](self) for all the available methods.*/
1104    #[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    /// Instantiation and getters/setters.
1118    impl<
1119        P: alloy_contract::private::Provider<N>,
1120        N: alloy_contract::private::Network,
1121    > ERC1967ProxyInstance<P, N> {
1122        /**Creates a new wrapper around an on-chain [`ERC1967Proxy`](self) contract instance.
1123
1124See the [wrapper's documentation](`ERC1967ProxyInstance`) for more details.*/
1125        #[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        /**Deploys this contract using the given `provider` and constructor arguments, if any.
1137
1138Returns a new instance of the contract, if the deployment was successful.
1139
1140For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
1141        #[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        /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
1152and constructor arguments, if any.
1153
1154This is a simple wrapper around creating a `RawCallBuilder` with the data set to
1155the bytecode concatenated with the constructor's ABI-encoded arguments.*/
1156        #[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        /// Returns a reference to the address.
1178        #[inline]
1179        pub const fn address(&self) -> &alloy_sol_types::private::Address {
1180            &self.address
1181        }
1182        /// Sets the address.
1183        #[inline]
1184        pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
1185            self.address = address;
1186        }
1187        /// Sets the address and returns `self`.
1188        pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
1189            self.set_address(address);
1190            self
1191        }
1192        /// Returns a reference to the provider.
1193        #[inline]
1194        pub const fn provider(&self) -> &P {
1195            &self.provider
1196        }
1197    }
1198    impl<P: ::core::clone::Clone, N> ERC1967ProxyInstance<&P, N> {
1199        /// Clones the provider and returns a new instance with the cloned provider.
1200        #[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    /// Function calls.
1210    impl<
1211        P: alloy_contract::private::Provider<N>,
1212        N: alloy_contract::private::Network,
1213    > ERC1967ProxyInstance<P, N> {
1214        /// Creates a new call builder using this contract instance's provider and address.
1215        ///
1216        /// Note that the call can be any function call, not just those defined in this
1217        /// contract. Prefer using the other methods for building type-safe contract calls.
1218        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    /// Event filters.
1226    impl<
1227        P: alloy_contract::private::Provider<N>,
1228        N: alloy_contract::private::Network,
1229    > ERC1967ProxyInstance<P, N> {
1230        /// Creates a new event filter using this contract instance's provider and address.
1231        ///
1232        /// Note that the type can be any event, not just those defined in this contract.
1233        /// Prefer using the other methods for building type-safe event filters.
1234        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        ///Creates a new event filter for the [`Upgraded`] event.
1240        pub fn Upgraded_filter(&self) -> alloy_contract::Event<&P, Upgraded, N> {
1241            self.event_filter::<Upgraded>()
1242        }
1243    }
1244}