pod_contracts/
auction.rs

1/**
2
3Generated by the following Solidity interface...
4```solidity
5interface Auction {
6    event BidSubmitted(uint256 indexed auction_id, address indexed bidder, uint256 indexed deadline, uint256 value);
7
8    function submitBid(uint256 auction_id, uint256 deadline, uint256 value, bytes memory data) external;
9}
10```
11
12...which was generated by the following JSON ABI:
13```json
14[
15  {
16    "type": "function",
17    "name": "submitBid",
18    "inputs": [
19      {
20        "name": "auction_id",
21        "type": "uint256",
22        "internalType": "uint256"
23      },
24      {
25        "name": "deadline",
26        "type": "uint256",
27        "internalType": "uint256"
28      },
29      {
30        "name": "value",
31        "type": "uint256",
32        "internalType": "uint256"
33      },
34      {
35        "name": "data",
36        "type": "bytes",
37        "internalType": "bytes"
38      }
39    ],
40    "outputs": [],
41    "stateMutability": "nonpayable"
42  },
43  {
44    "type": "event",
45    "name": "BidSubmitted",
46    "inputs": [
47      {
48        "name": "auction_id",
49        "type": "uint256",
50        "indexed": true,
51        "internalType": "uint256"
52      },
53      {
54        "name": "bidder",
55        "type": "address",
56        "indexed": true,
57        "internalType": "address"
58      },
59      {
60        "name": "deadline",
61        "type": "uint256",
62        "indexed": true,
63        "internalType": "uint256"
64      },
65      {
66        "name": "value",
67        "type": "uint256",
68        "indexed": false,
69        "internalType": "uint256"
70      }
71    ],
72    "anonymous": false
73  }
74]
75```*/
76#[allow(
77    non_camel_case_types,
78    non_snake_case,
79    clippy::pub_underscore_fields,
80    clippy::style,
81    clippy::empty_structs_with_brackets
82)]
83pub mod Auction {
84    use super::*;
85    use alloy::sol_types as alloy_sol_types;
86    /// The creation / init bytecode of the contract.
87    ///
88    /// ```text
89    ///0x6080604052348015600f57600080fd5b506102ba8061001f6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063852ca61214610030575b600080fd5b61004a6004803603810190610045919061018b565b61004c565b005b8342111561008f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161008690610270565b60405180910390fd5b833373ffffffffffffffffffffffffffffffffffffffff16867f71a5674c44b823bc0df08201dfeb2e8bdf698cd684fd2bbaa79adcf2c99fc186866040516100d7919061029f565b60405180910390a45050505050565b600080fd5b600080fd5b6000819050919050565b610103816100f0565b811461010e57600080fd5b50565b600081359050610120816100fa565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261014b5761014a610126565b5b8235905067ffffffffffffffff8111156101685761016761012b565b5b60208301915083600182028301111561018457610183610130565b5b9250929050565b6000806000806000608086880312156101a7576101a66100e6565b5b60006101b588828901610111565b95505060206101c688828901610111565b94505060406101d788828901610111565b935050606086013567ffffffffffffffff8111156101f8576101f76100eb565b5b61020488828901610135565b92509250509295509295909350565b600082825260208201905092915050565b7f41756374696f6e20646561646c696e6520706173736564000000000000000000600082015250565b600061025a601783610213565b915061026582610224565b602082019050919050565b600060208201905081810360008301526102898161024d565b9050919050565b610299816100f0565b82525050565b60006020820190506102b46000830184610290565b9291505056
90    /// ```
91    #[rustfmt::skip]
92    #[allow(clippy::all)]
93    pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
94        b"`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[Pa\x02\xBA\x80a\0\x1F`\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0+W`\x005`\xE0\x1C\x80c\x85,\xA6\x12\x14a\x000W[`\0\x80\xFD[a\0J`\x04\x806\x03\x81\x01\x90a\0E\x91\x90a\x01\x8BV[a\0LV[\0[\x83B\x11\x15a\0\x8FW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\0\x86\x90a\x02pV[`@Q\x80\x91\x03\x90\xFD[\x833s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x86\x7Fq\xA5gLD\xB8#\xBC\r\xF0\x82\x01\xDF\xEB.\x8B\xDFi\x8C\xD6\x84\xFD+\xBA\xA7\x9A\xDC\xF2\xC9\x9F\xC1\x86\x86`@Qa\0\xD7\x91\x90a\x02\x9FV[`@Q\x80\x91\x03\x90\xA4PPPPPV[`\0\x80\xFD[`\0\x80\xFD[`\0\x81\x90P\x91\x90PV[a\x01\x03\x81a\0\xF0V[\x81\x14a\x01\x0EW`\0\x80\xFD[PV[`\0\x815\x90Pa\x01 \x81a\0\xFAV[\x92\x91PPV[`\0\x80\xFD[`\0\x80\xFD[`\0\x80\xFD[`\0\x80\x83`\x1F\x84\x01\x12a\x01KWa\x01Ja\x01&V[[\x825\x90Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x01hWa\x01ga\x01+V[[` \x83\x01\x91P\x83`\x01\x82\x02\x83\x01\x11\x15a\x01\x84Wa\x01\x83a\x010V[[\x92P\x92\x90PV[`\0\x80`\0\x80`\0`\x80\x86\x88\x03\x12\x15a\x01\xA7Wa\x01\xA6a\0\xE6V[[`\0a\x01\xB5\x88\x82\x89\x01a\x01\x11V[\x95PP` a\x01\xC6\x88\x82\x89\x01a\x01\x11V[\x94PP`@a\x01\xD7\x88\x82\x89\x01a\x01\x11V[\x93PP``\x86\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x01\xF8Wa\x01\xF7a\0\xEBV[[a\x02\x04\x88\x82\x89\x01a\x015V[\x92P\x92PP\x92\x95P\x92\x95\x90\x93PV[`\0\x82\x82R` \x82\x01\x90P\x92\x91PPV[\x7FAuction deadline passed\0\0\0\0\0\0\0\0\0`\0\x82\x01RPV[`\0a\x02Z`\x17\x83a\x02\x13V[\x91Pa\x02e\x82a\x02$V[` \x82\x01\x90P\x91\x90PV[`\0` \x82\x01\x90P\x81\x81\x03`\0\x83\x01Ra\x02\x89\x81a\x02MV[\x90P\x91\x90PV[a\x02\x99\x81a\0\xF0V[\x82RPPV[`\0` \x82\x01\x90Pa\x02\xB4`\0\x83\x01\x84a\x02\x90V[\x92\x91PPV",
95    );
96    /// The runtime bytecode of the contract, as deployed on the network.
97    ///
98    /// ```text
99    ///0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063852ca61214610030575b600080fd5b61004a6004803603810190610045919061018b565b61004c565b005b8342111561008f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161008690610270565b60405180910390fd5b833373ffffffffffffffffffffffffffffffffffffffff16867f71a5674c44b823bc0df08201dfeb2e8bdf698cd684fd2bbaa79adcf2c99fc186866040516100d7919061029f565b60405180910390a45050505050565b600080fd5b600080fd5b6000819050919050565b610103816100f0565b811461010e57600080fd5b50565b600081359050610120816100fa565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261014b5761014a610126565b5b8235905067ffffffffffffffff8111156101685761016761012b565b5b60208301915083600182028301111561018457610183610130565b5b9250929050565b6000806000806000608086880312156101a7576101a66100e6565b5b60006101b588828901610111565b95505060206101c688828901610111565b94505060406101d788828901610111565b935050606086013567ffffffffffffffff8111156101f8576101f76100eb565b5b61020488828901610135565b92509250509295509295909350565b600082825260208201905092915050565b7f41756374696f6e20646561646c696e6520706173736564000000000000000000600082015250565b600061025a601783610213565b915061026582610224565b602082019050919050565b600060208201905081810360008301526102898161024d565b9050919050565b610299816100f0565b82525050565b60006020820190506102b46000830184610290565b9291505056
100    /// ```
101    #[rustfmt::skip]
102    #[allow(clippy::all)]
103    pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
104        b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0+W`\x005`\xE0\x1C\x80c\x85,\xA6\x12\x14a\x000W[`\0\x80\xFD[a\0J`\x04\x806\x03\x81\x01\x90a\0E\x91\x90a\x01\x8BV[a\0LV[\0[\x83B\x11\x15a\0\x8FW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\0\x86\x90a\x02pV[`@Q\x80\x91\x03\x90\xFD[\x833s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x86\x7Fq\xA5gLD\xB8#\xBC\r\xF0\x82\x01\xDF\xEB.\x8B\xDFi\x8C\xD6\x84\xFD+\xBA\xA7\x9A\xDC\xF2\xC9\x9F\xC1\x86\x86`@Qa\0\xD7\x91\x90a\x02\x9FV[`@Q\x80\x91\x03\x90\xA4PPPPPV[`\0\x80\xFD[`\0\x80\xFD[`\0\x81\x90P\x91\x90PV[a\x01\x03\x81a\0\xF0V[\x81\x14a\x01\x0EW`\0\x80\xFD[PV[`\0\x815\x90Pa\x01 \x81a\0\xFAV[\x92\x91PPV[`\0\x80\xFD[`\0\x80\xFD[`\0\x80\xFD[`\0\x80\x83`\x1F\x84\x01\x12a\x01KWa\x01Ja\x01&V[[\x825\x90Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x01hWa\x01ga\x01+V[[` \x83\x01\x91P\x83`\x01\x82\x02\x83\x01\x11\x15a\x01\x84Wa\x01\x83a\x010V[[\x92P\x92\x90PV[`\0\x80`\0\x80`\0`\x80\x86\x88\x03\x12\x15a\x01\xA7Wa\x01\xA6a\0\xE6V[[`\0a\x01\xB5\x88\x82\x89\x01a\x01\x11V[\x95PP` a\x01\xC6\x88\x82\x89\x01a\x01\x11V[\x94PP`@a\x01\xD7\x88\x82\x89\x01a\x01\x11V[\x93PP``\x86\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x01\xF8Wa\x01\xF7a\0\xEBV[[a\x02\x04\x88\x82\x89\x01a\x015V[\x92P\x92PP\x92\x95P\x92\x95\x90\x93PV[`\0\x82\x82R` \x82\x01\x90P\x92\x91PPV[\x7FAuction deadline passed\0\0\0\0\0\0\0\0\0`\0\x82\x01RPV[`\0a\x02Z`\x17\x83a\x02\x13V[\x91Pa\x02e\x82a\x02$V[` \x82\x01\x90P\x91\x90PV[`\0` \x82\x01\x90P\x81\x81\x03`\0\x83\x01Ra\x02\x89\x81a\x02MV[\x90P\x91\x90PV[a\x02\x99\x81a\0\xF0V[\x82RPPV[`\0` \x82\x01\x90Pa\x02\xB4`\0\x83\x01\x84a\x02\x90V[\x92\x91PPV",
105    );
106    #[derive(Default, Debug, PartialEq, Eq, Hash)]
107    /**Event with signature `BidSubmitted(uint256,address,uint256,uint256)` and selector `0x71a5674c44b823bc0df08201dfeb2e8bdf698cd684fd2bbaa79adcf2c99fc186`.
108```solidity
109event BidSubmitted(uint256 indexed auction_id, address indexed bidder, uint256 indexed deadline, uint256 value);
110```*/
111    #[allow(
112        non_camel_case_types,
113        non_snake_case,
114        clippy::pub_underscore_fields,
115        clippy::style
116    )]
117    #[derive(Clone)]
118    pub struct BidSubmitted {
119        #[allow(missing_docs)]
120        pub auction_id: alloy::sol_types::private::primitives::aliases::U256,
121        #[allow(missing_docs)]
122        pub bidder: alloy::sol_types::private::Address,
123        #[allow(missing_docs)]
124        pub deadline: alloy::sol_types::private::primitives::aliases::U256,
125        #[allow(missing_docs)]
126        pub value: alloy::sol_types::private::primitives::aliases::U256,
127    }
128    #[allow(
129        non_camel_case_types,
130        non_snake_case,
131        clippy::pub_underscore_fields,
132        clippy::style
133    )]
134    const _: () = {
135        use alloy::sol_types as alloy_sol_types;
136        #[automatically_derived]
137        impl alloy_sol_types::SolEvent for BidSubmitted {
138            type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
139            type DataToken<'a> = <Self::DataTuple<
140                'a,
141            > as alloy_sol_types::SolType>::Token<'a>;
142            type TopicList = (
143                alloy_sol_types::sol_data::FixedBytes<32>,
144                alloy::sol_types::sol_data::Uint<256>,
145                alloy::sol_types::sol_data::Address,
146                alloy::sol_types::sol_data::Uint<256>,
147            );
148            const SIGNATURE: &'static str = "BidSubmitted(uint256,address,uint256,uint256)";
149            const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
150                113u8, 165u8, 103u8, 76u8, 68u8, 184u8, 35u8, 188u8, 13u8, 240u8, 130u8,
151                1u8, 223u8, 235u8, 46u8, 139u8, 223u8, 105u8, 140u8, 214u8, 132u8, 253u8,
152                43u8, 186u8, 167u8, 154u8, 220u8, 242u8, 201u8, 159u8, 193u8, 134u8,
153            ]);
154            const ANONYMOUS: bool = false;
155            #[allow(unused_variables)]
156            #[inline]
157            fn new(
158                topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
159                data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
160            ) -> Self {
161                Self {
162                    auction_id: topics.1,
163                    bidder: topics.2,
164                    deadline: topics.3,
165                    value: data.0,
166                }
167            }
168            #[inline]
169            fn check_signature(
170                topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
171            ) -> alloy_sol_types::Result<()> {
172                if topics.0 != Self::SIGNATURE_HASH {
173                    return Err(
174                        alloy_sol_types::Error::invalid_event_signature_hash(
175                            Self::SIGNATURE,
176                            topics.0,
177                            Self::SIGNATURE_HASH,
178                        ),
179                    );
180                }
181                Ok(())
182            }
183            #[inline]
184            fn tokenize_body(&self) -> Self::DataToken<'_> {
185                (
186                    <alloy::sol_types::sol_data::Uint<
187                        256,
188                    > as alloy_sol_types::SolType>::tokenize(&self.value),
189                )
190            }
191            #[inline]
192            fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
193                (
194                    Self::SIGNATURE_HASH.into(),
195                    self.auction_id.clone(),
196                    self.bidder.clone(),
197                    self.deadline.clone(),
198                )
199            }
200            #[inline]
201            fn encode_topics_raw(
202                &self,
203                out: &mut [alloy_sol_types::abi::token::WordToken],
204            ) -> alloy_sol_types::Result<()> {
205                if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
206                    return Err(alloy_sol_types::Error::Overrun);
207                }
208                out[0usize] = alloy_sol_types::abi::token::WordToken(
209                    Self::SIGNATURE_HASH,
210                );
211                out[1usize] = <alloy::sol_types::sol_data::Uint<
212                    256,
213                > as alloy_sol_types::EventTopic>::encode_topic(&self.auction_id);
214                out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
215                    &self.bidder,
216                );
217                out[3usize] = <alloy::sol_types::sol_data::Uint<
218                    256,
219                > as alloy_sol_types::EventTopic>::encode_topic(&self.deadline);
220                Ok(())
221            }
222        }
223        #[automatically_derived]
224        impl alloy_sol_types::private::IntoLogData for BidSubmitted {
225            fn to_log_data(&self) -> alloy_sol_types::private::LogData {
226                From::from(self)
227            }
228            fn into_log_data(self) -> alloy_sol_types::private::LogData {
229                From::from(&self)
230            }
231        }
232        #[automatically_derived]
233        impl From<&BidSubmitted> for alloy_sol_types::private::LogData {
234            #[inline]
235            fn from(this: &BidSubmitted) -> alloy_sol_types::private::LogData {
236                alloy_sol_types::SolEvent::encode_log_data(this)
237            }
238        }
239    };
240    #[derive(Default, Debug, PartialEq, Eq, Hash)]
241    /**Function with signature `submitBid(uint256,uint256,uint256,bytes)` and selector `0x852ca612`.
242```solidity
243function submitBid(uint256 auction_id, uint256 deadline, uint256 value, bytes memory data) external;
244```*/
245    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
246    #[derive(Clone)]
247    pub struct submitBidCall {
248        #[allow(missing_docs)]
249        pub auction_id: alloy::sol_types::private::primitives::aliases::U256,
250        #[allow(missing_docs)]
251        pub deadline: alloy::sol_types::private::primitives::aliases::U256,
252        #[allow(missing_docs)]
253        pub value: alloy::sol_types::private::primitives::aliases::U256,
254        #[allow(missing_docs)]
255        pub data: alloy::sol_types::private::Bytes,
256    }
257    ///Container type for the return parameters of the [`submitBid(uint256,uint256,uint256,bytes)`](submitBidCall) function.
258    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
259    #[derive(Clone)]
260    pub struct submitBidReturn {}
261    #[allow(
262        non_camel_case_types,
263        non_snake_case,
264        clippy::pub_underscore_fields,
265        clippy::style
266    )]
267    const _: () = {
268        use alloy::sol_types as alloy_sol_types;
269        {
270            #[doc(hidden)]
271            type UnderlyingSolTuple<'a> = (
272                alloy::sol_types::sol_data::Uint<256>,
273                alloy::sol_types::sol_data::Uint<256>,
274                alloy::sol_types::sol_data::Uint<256>,
275                alloy::sol_types::sol_data::Bytes,
276            );
277            #[doc(hidden)]
278            type UnderlyingRustTuple<'a> = (
279                alloy::sol_types::private::primitives::aliases::U256,
280                alloy::sol_types::private::primitives::aliases::U256,
281                alloy::sol_types::private::primitives::aliases::U256,
282                alloy::sol_types::private::Bytes,
283            );
284            #[cfg(test)]
285            #[allow(dead_code, unreachable_patterns)]
286            fn _type_assertion(
287                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
288            ) {
289                match _t {
290                    alloy_sol_types::private::AssertTypeEq::<
291                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
292                    >(_) => {}
293                }
294            }
295            #[automatically_derived]
296            #[doc(hidden)]
297            impl ::core::convert::From<submitBidCall> for UnderlyingRustTuple<'_> {
298                fn from(value: submitBidCall) -> Self {
299                    (value.auction_id, value.deadline, value.value, value.data)
300                }
301            }
302            #[automatically_derived]
303            #[doc(hidden)]
304            impl ::core::convert::From<UnderlyingRustTuple<'_>> for submitBidCall {
305                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
306                    Self {
307                        auction_id: tuple.0,
308                        deadline: tuple.1,
309                        value: tuple.2,
310                        data: tuple.3,
311                    }
312                }
313            }
314        }
315        {
316            #[doc(hidden)]
317            type UnderlyingSolTuple<'a> = ();
318            #[doc(hidden)]
319            type UnderlyingRustTuple<'a> = ();
320            #[cfg(test)]
321            #[allow(dead_code, unreachable_patterns)]
322            fn _type_assertion(
323                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
324            ) {
325                match _t {
326                    alloy_sol_types::private::AssertTypeEq::<
327                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
328                    >(_) => {}
329                }
330            }
331            #[automatically_derived]
332            #[doc(hidden)]
333            impl ::core::convert::From<submitBidReturn> for UnderlyingRustTuple<'_> {
334                fn from(value: submitBidReturn) -> Self {
335                    ()
336                }
337            }
338            #[automatically_derived]
339            #[doc(hidden)]
340            impl ::core::convert::From<UnderlyingRustTuple<'_>> for submitBidReturn {
341                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
342                    Self {}
343                }
344            }
345        }
346        #[automatically_derived]
347        impl alloy_sol_types::SolCall for submitBidCall {
348            type Parameters<'a> = (
349                alloy::sol_types::sol_data::Uint<256>,
350                alloy::sol_types::sol_data::Uint<256>,
351                alloy::sol_types::sol_data::Uint<256>,
352                alloy::sol_types::sol_data::Bytes,
353            );
354            type Token<'a> = <Self::Parameters<
355                'a,
356            > as alloy_sol_types::SolType>::Token<'a>;
357            type Return = submitBidReturn;
358            type ReturnTuple<'a> = ();
359            type ReturnToken<'a> = <Self::ReturnTuple<
360                'a,
361            > as alloy_sol_types::SolType>::Token<'a>;
362            const SIGNATURE: &'static str = "submitBid(uint256,uint256,uint256,bytes)";
363            const SELECTOR: [u8; 4] = [133u8, 44u8, 166u8, 18u8];
364            #[inline]
365            fn new<'a>(
366                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
367            ) -> Self {
368                tuple.into()
369            }
370            #[inline]
371            fn tokenize(&self) -> Self::Token<'_> {
372                (
373                    <alloy::sol_types::sol_data::Uint<
374                        256,
375                    > as alloy_sol_types::SolType>::tokenize(&self.auction_id),
376                    <alloy::sol_types::sol_data::Uint<
377                        256,
378                    > as alloy_sol_types::SolType>::tokenize(&self.deadline),
379                    <alloy::sol_types::sol_data::Uint<
380                        256,
381                    > as alloy_sol_types::SolType>::tokenize(&self.value),
382                    <alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
383                        &self.data,
384                    ),
385                )
386            }
387            #[inline]
388            fn abi_decode_returns(
389                data: &[u8],
390                validate: bool,
391            ) -> alloy_sol_types::Result<Self::Return> {
392                <Self::ReturnTuple<
393                    '_,
394                > as alloy_sol_types::SolType>::abi_decode_sequence(data, validate)
395                    .map(Into::into)
396            }
397        }
398    };
399    ///Container for all the [`Auction`](self) function calls.
400    #[derive()]
401    pub enum AuctionCalls {
402        #[allow(missing_docs)]
403        submitBid(submitBidCall),
404    }
405    #[automatically_derived]
406    impl AuctionCalls {
407        /// All the selectors of this enum.
408        ///
409        /// Note that the selectors might not be in the same order as the variants.
410        /// No guarantees are made about the order of the selectors.
411        ///
412        /// Prefer using `SolInterface` methods instead.
413        pub const SELECTORS: &'static [[u8; 4usize]] = &[[133u8, 44u8, 166u8, 18u8]];
414    }
415    #[automatically_derived]
416    impl alloy_sol_types::SolInterface for AuctionCalls {
417        const NAME: &'static str = "AuctionCalls";
418        const MIN_DATA_LENGTH: usize = 160usize;
419        const COUNT: usize = 1usize;
420        #[inline]
421        fn selector(&self) -> [u8; 4] {
422            match self {
423                Self::submitBid(_) => {
424                    <submitBidCall as alloy_sol_types::SolCall>::SELECTOR
425                }
426            }
427        }
428        #[inline]
429        fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
430            Self::SELECTORS.get(i).copied()
431        }
432        #[inline]
433        fn valid_selector(selector: [u8; 4]) -> bool {
434            Self::SELECTORS.binary_search(&selector).is_ok()
435        }
436        #[inline]
437        #[allow(non_snake_case)]
438        fn abi_decode_raw(
439            selector: [u8; 4],
440            data: &[u8],
441            validate: bool,
442        ) -> alloy_sol_types::Result<Self> {
443            static DECODE_SHIMS: &[fn(
444                &[u8],
445                bool,
446            ) -> alloy_sol_types::Result<AuctionCalls>] = &[
447                {
448                    fn submitBid(
449                        data: &[u8],
450                        validate: bool,
451                    ) -> alloy_sol_types::Result<AuctionCalls> {
452                        <submitBidCall as alloy_sol_types::SolCall>::abi_decode_raw(
453                                data,
454                                validate,
455                            )
456                            .map(AuctionCalls::submitBid)
457                    }
458                    submitBid
459                },
460            ];
461            let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
462                return Err(
463                    alloy_sol_types::Error::unknown_selector(
464                        <Self as alloy_sol_types::SolInterface>::NAME,
465                        selector,
466                    ),
467                );
468            };
469            DECODE_SHIMS[idx](data, validate)
470        }
471        #[inline]
472        fn abi_encoded_size(&self) -> usize {
473            match self {
474                Self::submitBid(inner) => {
475                    <submitBidCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
476                }
477            }
478        }
479        #[inline]
480        fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
481            match self {
482                Self::submitBid(inner) => {
483                    <submitBidCall as alloy_sol_types::SolCall>::abi_encode_raw(
484                        inner,
485                        out,
486                    )
487                }
488            }
489        }
490    }
491    ///Container for all the [`Auction`](self) events.
492    #[derive(Debug, PartialEq, Eq, Hash)]
493    pub enum AuctionEvents {
494        #[allow(missing_docs)]
495        BidSubmitted(BidSubmitted),
496    }
497    #[automatically_derived]
498    impl AuctionEvents {
499        /// All the selectors of this enum.
500        ///
501        /// Note that the selectors might not be in the same order as the variants.
502        /// No guarantees are made about the order of the selectors.
503        ///
504        /// Prefer using `SolInterface` methods instead.
505        pub const SELECTORS: &'static [[u8; 32usize]] = &[
506            [
507                113u8, 165u8, 103u8, 76u8, 68u8, 184u8, 35u8, 188u8, 13u8, 240u8, 130u8,
508                1u8, 223u8, 235u8, 46u8, 139u8, 223u8, 105u8, 140u8, 214u8, 132u8, 253u8,
509                43u8, 186u8, 167u8, 154u8, 220u8, 242u8, 201u8, 159u8, 193u8, 134u8,
510            ],
511        ];
512    }
513    #[automatically_derived]
514    impl alloy_sol_types::SolEventInterface for AuctionEvents {
515        const NAME: &'static str = "AuctionEvents";
516        const COUNT: usize = 1usize;
517        fn decode_raw_log(
518            topics: &[alloy_sol_types::Word],
519            data: &[u8],
520            validate: bool,
521        ) -> alloy_sol_types::Result<Self> {
522            match topics.first().copied() {
523                Some(<BidSubmitted as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
524                    <BidSubmitted as alloy_sol_types::SolEvent>::decode_raw_log(
525                            topics,
526                            data,
527                            validate,
528                        )
529                        .map(Self::BidSubmitted)
530                }
531                _ => {
532                    alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
533                        name: <Self as alloy_sol_types::SolEventInterface>::NAME,
534                        log: alloy_sol_types::private::Box::new(
535                            alloy_sol_types::private::LogData::new_unchecked(
536                                topics.to_vec(),
537                                data.to_vec().into(),
538                            ),
539                        ),
540                    })
541                }
542            }
543        }
544    }
545    #[automatically_derived]
546    impl alloy_sol_types::private::IntoLogData for AuctionEvents {
547        fn to_log_data(&self) -> alloy_sol_types::private::LogData {
548            match self {
549                Self::BidSubmitted(inner) => {
550                    alloy_sol_types::private::IntoLogData::to_log_data(inner)
551                }
552            }
553        }
554        fn into_log_data(self) -> alloy_sol_types::private::LogData {
555            match self {
556                Self::BidSubmitted(inner) => {
557                    alloy_sol_types::private::IntoLogData::into_log_data(inner)
558                }
559            }
560        }
561    }
562    use alloy::contract as alloy_contract;
563    /**Creates a new wrapper around an on-chain [`Auction`](self) contract instance.
564
565See the [wrapper's documentation](`AuctionInstance`) for more details.*/
566    #[inline]
567    pub const fn new<
568        T: alloy_contract::private::Transport + ::core::clone::Clone,
569        P: alloy_contract::private::Provider<T, N>,
570        N: alloy_contract::private::Network,
571    >(
572        address: alloy_sol_types::private::Address,
573        provider: P,
574    ) -> AuctionInstance<T, P, N> {
575        AuctionInstance::<T, P, N>::new(address, provider)
576    }
577    /**Deploys this contract using the given `provider` and constructor arguments, if any.
578
579Returns a new instance of the contract, if the deployment was successful.
580
581For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
582    #[inline]
583    pub fn deploy<
584        T: alloy_contract::private::Transport + ::core::clone::Clone,
585        P: alloy_contract::private::Provider<T, N>,
586        N: alloy_contract::private::Network,
587    >(
588        provider: P,
589    ) -> impl ::core::future::Future<
590        Output = alloy_contract::Result<AuctionInstance<T, P, N>>,
591    > {
592        AuctionInstance::<T, P, N>::deploy(provider)
593    }
594    /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
595and constructor arguments, if any.
596
597This is a simple wrapper around creating a `RawCallBuilder` with the data set to
598the bytecode concatenated with the constructor's ABI-encoded arguments.*/
599    #[inline]
600    pub fn deploy_builder<
601        T: alloy_contract::private::Transport + ::core::clone::Clone,
602        P: alloy_contract::private::Provider<T, N>,
603        N: alloy_contract::private::Network,
604    >(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
605        AuctionInstance::<T, P, N>::deploy_builder(provider)
606    }
607    /**A [`Auction`](self) instance.
608
609Contains type-safe methods for interacting with an on-chain instance of the
610[`Auction`](self) contract located at a given `address`, using a given
611provider `P`.
612
613If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
614documentation on how to provide it), the `deploy` and `deploy_builder` methods can
615be used to deploy a new instance of the contract.
616
617See the [module-level documentation](self) for all the available methods.*/
618    #[derive(Clone)]
619    pub struct AuctionInstance<T, P, N = alloy_contract::private::Ethereum> {
620        address: alloy_sol_types::private::Address,
621        provider: P,
622        _network_transport: ::core::marker::PhantomData<(N, T)>,
623    }
624    #[automatically_derived]
625    impl<T, P, N> ::core::fmt::Debug for AuctionInstance<T, P, N> {
626        #[inline]
627        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
628            f.debug_tuple("AuctionInstance").field(&self.address).finish()
629        }
630    }
631    /// Instantiation and getters/setters.
632    #[automatically_derived]
633    impl<
634        T: alloy_contract::private::Transport + ::core::clone::Clone,
635        P: alloy_contract::private::Provider<T, N>,
636        N: alloy_contract::private::Network,
637    > AuctionInstance<T, P, N> {
638        /**Creates a new wrapper around an on-chain [`Auction`](self) contract instance.
639
640See the [wrapper's documentation](`AuctionInstance`) for more details.*/
641        #[inline]
642        pub const fn new(
643            address: alloy_sol_types::private::Address,
644            provider: P,
645        ) -> Self {
646            Self {
647                address,
648                provider,
649                _network_transport: ::core::marker::PhantomData,
650            }
651        }
652        /**Deploys this contract using the given `provider` and constructor arguments, if any.
653
654Returns a new instance of the contract, if the deployment was successful.
655
656For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
657        #[inline]
658        pub async fn deploy(
659            provider: P,
660        ) -> alloy_contract::Result<AuctionInstance<T, P, N>> {
661            let call_builder = Self::deploy_builder(provider);
662            let contract_address = call_builder.deploy().await?;
663            Ok(Self::new(contract_address, call_builder.provider))
664        }
665        /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
666and constructor arguments, if any.
667
668This is a simple wrapper around creating a `RawCallBuilder` with the data set to
669the bytecode concatenated with the constructor's ABI-encoded arguments.*/
670        #[inline]
671        pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
672            alloy_contract::RawCallBuilder::new_raw_deploy(
673                provider,
674                ::core::clone::Clone::clone(&BYTECODE),
675            )
676        }
677        /// Returns a reference to the address.
678        #[inline]
679        pub const fn address(&self) -> &alloy_sol_types::private::Address {
680            &self.address
681        }
682        /// Sets the address.
683        #[inline]
684        pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
685            self.address = address;
686        }
687        /// Sets the address and returns `self`.
688        pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
689            self.set_address(address);
690            self
691        }
692        /// Returns a reference to the provider.
693        #[inline]
694        pub const fn provider(&self) -> &P {
695            &self.provider
696        }
697    }
698    impl<T, P: ::core::clone::Clone, N> AuctionInstance<T, &P, N> {
699        /// Clones the provider and returns a new instance with the cloned provider.
700        #[inline]
701        pub fn with_cloned_provider(self) -> AuctionInstance<T, P, N> {
702            AuctionInstance {
703                address: self.address,
704                provider: ::core::clone::Clone::clone(&self.provider),
705                _network_transport: ::core::marker::PhantomData,
706            }
707        }
708    }
709    /// Function calls.
710    #[automatically_derived]
711    impl<
712        T: alloy_contract::private::Transport + ::core::clone::Clone,
713        P: alloy_contract::private::Provider<T, N>,
714        N: alloy_contract::private::Network,
715    > AuctionInstance<T, P, N> {
716        /// Creates a new call builder using this contract instance's provider and address.
717        ///
718        /// Note that the call can be any function call, not just those defined in this
719        /// contract. Prefer using the other methods for building type-safe contract calls.
720        pub fn call_builder<C: alloy_sol_types::SolCall>(
721            &self,
722            call: &C,
723        ) -> alloy_contract::SolCallBuilder<T, &P, C, N> {
724            alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
725        }
726        ///Creates a new call builder for the [`submitBid`] function.
727        pub fn submitBid(
728            &self,
729            auction_id: alloy::sol_types::private::primitives::aliases::U256,
730            deadline: alloy::sol_types::private::primitives::aliases::U256,
731            value: alloy::sol_types::private::primitives::aliases::U256,
732            data: alloy::sol_types::private::Bytes,
733        ) -> alloy_contract::SolCallBuilder<T, &P, submitBidCall, N> {
734            self.call_builder(
735                &submitBidCall {
736                    auction_id,
737                    deadline,
738                    value,
739                    data,
740                },
741            )
742        }
743    }
744    /// Event filters.
745    #[automatically_derived]
746    impl<
747        T: alloy_contract::private::Transport + ::core::clone::Clone,
748        P: alloy_contract::private::Provider<T, N>,
749        N: alloy_contract::private::Network,
750    > AuctionInstance<T, P, N> {
751        /// Creates a new event filter using this contract instance's provider and address.
752        ///
753        /// Note that the type can be any event, not just those defined in this contract.
754        /// Prefer using the other methods for building type-safe event filters.
755        pub fn event_filter<E: alloy_sol_types::SolEvent>(
756            &self,
757        ) -> alloy_contract::Event<T, &P, E, N> {
758            alloy_contract::Event::new_sol(&self.provider, &self.address)
759        }
760        ///Creates a new event filter for the [`BidSubmitted`] event.
761        pub fn BidSubmitted_filter(
762            &self,
763        ) -> alloy_contract::Event<T, &P, BidSubmitted, N> {
764            self.event_filter::<BidSubmitted>()
765        }
766    }
767}