pod_examples_solidity/
i_auction.rs

1/**
2
3Generated by the following Solidity interface...
4```solidity
5interface IAuction {
6    event BidSubmitted(uint256 indexed auction_id, address indexed bidder, uint128 indexed deadline, uint256 value, bytes data);
7
8    function submitBid(uint256 auction_id, uint128 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": "uint128",
27        "internalType": "uint128"
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": "uint128",
62        "indexed": true,
63        "internalType": "uint128"
64      },
65      {
66        "name": "value",
67        "type": "uint256",
68        "indexed": false,
69        "internalType": "uint256"
70      },
71      {
72        "name": "data",
73        "type": "bytes",
74        "indexed": false,
75        "internalType": "bytes"
76      }
77    ],
78    "anonymous": false
79  }
80]
81```*/
82#[allow(
83    non_camel_case_types,
84    non_snake_case,
85    clippy::pub_underscore_fields,
86    clippy::style,
87    clippy::empty_structs_with_brackets
88)]
89pub mod IAuction {
90    use super::*;
91    use alloy::sol_types as alloy_sol_types;
92    /// The creation / init bytecode of the contract.
93    ///
94    /// ```text
95    ///0x
96    /// ```
97    #[rustfmt::skip]
98    #[allow(clippy::all)]
99    pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
100        b"",
101    );
102    /// The runtime bytecode of the contract, as deployed on the network.
103    ///
104    /// ```text
105    ///0x
106    /// ```
107    #[rustfmt::skip]
108    #[allow(clippy::all)]
109    pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
110        b"",
111    );
112    #[derive(serde::Serialize, serde::Deserialize)]
113    #[derive(Default, Debug, PartialEq, Eq, Hash)]
114    /**Event with signature `BidSubmitted(uint256,address,uint128,uint256,bytes)` and selector `0x806272c24aea574d3f28a82cc2ef3a49be7d211ce0497a2c174f8dc1c4c7faf3`.
115```solidity
116event BidSubmitted(uint256 indexed auction_id, address indexed bidder, uint128 indexed deadline, uint256 value, bytes data);
117```*/
118    #[allow(
119        non_camel_case_types,
120        non_snake_case,
121        clippy::pub_underscore_fields,
122        clippy::style
123    )]
124    #[derive(Clone)]
125    pub struct BidSubmitted {
126        #[allow(missing_docs)]
127        pub auction_id: alloy::sol_types::private::primitives::aliases::U256,
128        #[allow(missing_docs)]
129        pub bidder: alloy::sol_types::private::Address,
130        #[allow(missing_docs)]
131        pub deadline: u128,
132        #[allow(missing_docs)]
133        pub value: alloy::sol_types::private::primitives::aliases::U256,
134        #[allow(missing_docs)]
135        pub data: alloy::sol_types::private::Bytes,
136    }
137    #[allow(
138        non_camel_case_types,
139        non_snake_case,
140        clippy::pub_underscore_fields,
141        clippy::style
142    )]
143    const _: () = {
144        use alloy::sol_types as alloy_sol_types;
145        #[automatically_derived]
146        impl alloy_sol_types::SolEvent for BidSubmitted {
147            type DataTuple<'a> = (
148                alloy::sol_types::sol_data::Uint<256>,
149                alloy::sol_types::sol_data::Bytes,
150            );
151            type DataToken<'a> = <Self::DataTuple<
152                'a,
153            > as alloy_sol_types::SolType>::Token<'a>;
154            type TopicList = (
155                alloy_sol_types::sol_data::FixedBytes<32>,
156                alloy::sol_types::sol_data::Uint<256>,
157                alloy::sol_types::sol_data::Address,
158                alloy::sol_types::sol_data::Uint<128>,
159            );
160            const SIGNATURE: &'static str = "BidSubmitted(uint256,address,uint128,uint256,bytes)";
161            const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
162                128u8, 98u8, 114u8, 194u8, 74u8, 234u8, 87u8, 77u8, 63u8, 40u8, 168u8,
163                44u8, 194u8, 239u8, 58u8, 73u8, 190u8, 125u8, 33u8, 28u8, 224u8, 73u8,
164                122u8, 44u8, 23u8, 79u8, 141u8, 193u8, 196u8, 199u8, 250u8, 243u8,
165            ]);
166            const ANONYMOUS: bool = false;
167            #[allow(unused_variables)]
168            #[inline]
169            fn new(
170                topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
171                data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
172            ) -> Self {
173                Self {
174                    auction_id: topics.1,
175                    bidder: topics.2,
176                    deadline: topics.3,
177                    value: data.0,
178                    data: data.1,
179                }
180            }
181            #[inline]
182            fn check_signature(
183                topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
184            ) -> alloy_sol_types::Result<()> {
185                if topics.0 != Self::SIGNATURE_HASH {
186                    return Err(
187                        alloy_sol_types::Error::invalid_event_signature_hash(
188                            Self::SIGNATURE,
189                            topics.0,
190                            Self::SIGNATURE_HASH,
191                        ),
192                    );
193                }
194                Ok(())
195            }
196            #[inline]
197            fn tokenize_body(&self) -> Self::DataToken<'_> {
198                (
199                    <alloy::sol_types::sol_data::Uint<
200                        256,
201                    > as alloy_sol_types::SolType>::tokenize(&self.value),
202                    <alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
203                        &self.data,
204                    ),
205                )
206            }
207            #[inline]
208            fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
209                (
210                    Self::SIGNATURE_HASH.into(),
211                    self.auction_id.clone(),
212                    self.bidder.clone(),
213                    self.deadline.clone(),
214                )
215            }
216            #[inline]
217            fn encode_topics_raw(
218                &self,
219                out: &mut [alloy_sol_types::abi::token::WordToken],
220            ) -> alloy_sol_types::Result<()> {
221                if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
222                    return Err(alloy_sol_types::Error::Overrun);
223                }
224                out[0usize] = alloy_sol_types::abi::token::WordToken(
225                    Self::SIGNATURE_HASH,
226                );
227                out[1usize] = <alloy::sol_types::sol_data::Uint<
228                    256,
229                > as alloy_sol_types::EventTopic>::encode_topic(&self.auction_id);
230                out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
231                    &self.bidder,
232                );
233                out[3usize] = <alloy::sol_types::sol_data::Uint<
234                    128,
235                > as alloy_sol_types::EventTopic>::encode_topic(&self.deadline);
236                Ok(())
237            }
238        }
239        #[automatically_derived]
240        impl alloy_sol_types::private::IntoLogData for BidSubmitted {
241            fn to_log_data(&self) -> alloy_sol_types::private::LogData {
242                From::from(self)
243            }
244            fn into_log_data(self) -> alloy_sol_types::private::LogData {
245                From::from(&self)
246            }
247        }
248        #[automatically_derived]
249        impl From<&BidSubmitted> for alloy_sol_types::private::LogData {
250            #[inline]
251            fn from(this: &BidSubmitted) -> alloy_sol_types::private::LogData {
252                alloy_sol_types::SolEvent::encode_log_data(this)
253            }
254        }
255    };
256    #[derive(serde::Serialize, serde::Deserialize)]
257    #[derive(Default, Debug, PartialEq, Eq, Hash)]
258    /**Function with signature `submitBid(uint256,uint128,uint256,bytes)` and selector `0x4633b57b`.
259```solidity
260function submitBid(uint256 auction_id, uint128 deadline, uint256 value, bytes memory data) external;
261```*/
262    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
263    #[derive(Clone)]
264    pub struct submitBidCall {
265        #[allow(missing_docs)]
266        pub auction_id: alloy::sol_types::private::primitives::aliases::U256,
267        #[allow(missing_docs)]
268        pub deadline: u128,
269        #[allow(missing_docs)]
270        pub value: alloy::sol_types::private::primitives::aliases::U256,
271        #[allow(missing_docs)]
272        pub data: alloy::sol_types::private::Bytes,
273    }
274    ///Container type for the return parameters of the [`submitBid(uint256,uint128,uint256,bytes)`](submitBidCall) function.
275    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
276    #[derive(Clone)]
277    pub struct submitBidReturn {}
278    #[allow(
279        non_camel_case_types,
280        non_snake_case,
281        clippy::pub_underscore_fields,
282        clippy::style
283    )]
284    const _: () = {
285        use alloy::sol_types as alloy_sol_types;
286        {
287            #[doc(hidden)]
288            #[allow(dead_code)]
289            type UnderlyingSolTuple<'a> = (
290                alloy::sol_types::sol_data::Uint<256>,
291                alloy::sol_types::sol_data::Uint<128>,
292                alloy::sol_types::sol_data::Uint<256>,
293                alloy::sol_types::sol_data::Bytes,
294            );
295            #[doc(hidden)]
296            type UnderlyingRustTuple<'a> = (
297                alloy::sol_types::private::primitives::aliases::U256,
298                u128,
299                alloy::sol_types::private::primitives::aliases::U256,
300                alloy::sol_types::private::Bytes,
301            );
302            #[cfg(test)]
303            #[allow(dead_code, unreachable_patterns)]
304            fn _type_assertion(
305                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
306            ) {
307                match _t {
308                    alloy_sol_types::private::AssertTypeEq::<
309                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
310                    >(_) => {}
311                }
312            }
313            #[automatically_derived]
314            #[doc(hidden)]
315            impl ::core::convert::From<submitBidCall> for UnderlyingRustTuple<'_> {
316                fn from(value: submitBidCall) -> Self {
317                    (value.auction_id, value.deadline, value.value, value.data)
318                }
319            }
320            #[automatically_derived]
321            #[doc(hidden)]
322            impl ::core::convert::From<UnderlyingRustTuple<'_>> for submitBidCall {
323                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
324                    Self {
325                        auction_id: tuple.0,
326                        deadline: tuple.1,
327                        value: tuple.2,
328                        data: tuple.3,
329                    }
330                }
331            }
332        }
333        {
334            #[doc(hidden)]
335            #[allow(dead_code)]
336            type UnderlyingSolTuple<'a> = ();
337            #[doc(hidden)]
338            type UnderlyingRustTuple<'a> = ();
339            #[cfg(test)]
340            #[allow(dead_code, unreachable_patterns)]
341            fn _type_assertion(
342                _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
343            ) {
344                match _t {
345                    alloy_sol_types::private::AssertTypeEq::<
346                        <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
347                    >(_) => {}
348                }
349            }
350            #[automatically_derived]
351            #[doc(hidden)]
352            impl ::core::convert::From<submitBidReturn> for UnderlyingRustTuple<'_> {
353                fn from(value: submitBidReturn) -> Self {
354                    ()
355                }
356            }
357            #[automatically_derived]
358            #[doc(hidden)]
359            impl ::core::convert::From<UnderlyingRustTuple<'_>> for submitBidReturn {
360                fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
361                    Self {}
362                }
363            }
364        }
365        impl submitBidReturn {
366            fn _tokenize(
367                &self,
368            ) -> <submitBidCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
369                ()
370            }
371        }
372        #[automatically_derived]
373        impl alloy_sol_types::SolCall for submitBidCall {
374            type Parameters<'a> = (
375                alloy::sol_types::sol_data::Uint<256>,
376                alloy::sol_types::sol_data::Uint<128>,
377                alloy::sol_types::sol_data::Uint<256>,
378                alloy::sol_types::sol_data::Bytes,
379            );
380            type Token<'a> = <Self::Parameters<
381                'a,
382            > as alloy_sol_types::SolType>::Token<'a>;
383            type Return = submitBidReturn;
384            type ReturnTuple<'a> = ();
385            type ReturnToken<'a> = <Self::ReturnTuple<
386                'a,
387            > as alloy_sol_types::SolType>::Token<'a>;
388            const SIGNATURE: &'static str = "submitBid(uint256,uint128,uint256,bytes)";
389            const SELECTOR: [u8; 4] = [70u8, 51u8, 181u8, 123u8];
390            #[inline]
391            fn new<'a>(
392                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
393            ) -> Self {
394                tuple.into()
395            }
396            #[inline]
397            fn tokenize(&self) -> Self::Token<'_> {
398                (
399                    <alloy::sol_types::sol_data::Uint<
400                        256,
401                    > as alloy_sol_types::SolType>::tokenize(&self.auction_id),
402                    <alloy::sol_types::sol_data::Uint<
403                        128,
404                    > as alloy_sol_types::SolType>::tokenize(&self.deadline),
405                    <alloy::sol_types::sol_data::Uint<
406                        256,
407                    > as alloy_sol_types::SolType>::tokenize(&self.value),
408                    <alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
409                        &self.data,
410                    ),
411                )
412            }
413            #[inline]
414            fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
415                submitBidReturn::_tokenize(ret)
416            }
417            #[inline]
418            fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
419                <Self::ReturnTuple<
420                    '_,
421                > as alloy_sol_types::SolType>::abi_decode_sequence(data)
422                    .map(Into::into)
423            }
424            #[inline]
425            fn abi_decode_returns_validate(
426                data: &[u8],
427            ) -> alloy_sol_types::Result<Self::Return> {
428                <Self::ReturnTuple<
429                    '_,
430                > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
431                    .map(Into::into)
432            }
433        }
434    };
435    ///Container for all the [`IAuction`](self) function calls.
436    #[derive(Clone)]
437    #[derive(serde::Serialize, serde::Deserialize)]
438    #[derive()]
439    pub enum IAuctionCalls {
440        #[allow(missing_docs)]
441        submitBid(submitBidCall),
442    }
443    impl IAuctionCalls {
444        /// All the selectors of this enum.
445        ///
446        /// Note that the selectors might not be in the same order as the variants.
447        /// No guarantees are made about the order of the selectors.
448        ///
449        /// Prefer using `SolInterface` methods instead.
450        pub const SELECTORS: &'static [[u8; 4usize]] = &[[70u8, 51u8, 181u8, 123u8]];
451        /// The names of the variants in the same order as `SELECTORS`.
452        pub const VARIANT_NAMES: &'static [&'static str] = &[
453            ::core::stringify!(submitBid),
454        ];
455        /// The signatures in the same order as `SELECTORS`.
456        pub const SIGNATURES: &'static [&'static str] = &[
457            <submitBidCall as alloy_sol_types::SolCall>::SIGNATURE,
458        ];
459        /// Returns the signature for the given selector, if known.
460        #[inline]
461        pub fn signature_by_selector(
462            selector: [u8; 4usize],
463        ) -> ::core::option::Option<&'static str> {
464            match Self::SELECTORS.binary_search(&selector) {
465                ::core::result::Result::Ok(idx) => {
466                    ::core::option::Option::Some(Self::SIGNATURES[idx])
467                }
468                ::core::result::Result::Err(_) => ::core::option::Option::None,
469            }
470        }
471        /// Returns the enum variant name for the given selector, if known.
472        #[inline]
473        pub fn name_by_selector(
474            selector: [u8; 4usize],
475        ) -> ::core::option::Option<&'static str> {
476            let sig = Self::signature_by_selector(selector)?;
477            sig.split_once('(').map(|(name, _)| name)
478        }
479    }
480    #[automatically_derived]
481    impl alloy_sol_types::SolInterface for IAuctionCalls {
482        const NAME: &'static str = "IAuctionCalls";
483        const MIN_DATA_LENGTH: usize = 160usize;
484        const COUNT: usize = 1usize;
485        #[inline]
486        fn selector(&self) -> [u8; 4] {
487            match self {
488                Self::submitBid(_) => {
489                    <submitBidCall as alloy_sol_types::SolCall>::SELECTOR
490                }
491            }
492        }
493        #[inline]
494        fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
495            Self::SELECTORS.get(i).copied()
496        }
497        #[inline]
498        fn valid_selector(selector: [u8; 4]) -> bool {
499            Self::SELECTORS.binary_search(&selector).is_ok()
500        }
501        #[inline]
502        #[allow(non_snake_case)]
503        fn abi_decode_raw(
504            selector: [u8; 4],
505            data: &[u8],
506        ) -> alloy_sol_types::Result<Self> {
507            static DECODE_SHIMS: &[fn(
508                &[u8],
509            ) -> alloy_sol_types::Result<IAuctionCalls>] = &[
510                {
511                    fn submitBid(data: &[u8]) -> alloy_sol_types::Result<IAuctionCalls> {
512                        <submitBidCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
513                            .map(IAuctionCalls::submitBid)
514                    }
515                    submitBid
516                },
517            ];
518            let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
519                return Err(
520                    alloy_sol_types::Error::unknown_selector(
521                        <Self as alloy_sol_types::SolInterface>::NAME,
522                        selector,
523                    ),
524                );
525            };
526            DECODE_SHIMS[idx](data)
527        }
528        #[inline]
529        #[allow(non_snake_case)]
530        fn abi_decode_raw_validate(
531            selector: [u8; 4],
532            data: &[u8],
533        ) -> alloy_sol_types::Result<Self> {
534            static DECODE_VALIDATE_SHIMS: &[fn(
535                &[u8],
536            ) -> alloy_sol_types::Result<IAuctionCalls>] = &[
537                {
538                    fn submitBid(data: &[u8]) -> alloy_sol_types::Result<IAuctionCalls> {
539                        <submitBidCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
540                                data,
541                            )
542                            .map(IAuctionCalls::submitBid)
543                    }
544                    submitBid
545                },
546            ];
547            let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
548                return Err(
549                    alloy_sol_types::Error::unknown_selector(
550                        <Self as alloy_sol_types::SolInterface>::NAME,
551                        selector,
552                    ),
553                );
554            };
555            DECODE_VALIDATE_SHIMS[idx](data)
556        }
557        #[inline]
558        fn abi_encoded_size(&self) -> usize {
559            match self {
560                Self::submitBid(inner) => {
561                    <submitBidCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
562                }
563            }
564        }
565        #[inline]
566        fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
567            match self {
568                Self::submitBid(inner) => {
569                    <submitBidCall as alloy_sol_types::SolCall>::abi_encode_raw(
570                        inner,
571                        out,
572                    )
573                }
574            }
575        }
576    }
577    ///Container for all the [`IAuction`](self) events.
578    #[derive(Clone)]
579    #[derive(serde::Serialize, serde::Deserialize)]
580    #[derive(Debug, PartialEq, Eq, Hash)]
581    pub enum IAuctionEvents {
582        #[allow(missing_docs)]
583        BidSubmitted(BidSubmitted),
584    }
585    impl IAuctionEvents {
586        /// All the selectors of this enum.
587        ///
588        /// Note that the selectors might not be in the same order as the variants.
589        /// No guarantees are made about the order of the selectors.
590        ///
591        /// Prefer using `SolInterface` methods instead.
592        pub const SELECTORS: &'static [[u8; 32usize]] = &[
593            [
594                128u8, 98u8, 114u8, 194u8, 74u8, 234u8, 87u8, 77u8, 63u8, 40u8, 168u8,
595                44u8, 194u8, 239u8, 58u8, 73u8, 190u8, 125u8, 33u8, 28u8, 224u8, 73u8,
596                122u8, 44u8, 23u8, 79u8, 141u8, 193u8, 196u8, 199u8, 250u8, 243u8,
597            ],
598        ];
599        /// The names of the variants in the same order as `SELECTORS`.
600        pub const VARIANT_NAMES: &'static [&'static str] = &[
601            ::core::stringify!(BidSubmitted),
602        ];
603        /// The signatures in the same order as `SELECTORS`.
604        pub const SIGNATURES: &'static [&'static str] = &[
605            <BidSubmitted as alloy_sol_types::SolEvent>::SIGNATURE,
606        ];
607        /// Returns the signature for the given selector, if known.
608        #[inline]
609        pub fn signature_by_selector(
610            selector: [u8; 32usize],
611        ) -> ::core::option::Option<&'static str> {
612            match Self::SELECTORS.binary_search(&selector) {
613                ::core::result::Result::Ok(idx) => {
614                    ::core::option::Option::Some(Self::SIGNATURES[idx])
615                }
616                ::core::result::Result::Err(_) => ::core::option::Option::None,
617            }
618        }
619        /// Returns the enum variant name for the given selector, if known.
620        #[inline]
621        pub fn name_by_selector(
622            selector: [u8; 32usize],
623        ) -> ::core::option::Option<&'static str> {
624            let sig = Self::signature_by_selector(selector)?;
625            sig.split_once('(').map(|(name, _)| name)
626        }
627    }
628    #[automatically_derived]
629    impl alloy_sol_types::SolEventInterface for IAuctionEvents {
630        const NAME: &'static str = "IAuctionEvents";
631        const COUNT: usize = 1usize;
632        fn decode_raw_log(
633            topics: &[alloy_sol_types::Word],
634            data: &[u8],
635        ) -> alloy_sol_types::Result<Self> {
636            match topics.first().copied() {
637                Some(<BidSubmitted as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
638                    <BidSubmitted as alloy_sol_types::SolEvent>::decode_raw_log(
639                            topics,
640                            data,
641                        )
642                        .map(Self::BidSubmitted)
643                }
644                _ => {
645                    alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
646                        name: <Self as alloy_sol_types::SolEventInterface>::NAME,
647                        log: alloy_sol_types::private::Box::new(
648                            alloy_sol_types::private::LogData::new_unchecked(
649                                topics.to_vec(),
650                                data.to_vec().into(),
651                            ),
652                        ),
653                    })
654                }
655            }
656        }
657    }
658    #[automatically_derived]
659    impl alloy_sol_types::private::IntoLogData for IAuctionEvents {
660        fn to_log_data(&self) -> alloy_sol_types::private::LogData {
661            match self {
662                Self::BidSubmitted(inner) => {
663                    alloy_sol_types::private::IntoLogData::to_log_data(inner)
664                }
665            }
666        }
667        fn into_log_data(self) -> alloy_sol_types::private::LogData {
668            match self {
669                Self::BidSubmitted(inner) => {
670                    alloy_sol_types::private::IntoLogData::into_log_data(inner)
671                }
672            }
673        }
674    }
675    use alloy::contract as alloy_contract;
676    /**Creates a new wrapper around an on-chain [`IAuction`](self) contract instance.
677
678See the [wrapper's documentation](`IAuctionInstance`) for more details.*/
679    #[inline]
680    pub const fn new<
681        P: alloy_contract::private::Provider<N>,
682        N: alloy_contract::private::Network,
683    >(
684        address: alloy_sol_types::private::Address,
685        __provider: P,
686    ) -> IAuctionInstance<P, N> {
687        IAuctionInstance::<P, N>::new(address, __provider)
688    }
689    /**Deploys this contract using the given `provider` and constructor arguments, if any.
690
691Returns a new instance of the contract, if the deployment was successful.
692
693For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
694    #[inline]
695    pub fn deploy<
696        P: alloy_contract::private::Provider<N>,
697        N: alloy_contract::private::Network,
698    >(
699        __provider: P,
700    ) -> impl ::core::future::Future<
701        Output = alloy_contract::Result<IAuctionInstance<P, N>>,
702    > {
703        IAuctionInstance::<P, N>::deploy(__provider)
704    }
705    /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
706and constructor arguments, if any.
707
708This is a simple wrapper around creating a `RawCallBuilder` with the data set to
709the bytecode concatenated with the constructor's ABI-encoded arguments.*/
710    #[inline]
711    pub fn deploy_builder<
712        P: alloy_contract::private::Provider<N>,
713        N: alloy_contract::private::Network,
714    >(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
715        IAuctionInstance::<P, N>::deploy_builder(__provider)
716    }
717    /**A [`IAuction`](self) instance.
718
719Contains type-safe methods for interacting with an on-chain instance of the
720[`IAuction`](self) contract located at a given `address`, using a given
721provider `P`.
722
723If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
724documentation on how to provide it), the `deploy` and `deploy_builder` methods can
725be used to deploy a new instance of the contract.
726
727See the [module-level documentation](self) for all the available methods.*/
728    #[derive(Clone)]
729    pub struct IAuctionInstance<P, N = alloy_contract::private::Ethereum> {
730        address: alloy_sol_types::private::Address,
731        provider: P,
732        _network: ::core::marker::PhantomData<N>,
733    }
734    #[automatically_derived]
735    impl<P, N> ::core::fmt::Debug for IAuctionInstance<P, N> {
736        #[inline]
737        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
738            f.debug_tuple("IAuctionInstance").field(&self.address).finish()
739        }
740    }
741    /// Instantiation and getters/setters.
742    impl<
743        P: alloy_contract::private::Provider<N>,
744        N: alloy_contract::private::Network,
745    > IAuctionInstance<P, N> {
746        /**Creates a new wrapper around an on-chain [`IAuction`](self) contract instance.
747
748See the [wrapper's documentation](`IAuctionInstance`) for more details.*/
749        #[inline]
750        pub const fn new(
751            address: alloy_sol_types::private::Address,
752            __provider: P,
753        ) -> Self {
754            Self {
755                address,
756                provider: __provider,
757                _network: ::core::marker::PhantomData,
758            }
759        }
760        /**Deploys this contract using the given `provider` and constructor arguments, if any.
761
762Returns a new instance of the contract, if the deployment was successful.
763
764For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
765        #[inline]
766        pub async fn deploy(
767            __provider: P,
768        ) -> alloy_contract::Result<IAuctionInstance<P, N>> {
769            let call_builder = Self::deploy_builder(__provider);
770            let contract_address = call_builder.deploy().await?;
771            Ok(Self::new(contract_address, call_builder.provider))
772        }
773        /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
774and constructor arguments, if any.
775
776This is a simple wrapper around creating a `RawCallBuilder` with the data set to
777the bytecode concatenated with the constructor's ABI-encoded arguments.*/
778        #[inline]
779        pub fn deploy_builder(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
780            alloy_contract::RawCallBuilder::new_raw_deploy(
781                __provider,
782                ::core::clone::Clone::clone(&BYTECODE),
783            )
784        }
785        /// Returns a reference to the address.
786        #[inline]
787        pub const fn address(&self) -> &alloy_sol_types::private::Address {
788            &self.address
789        }
790        /// Sets the address.
791        #[inline]
792        pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
793            self.address = address;
794        }
795        /// Sets the address and returns `self`.
796        pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
797            self.set_address(address);
798            self
799        }
800        /// Returns a reference to the provider.
801        #[inline]
802        pub const fn provider(&self) -> &P {
803            &self.provider
804        }
805    }
806    impl<P: ::core::clone::Clone, N> IAuctionInstance<&P, N> {
807        /// Clones the provider and returns a new instance with the cloned provider.
808        #[inline]
809        pub fn with_cloned_provider(self) -> IAuctionInstance<P, N> {
810            IAuctionInstance {
811                address: self.address,
812                provider: ::core::clone::Clone::clone(&self.provider),
813                _network: ::core::marker::PhantomData,
814            }
815        }
816    }
817    /// Function calls.
818    impl<
819        P: alloy_contract::private::Provider<N>,
820        N: alloy_contract::private::Network,
821    > IAuctionInstance<P, N> {
822        /// Creates a new call builder using this contract instance's provider and address.
823        ///
824        /// Note that the call can be any function call, not just those defined in this
825        /// contract. Prefer using the other methods for building type-safe contract calls.
826        pub fn call_builder<C: alloy_sol_types::SolCall>(
827            &self,
828            call: &C,
829        ) -> alloy_contract::SolCallBuilder<&P, C, N> {
830            alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
831        }
832        ///Creates a new call builder for the [`submitBid`] function.
833        pub fn submitBid(
834            &self,
835            auction_id: alloy::sol_types::private::primitives::aliases::U256,
836            deadline: u128,
837            value: alloy::sol_types::private::primitives::aliases::U256,
838            data: alloy::sol_types::private::Bytes,
839        ) -> alloy_contract::SolCallBuilder<&P, submitBidCall, N> {
840            self.call_builder(
841                &submitBidCall {
842                    auction_id,
843                    deadline,
844                    value,
845                    data,
846                },
847            )
848        }
849    }
850    /// Event filters.
851    impl<
852        P: alloy_contract::private::Provider<N>,
853        N: alloy_contract::private::Network,
854    > IAuctionInstance<P, N> {
855        /// Creates a new event filter using this contract instance's provider and address.
856        ///
857        /// Note that the type can be any event, not just those defined in this contract.
858        /// Prefer using the other methods for building type-safe event filters.
859        pub fn event_filter<E: alloy_sol_types::SolEvent>(
860            &self,
861        ) -> alloy_contract::Event<&P, E, N> {
862            alloy_contract::Event::new_sol(&self.provider, &self.address)
863        }
864        ///Creates a new event filter for the [`BidSubmitted`] event.
865        pub fn BidSubmitted_filter(&self) -> alloy_contract::Event<&P, BidSubmitted, N> {
866            self.event_filter::<BidSubmitted>()
867        }
868    }
869}