hotshot_contract_adapter/bindings/
erc1967proxy.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 alloy::sol_types as alloy_sol_types;
98
99    use super::*;
100    /// The creation / init bytecode of the contract.
101    ///
102    /// ```text
103    ///0x60806040526040516103a73803806103a78339810160408190526100229161023c565b61002c8282610033565b5050610321565b61003c82610091565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a280511561008557610080828261010c565b505050565b61008d61017f565b5050565b806001600160a01b03163b5f036100cb57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60605f5f846001600160a01b031684604051610128919061030b565b5f60405180830381855af49150503d805f8114610160576040519150601f19603f3d011682016040523d82523d5f602084013e610165565b606091505b5090925090506101768583836101a0565b95945050505050565b341561019e5760405163b398979f60e01b815260040160405180910390fd5b565b6060826101b5576101b0826101ff565b6101f8565b81511580156101cc57506001600160a01b0384163b155b156101f557604051639996b31560e01b81526001600160a01b03851660048201526024016100c2565b50805b9392505050565b80511561020f5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561024d575f5ffd5b82516001600160a01b0381168114610263575f5ffd5b60208401519092506001600160401b0381111561027e575f5ffd5b8301601f8101851361028e575f5ffd5b80516001600160401b038111156102a7576102a7610228565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102d5576102d5610228565b6040528181528282016020018710156102ec575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b5f82518060208501845e5f920191825250919050565b607a8061032d5f395ff3fe6080604052600a600c565b005b60186014601a565b6050565b565b5f604b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b365f5f375f5f365f845af43d5f5f3e8080156069573d5ff35b3d5ffdfea164736f6c634300081c000a
104    /// ```
105    #[rustfmt::skip]
106    #[allow(clippy::all)]
107    pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
108        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\x1C\0\n",
109    );
110    /// The runtime bytecode of the contract, as deployed on the network.
111    ///
112    /// ```text
113    ///0x6080604052600a600c565b005b60186014601a565b6050565b565b5f604b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b365f5f375f5f365f845af43d5f5f3e8080156069573d5ff35b3d5ffdfea164736f6c634300081c000a
114    /// ```
115    #[rustfmt::skip]
116    #[allow(clippy::all)]
117    pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
118        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\x1C\0\n",
119    );
120    #[derive(Default, Debug, PartialEq, Eq, Hash)]
121    /**Custom error with signature `AddressEmptyCode(address)` and selector `0x9996b315`.
122    ```solidity
123    error 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        type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
141        #[doc(hidden)]
142        type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
143        #[cfg(test)]
144        #[allow(dead_code, unreachable_patterns)]
145        fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
146            match _t {
147                alloy_sol_types::private::AssertTypeEq::<
148                    <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
149                >(_) => {},
150            }
151        }
152        #[automatically_derived]
153        #[doc(hidden)]
154        impl ::core::convert::From<AddressEmptyCode> for UnderlyingRustTuple<'_> {
155            fn from(value: AddressEmptyCode) -> Self {
156                (value.target,)
157            }
158        }
159        #[automatically_derived]
160        #[doc(hidden)]
161        impl ::core::convert::From<UnderlyingRustTuple<'_>> for AddressEmptyCode {
162            fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
163                Self { target: tuple.0 }
164            }
165        }
166        #[automatically_derived]
167        impl alloy_sol_types::SolError for AddressEmptyCode {
168            type Parameters<'a> = UnderlyingSolTuple<'a>;
169            type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
170            const SIGNATURE: &'static str = "AddressEmptyCode(address)";
171            const SELECTOR: [u8; 4] = [153u8, 150u8, 179u8, 21u8];
172            #[inline]
173            fn new<'a>(
174                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
175            ) -> Self {
176                tuple.into()
177            }
178            #[inline]
179            fn tokenize(&self) -> Self::Token<'_> {
180                (
181                    <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
182                        &self.target,
183                    ),
184                )
185            }
186        }
187    };
188    #[derive(Default, Debug, PartialEq, Eq, Hash)]
189    /**Custom error with signature `ERC1967InvalidImplementation(address)` and selector `0x4c9c8ce3`.
190    ```solidity
191    error ERC1967InvalidImplementation(address implementation);
192    ```*/
193    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
194    #[derive(Clone)]
195    pub struct ERC1967InvalidImplementation {
196        #[allow(missing_docs)]
197        pub implementation: alloy::sol_types::private::Address,
198    }
199    #[allow(
200        non_camel_case_types,
201        non_snake_case,
202        clippy::pub_underscore_fields,
203        clippy::style
204    )]
205    const _: () = {
206        use alloy::sol_types as alloy_sol_types;
207        #[doc(hidden)]
208        type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
209        #[doc(hidden)]
210        type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
211        #[cfg(test)]
212        #[allow(dead_code, unreachable_patterns)]
213        fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
214            match _t {
215                alloy_sol_types::private::AssertTypeEq::<
216                    <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
217                >(_) => {},
218            }
219        }
220        #[automatically_derived]
221        #[doc(hidden)]
222        impl ::core::convert::From<ERC1967InvalidImplementation> for UnderlyingRustTuple<'_> {
223            fn from(value: ERC1967InvalidImplementation) -> Self {
224                (value.implementation,)
225            }
226        }
227        #[automatically_derived]
228        #[doc(hidden)]
229        impl ::core::convert::From<UnderlyingRustTuple<'_>> for ERC1967InvalidImplementation {
230            fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
231                Self {
232                    implementation: tuple.0,
233                }
234            }
235        }
236        #[automatically_derived]
237        impl alloy_sol_types::SolError for ERC1967InvalidImplementation {
238            type Parameters<'a> = UnderlyingSolTuple<'a>;
239            type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
240            const SIGNATURE: &'static str = "ERC1967InvalidImplementation(address)";
241            const SELECTOR: [u8; 4] = [76u8, 156u8, 140u8, 227u8];
242            #[inline]
243            fn new<'a>(
244                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
245            ) -> Self {
246                tuple.into()
247            }
248            #[inline]
249            fn tokenize(&self) -> Self::Token<'_> {
250                (
251                    <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
252                        &self.implementation,
253                    ),
254                )
255            }
256        }
257    };
258    #[derive(Default, Debug, PartialEq, Eq, Hash)]
259    /**Custom error with signature `ERC1967NonPayable()` and selector `0xb398979f`.
260    ```solidity
261    error ERC1967NonPayable();
262    ```*/
263    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
264    #[derive(Clone)]
265    pub struct ERC1967NonPayable {}
266    #[allow(
267        non_camel_case_types,
268        non_snake_case,
269        clippy::pub_underscore_fields,
270        clippy::style
271    )]
272    const _: () = {
273        use alloy::sol_types as alloy_sol_types;
274        #[doc(hidden)]
275        type UnderlyingSolTuple<'a> = ();
276        #[doc(hidden)]
277        type UnderlyingRustTuple<'a> = ();
278        #[cfg(test)]
279        #[allow(dead_code, unreachable_patterns)]
280        fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
281            match _t {
282                alloy_sol_types::private::AssertTypeEq::<
283                    <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
284                >(_) => {},
285            }
286        }
287        #[automatically_derived]
288        #[doc(hidden)]
289        impl ::core::convert::From<ERC1967NonPayable> for UnderlyingRustTuple<'_> {
290            fn from(value: ERC1967NonPayable) -> Self {
291                ()
292            }
293        }
294        #[automatically_derived]
295        #[doc(hidden)]
296        impl ::core::convert::From<UnderlyingRustTuple<'_>> for ERC1967NonPayable {
297            fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
298                Self {}
299            }
300        }
301        #[automatically_derived]
302        impl alloy_sol_types::SolError for ERC1967NonPayable {
303            type Parameters<'a> = UnderlyingSolTuple<'a>;
304            type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
305            const SIGNATURE: &'static str = "ERC1967NonPayable()";
306            const SELECTOR: [u8; 4] = [179u8, 152u8, 151u8, 159u8];
307            #[inline]
308            fn new<'a>(
309                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
310            ) -> Self {
311                tuple.into()
312            }
313            #[inline]
314            fn tokenize(&self) -> Self::Token<'_> {
315                ()
316            }
317        }
318    };
319    #[derive(Default, Debug, PartialEq, Eq, Hash)]
320    /**Custom error with signature `FailedInnerCall()` and selector `0x1425ea42`.
321    ```solidity
322    error FailedInnerCall();
323    ```*/
324    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
325    #[derive(Clone)]
326    pub struct FailedInnerCall {}
327    #[allow(
328        non_camel_case_types,
329        non_snake_case,
330        clippy::pub_underscore_fields,
331        clippy::style
332    )]
333    const _: () = {
334        use alloy::sol_types as alloy_sol_types;
335        #[doc(hidden)]
336        type UnderlyingSolTuple<'a> = ();
337        #[doc(hidden)]
338        type UnderlyingRustTuple<'a> = ();
339        #[cfg(test)]
340        #[allow(dead_code, unreachable_patterns)]
341        fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
342            match _t {
343                alloy_sol_types::private::AssertTypeEq::<
344                    <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
345                >(_) => {},
346            }
347        }
348        #[automatically_derived]
349        #[doc(hidden)]
350        impl ::core::convert::From<FailedInnerCall> for UnderlyingRustTuple<'_> {
351            fn from(value: FailedInnerCall) -> Self {
352                ()
353            }
354        }
355        #[automatically_derived]
356        #[doc(hidden)]
357        impl ::core::convert::From<UnderlyingRustTuple<'_>> for FailedInnerCall {
358            fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
359                Self {}
360            }
361        }
362        #[automatically_derived]
363        impl alloy_sol_types::SolError for FailedInnerCall {
364            type Parameters<'a> = UnderlyingSolTuple<'a>;
365            type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
366            const SIGNATURE: &'static str = "FailedInnerCall()";
367            const SELECTOR: [u8; 4] = [20u8, 37u8, 234u8, 66u8];
368            #[inline]
369            fn new<'a>(
370                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
371            ) -> Self {
372                tuple.into()
373            }
374            #[inline]
375            fn tokenize(&self) -> Self::Token<'_> {
376                ()
377            }
378        }
379    };
380    #[derive(Default, Debug, PartialEq, Eq, Hash)]
381    /**Event with signature `Upgraded(address)` and selector `0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b`.
382    ```solidity
383    event Upgraded(address indexed implementation);
384    ```*/
385    #[allow(
386        non_camel_case_types,
387        non_snake_case,
388        clippy::pub_underscore_fields,
389        clippy::style
390    )]
391    #[derive(Clone)]
392    pub struct Upgraded {
393        #[allow(missing_docs)]
394        pub implementation: alloy::sol_types::private::Address,
395    }
396    #[allow(
397        non_camel_case_types,
398        non_snake_case,
399        clippy::pub_underscore_fields,
400        clippy::style
401    )]
402    const _: () = {
403        use alloy::sol_types as alloy_sol_types;
404        #[automatically_derived]
405        impl alloy_sol_types::SolEvent for Upgraded {
406            type DataTuple<'a> = ();
407            type DataToken<'a> = <Self::DataTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
408            type TopicList = (
409                alloy_sol_types::sol_data::FixedBytes<32>,
410                alloy::sol_types::sol_data::Address,
411            );
412            const SIGNATURE: &'static str = "Upgraded(address)";
413            const SIGNATURE_HASH: alloy_sol_types::private::B256 =
414                alloy_sol_types::private::B256::new([
415                    188u8, 124u8, 215u8, 90u8, 32u8, 238u8, 39u8, 253u8, 154u8, 222u8, 186u8,
416                    179u8, 32u8, 65u8, 247u8, 85u8, 33u8, 77u8, 188u8, 107u8, 255u8, 169u8, 12u8,
417                    192u8, 34u8, 91u8, 57u8, 218u8, 46u8, 92u8, 45u8, 59u8,
418                ]);
419            const ANONYMOUS: bool = false;
420            #[allow(unused_variables)]
421            #[inline]
422            fn new(
423                topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
424                data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
425            ) -> Self {
426                Self {
427                    implementation: topics.1,
428                }
429            }
430            #[inline]
431            fn check_signature(
432                topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
433            ) -> alloy_sol_types::Result<()> {
434                if topics.0 != Self::SIGNATURE_HASH {
435                    return Err(alloy_sol_types::Error::invalid_event_signature_hash(
436                        Self::SIGNATURE,
437                        topics.0,
438                        Self::SIGNATURE_HASH,
439                    ));
440                }
441                Ok(())
442            }
443            #[inline]
444            fn tokenize_body(&self) -> Self::DataToken<'_> {
445                ()
446            }
447            #[inline]
448            fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
449                (Self::SIGNATURE_HASH.into(), self.implementation.clone())
450            }
451            #[inline]
452            fn encode_topics_raw(
453                &self,
454                out: &mut [alloy_sol_types::abi::token::WordToken],
455            ) -> alloy_sol_types::Result<()> {
456                if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
457                    return Err(alloy_sol_types::Error::Overrun);
458                }
459                out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH);
460                out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
461                    &self.implementation,
462                );
463                Ok(())
464            }
465        }
466        #[automatically_derived]
467        impl alloy_sol_types::private::IntoLogData for Upgraded {
468            fn to_log_data(&self) -> alloy_sol_types::private::LogData {
469                From::from(self)
470            }
471            fn into_log_data(self) -> alloy_sol_types::private::LogData {
472                From::from(&self)
473            }
474        }
475        #[automatically_derived]
476        impl From<&Upgraded> for alloy_sol_types::private::LogData {
477            #[inline]
478            fn from(this: &Upgraded) -> alloy_sol_types::private::LogData {
479                alloy_sol_types::SolEvent::encode_log_data(this)
480            }
481        }
482    };
483    /**Constructor`.
484    ```solidity
485    constructor(address implementation, bytes _data) payable;
486    ```*/
487    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
488    #[derive(Clone)]
489    pub struct constructorCall {
490        #[allow(missing_docs)]
491        pub implementation: alloy::sol_types::private::Address,
492        #[allow(missing_docs)]
493        pub _data: alloy::sol_types::private::Bytes,
494    }
495    const _: () = {
496        use alloy::sol_types as alloy_sol_types;
497        {
498            #[doc(hidden)]
499            type UnderlyingSolTuple<'a> = (
500                alloy::sol_types::sol_data::Address,
501                alloy::sol_types::sol_data::Bytes,
502            );
503            #[doc(hidden)]
504            type UnderlyingRustTuple<'a> = (
505                alloy::sol_types::private::Address,
506                alloy::sol_types::private::Bytes,
507            );
508            #[cfg(test)]
509            #[allow(dead_code, unreachable_patterns)]
510            fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
511                match _t {
512                    alloy_sol_types::private::AssertTypeEq::<
513                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
514                    >(_) => {},
515                }
516            }
517            #[automatically_derived]
518            #[doc(hidden)]
519            impl ::core::convert::From<constructorCall> for UnderlyingRustTuple<'_> {
520                fn from(value: constructorCall) -> Self {
521                    (value.implementation, value._data)
522                }
523            }
524            #[automatically_derived]
525            #[doc(hidden)]
526            impl ::core::convert::From<UnderlyingRustTuple<'_>> for constructorCall {
527                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
528                    Self {
529                        implementation: tuple.0,
530                        _data: tuple.1,
531                    }
532                }
533            }
534        }
535        #[automatically_derived]
536        impl alloy_sol_types::SolConstructor for constructorCall {
537            type Parameters<'a> = (
538                alloy::sol_types::sol_data::Address,
539                alloy::sol_types::sol_data::Bytes,
540            );
541            type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
542            #[inline]
543            fn new<'a>(
544                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
545            ) -> Self {
546                tuple.into()
547            }
548            #[inline]
549            fn tokenize(&self) -> Self::Token<'_> {
550                (
551                    <alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
552                        &self.implementation,
553                    ),
554                    <alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
555                        &self._data,
556                    ),
557                )
558            }
559        }
560    };
561    ///Container for all the [`ERC1967Proxy`](self) custom errors.
562    #[derive(Debug, PartialEq, Eq, Hash)]
563    pub enum ERC1967ProxyErrors {
564        #[allow(missing_docs)]
565        AddressEmptyCode(AddressEmptyCode),
566        #[allow(missing_docs)]
567        ERC1967InvalidImplementation(ERC1967InvalidImplementation),
568        #[allow(missing_docs)]
569        ERC1967NonPayable(ERC1967NonPayable),
570        #[allow(missing_docs)]
571        FailedInnerCall(FailedInnerCall),
572    }
573    #[automatically_derived]
574    impl ERC1967ProxyErrors {
575        /// All the selectors of this enum.
576        ///
577        /// Note that the selectors might not be in the same order as the variants.
578        /// No guarantees are made about the order of the selectors.
579        ///
580        /// Prefer using `SolInterface` methods instead.
581        pub const SELECTORS: &'static [[u8; 4usize]] = &[
582            [20u8, 37u8, 234u8, 66u8],
583            [76u8, 156u8, 140u8, 227u8],
584            [153u8, 150u8, 179u8, 21u8],
585            [179u8, 152u8, 151u8, 159u8],
586        ];
587    }
588    #[automatically_derived]
589    impl alloy_sol_types::SolInterface for ERC1967ProxyErrors {
590        const NAME: &'static str = "ERC1967ProxyErrors";
591        const MIN_DATA_LENGTH: usize = 0usize;
592        const COUNT: usize = 4usize;
593        #[inline]
594        fn selector(&self) -> [u8; 4] {
595            match self {
596                Self::AddressEmptyCode(_) => {
597                    <AddressEmptyCode as alloy_sol_types::SolError>::SELECTOR
598                },
599                Self::ERC1967InvalidImplementation(_) => {
600                    <ERC1967InvalidImplementation as alloy_sol_types::SolError>::SELECTOR
601                },
602                Self::ERC1967NonPayable(_) => {
603                    <ERC1967NonPayable as alloy_sol_types::SolError>::SELECTOR
604                },
605                Self::FailedInnerCall(_) => {
606                    <FailedInnerCall as alloy_sol_types::SolError>::SELECTOR
607                },
608            }
609        }
610        #[inline]
611        fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
612            Self::SELECTORS.get(i).copied()
613        }
614        #[inline]
615        fn valid_selector(selector: [u8; 4]) -> bool {
616            Self::SELECTORS.binary_search(&selector).is_ok()
617        }
618        #[inline]
619        #[allow(non_snake_case)]
620        fn abi_decode_raw(
621            selector: [u8; 4],
622            data: &[u8],
623            validate: bool,
624        ) -> alloy_sol_types::Result<Self> {
625            static DECODE_SHIMS: &[fn(
626                &[u8],
627                bool,
628            )
629                -> alloy_sol_types::Result<ERC1967ProxyErrors>] = &[
630                {
631                    fn FailedInnerCall(
632                        data: &[u8],
633                        validate: bool,
634                    ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
635                        <FailedInnerCall as alloy_sol_types::SolError>::abi_decode_raw(
636                            data, validate,
637                        )
638                        .map(ERC1967ProxyErrors::FailedInnerCall)
639                    }
640                    FailedInnerCall
641                },
642                {
643                    fn ERC1967InvalidImplementation(
644                        data: &[u8],
645                        validate: bool,
646                    ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
647                        <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_decode_raw(
648                            data, validate,
649                        )
650                        .map(ERC1967ProxyErrors::ERC1967InvalidImplementation)
651                    }
652                    ERC1967InvalidImplementation
653                },
654                {
655                    fn AddressEmptyCode(
656                        data: &[u8],
657                        validate: bool,
658                    ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
659                        <AddressEmptyCode as alloy_sol_types::SolError>::abi_decode_raw(
660                            data, validate,
661                        )
662                        .map(ERC1967ProxyErrors::AddressEmptyCode)
663                    }
664                    AddressEmptyCode
665                },
666                {
667                    fn ERC1967NonPayable(
668                        data: &[u8],
669                        validate: bool,
670                    ) -> alloy_sol_types::Result<ERC1967ProxyErrors> {
671                        <ERC1967NonPayable as alloy_sol_types::SolError>::abi_decode_raw(
672                            data, validate,
673                        )
674                        .map(ERC1967ProxyErrors::ERC1967NonPayable)
675                    }
676                    ERC1967NonPayable
677                },
678            ];
679            let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
680                return Err(alloy_sol_types::Error::unknown_selector(
681                    <Self as alloy_sol_types::SolInterface>::NAME,
682                    selector,
683                ));
684            };
685            DECODE_SHIMS[idx](data, validate)
686        }
687        #[inline]
688        fn abi_encoded_size(&self) -> usize {
689            match self {
690                Self::AddressEmptyCode(inner) => {
691                    <AddressEmptyCode as alloy_sol_types::SolError>::abi_encoded_size(inner)
692                },
693                Self::ERC1967InvalidImplementation(inner) => {
694                    <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encoded_size(
695                        inner,
696                    )
697                },
698                Self::ERC1967NonPayable(inner) => {
699                    <ERC1967NonPayable as alloy_sol_types::SolError>::abi_encoded_size(inner)
700                },
701                Self::FailedInnerCall(inner) => {
702                    <FailedInnerCall as alloy_sol_types::SolError>::abi_encoded_size(inner)
703                },
704            }
705        }
706        #[inline]
707        fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
708            match self {
709                Self::AddressEmptyCode(inner) => {
710                    <AddressEmptyCode as alloy_sol_types::SolError>::abi_encode_raw(inner, out)
711                },
712                Self::ERC1967InvalidImplementation(inner) => {
713                    <ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encode_raw(
714                        inner, out,
715                    )
716                },
717                Self::ERC1967NonPayable(inner) => {
718                    <ERC1967NonPayable as alloy_sol_types::SolError>::abi_encode_raw(inner, out)
719                },
720                Self::FailedInnerCall(inner) => {
721                    <FailedInnerCall as alloy_sol_types::SolError>::abi_encode_raw(inner, out)
722                },
723            }
724        }
725    }
726    ///Container for all the [`ERC1967Proxy`](self) events.
727    #[derive(Debug, PartialEq, Eq, Hash)]
728    pub enum ERC1967ProxyEvents {
729        #[allow(missing_docs)]
730        Upgraded(Upgraded),
731    }
732    #[automatically_derived]
733    impl ERC1967ProxyEvents {
734        /// All the selectors of this enum.
735        ///
736        /// Note that the selectors might not be in the same order as the variants.
737        /// No guarantees are made about the order of the selectors.
738        ///
739        /// Prefer using `SolInterface` methods instead.
740        pub const SELECTORS: &'static [[u8; 32usize]] = &[[
741            188u8, 124u8, 215u8, 90u8, 32u8, 238u8, 39u8, 253u8, 154u8, 222u8, 186u8, 179u8, 32u8,
742            65u8, 247u8, 85u8, 33u8, 77u8, 188u8, 107u8, 255u8, 169u8, 12u8, 192u8, 34u8, 91u8,
743            57u8, 218u8, 46u8, 92u8, 45u8, 59u8,
744        ]];
745    }
746    #[automatically_derived]
747    impl alloy_sol_types::SolEventInterface for ERC1967ProxyEvents {
748        const NAME: &'static str = "ERC1967ProxyEvents";
749        const COUNT: usize = 1usize;
750        fn decode_raw_log(
751            topics: &[alloy_sol_types::Word],
752            data: &[u8],
753            validate: bool,
754        ) -> alloy_sol_types::Result<Self> {
755            match topics.first().copied() {
756                Some(<Upgraded as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
757                    <Upgraded as alloy_sol_types::SolEvent>::decode_raw_log(topics, data, validate)
758                        .map(Self::Upgraded)
759                },
760                _ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
761                    name: <Self as alloy_sol_types::SolEventInterface>::NAME,
762                    log: alloy_sol_types::private::Box::new(
763                        alloy_sol_types::private::LogData::new_unchecked(
764                            topics.to_vec(),
765                            data.to_vec().into(),
766                        ),
767                    ),
768                }),
769            }
770        }
771    }
772    #[automatically_derived]
773    impl alloy_sol_types::private::IntoLogData for ERC1967ProxyEvents {
774        fn to_log_data(&self) -> alloy_sol_types::private::LogData {
775            match self {
776                Self::Upgraded(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner),
777            }
778        }
779        fn into_log_data(self) -> alloy_sol_types::private::LogData {
780            match self {
781                Self::Upgraded(inner) => {
782                    alloy_sol_types::private::IntoLogData::into_log_data(inner)
783                },
784            }
785        }
786    }
787    use alloy::contract as alloy_contract;
788    /**Creates a new wrapper around an on-chain [`ERC1967Proxy`](self) contract instance.
789
790    See the [wrapper's documentation](`ERC1967ProxyInstance`) for more details.*/
791    #[inline]
792    pub const fn new<
793        T: alloy_contract::private::Transport + ::core::clone::Clone,
794        P: alloy_contract::private::Provider<T, N>,
795        N: alloy_contract::private::Network,
796    >(
797        address: alloy_sol_types::private::Address,
798        provider: P,
799    ) -> ERC1967ProxyInstance<T, P, N> {
800        ERC1967ProxyInstance::<T, P, N>::new(address, provider)
801    }
802    /**Deploys this contract using the given `provider` and constructor arguments, if any.
803
804    Returns a new instance of the contract, if the deployment was successful.
805
806    For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
807    #[inline]
808    pub fn deploy<
809        T: alloy_contract::private::Transport + ::core::clone::Clone,
810        P: alloy_contract::private::Provider<T, N>,
811        N: alloy_contract::private::Network,
812    >(
813        provider: P,
814        implementation: alloy::sol_types::private::Address,
815        _data: alloy::sol_types::private::Bytes,
816    ) -> impl ::core::future::Future<Output = alloy_contract::Result<ERC1967ProxyInstance<T, P, N>>>
817    {
818        ERC1967ProxyInstance::<T, P, N>::deploy(provider, implementation, _data)
819    }
820    /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
821    and constructor arguments, if any.
822
823    This is a simple wrapper around creating a `RawCallBuilder` with the data set to
824    the bytecode concatenated with the constructor's ABI-encoded arguments.*/
825    #[inline]
826    pub fn deploy_builder<
827        T: alloy_contract::private::Transport + ::core::clone::Clone,
828        P: alloy_contract::private::Provider<T, N>,
829        N: alloy_contract::private::Network,
830    >(
831        provider: P,
832        implementation: alloy::sol_types::private::Address,
833        _data: alloy::sol_types::private::Bytes,
834    ) -> alloy_contract::RawCallBuilder<T, P, N> {
835        ERC1967ProxyInstance::<T, P, N>::deploy_builder(provider, implementation, _data)
836    }
837    /**A [`ERC1967Proxy`](self) instance.
838
839    Contains type-safe methods for interacting with an on-chain instance of the
840    [`ERC1967Proxy`](self) contract located at a given `address`, using a given
841    provider `P`.
842
843    If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
844    documentation on how to provide it), the `deploy` and `deploy_builder` methods can
845    be used to deploy a new instance of the contract.
846
847    See the [module-level documentation](self) for all the available methods.*/
848    #[derive(Clone)]
849    pub struct ERC1967ProxyInstance<T, P, N = alloy_contract::private::Ethereum> {
850        address: alloy_sol_types::private::Address,
851        provider: P,
852        _network_transport: ::core::marker::PhantomData<(N, T)>,
853    }
854    #[automatically_derived]
855    impl<T, P, N> ::core::fmt::Debug for ERC1967ProxyInstance<T, P, N> {
856        #[inline]
857        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
858            f.debug_tuple("ERC1967ProxyInstance")
859                .field(&self.address)
860                .finish()
861        }
862    }
863    /// Instantiation and getters/setters.
864    #[automatically_derived]
865    impl<
866            T: alloy_contract::private::Transport + ::core::clone::Clone,
867            P: alloy_contract::private::Provider<T, N>,
868            N: alloy_contract::private::Network,
869        > ERC1967ProxyInstance<T, P, N>
870    {
871        /**Creates a new wrapper around an on-chain [`ERC1967Proxy`](self) contract instance.
872
873        See the [wrapper's documentation](`ERC1967ProxyInstance`) for more details.*/
874        #[inline]
875        pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self {
876            Self {
877                address,
878                provider,
879                _network_transport: ::core::marker::PhantomData,
880            }
881        }
882        /**Deploys this contract using the given `provider` and constructor arguments, if any.
883
884        Returns a new instance of the contract, if the deployment was successful.
885
886        For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
887        #[inline]
888        pub async fn deploy(
889            provider: P,
890            implementation: alloy::sol_types::private::Address,
891            _data: alloy::sol_types::private::Bytes,
892        ) -> alloy_contract::Result<ERC1967ProxyInstance<T, P, N>> {
893            let call_builder = Self::deploy_builder(provider, implementation, _data);
894            let contract_address = call_builder.deploy().await?;
895            Ok(Self::new(contract_address, call_builder.provider))
896        }
897        /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
898        and constructor arguments, if any.
899
900        This is a simple wrapper around creating a `RawCallBuilder` with the data set to
901        the bytecode concatenated with the constructor's ABI-encoded arguments.*/
902        #[inline]
903        pub fn deploy_builder(
904            provider: P,
905            implementation: alloy::sol_types::private::Address,
906            _data: alloy::sol_types::private::Bytes,
907        ) -> alloy_contract::RawCallBuilder<T, P, N> {
908            alloy_contract::RawCallBuilder::new_raw_deploy(
909                provider,
910                [
911                    &BYTECODE[..],
912                    &alloy_sol_types::SolConstructor::abi_encode(&constructorCall {
913                        implementation,
914                        _data,
915                    })[..],
916                ]
917                .concat()
918                .into(),
919            )
920        }
921        /// Returns a reference to the address.
922        #[inline]
923        pub const fn address(&self) -> &alloy_sol_types::private::Address {
924            &self.address
925        }
926        /// Sets the address.
927        #[inline]
928        pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
929            self.address = address;
930        }
931        /// Sets the address and returns `self`.
932        pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
933            self.set_address(address);
934            self
935        }
936        /// Returns a reference to the provider.
937        #[inline]
938        pub const fn provider(&self) -> &P {
939            &self.provider
940        }
941    }
942    impl<T, P: ::core::clone::Clone, N> ERC1967ProxyInstance<T, &P, N> {
943        /// Clones the provider and returns a new instance with the cloned provider.
944        #[inline]
945        pub fn with_cloned_provider(self) -> ERC1967ProxyInstance<T, P, N> {
946            ERC1967ProxyInstance {
947                address: self.address,
948                provider: ::core::clone::Clone::clone(&self.provider),
949                _network_transport: ::core::marker::PhantomData,
950            }
951        }
952    }
953    /// Function calls.
954    #[automatically_derived]
955    impl<
956            T: alloy_contract::private::Transport + ::core::clone::Clone,
957            P: alloy_contract::private::Provider<T, N>,
958            N: alloy_contract::private::Network,
959        > ERC1967ProxyInstance<T, P, N>
960    {
961        /// Creates a new call builder using this contract instance's provider and address.
962        ///
963        /// Note that the call can be any function call, not just those defined in this
964        /// contract. Prefer using the other methods for building type-safe contract calls.
965        pub fn call_builder<C: alloy_sol_types::SolCall>(
966            &self,
967            call: &C,
968        ) -> alloy_contract::SolCallBuilder<T, &P, C, N> {
969            alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
970        }
971    }
972    /// Event filters.
973    #[automatically_derived]
974    impl<
975            T: alloy_contract::private::Transport + ::core::clone::Clone,
976            P: alloy_contract::private::Provider<T, N>,
977            N: alloy_contract::private::Network,
978        > ERC1967ProxyInstance<T, P, N>
979    {
980        /// Creates a new event filter using this contract instance's provider and address.
981        ///
982        /// Note that the type can be any event, not just those defined in this contract.
983        /// Prefer using the other methods for building type-safe event filters.
984        pub fn event_filter<E: alloy_sol_types::SolEvent>(
985            &self,
986        ) -> alloy_contract::Event<T, &P, E, N> {
987            alloy_contract::Event::new_sol(&self.provider, &self.address)
988        }
989        ///Creates a new event filter for the [`Upgraded`] event.
990        pub fn Upgraded_filter(&self) -> alloy_contract::Event<T, &P, Upgraded, N> {
991            self.event_filter::<Upgraded>()
992        }
993    }
994}