Skip to main content

cartesi_rollups_contracts/
strings.rs

1/**
2
3Generated by the following Solidity interface...
4```solidity
5interface Strings {
6    error StringsInsufficientHexLength(uint256 value, uint256 length);
7    error StringsInvalidAddressFormat();
8    error StringsInvalidChar();
9}
10```
11
12...which was generated by the following JSON ABI:
13```json
14[
15  {
16    "type": "error",
17    "name": "StringsInsufficientHexLength",
18    "inputs": [
19      {
20        "name": "value",
21        "type": "uint256",
22        "internalType": "uint256"
23      },
24      {
25        "name": "length",
26        "type": "uint256",
27        "internalType": "uint256"
28      }
29    ]
30  },
31  {
32    "type": "error",
33    "name": "StringsInvalidAddressFormat",
34    "inputs": []
35  },
36  {
37    "type": "error",
38    "name": "StringsInvalidChar",
39    "inputs": []
40  }
41]
42```*/
43#[allow(
44    non_camel_case_types,
45    non_snake_case,
46    clippy::pub_underscore_fields,
47    clippy::style,
48    clippy::empty_structs_with_brackets
49)]
50pub mod Strings {
51    use super::*;
52    use alloy::sol_types as alloy_sol_types;
53    /// The creation / init bytecode of the contract.
54    ///
55    /// ```text
56    ///0x6080806040523460175760399081601c823930815050f35b5f80fdfe5f80fdfea26469706673582212201495f7451aa918916908ffc19e0fc86a755ba78111ee397ac020c478cd2da4cb64736f6c634300081e0033
57    /// ```
58    #[rustfmt::skip]
59    #[allow(clippy::all)]
60    pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
61        b"`\x80\x80`@R4`\x17W`9\x90\x81`\x1C\x8290\x81PP\xF3[_\x80\xFD\xFE_\x80\xFD\xFE\xA2dipfsX\"\x12 \x14\x95\xF7E\x1A\xA9\x18\x91i\x08\xFF\xC1\x9E\x0F\xC8ju[\xA7\x81\x11\xEE9z\xC0 \xC4x\xCD-\xA4\xCBdsolcC\0\x08\x1E\x003",
62    );
63    /// The runtime bytecode of the contract, as deployed on the network.
64    ///
65    /// ```text
66    ///0x5f80fdfea26469706673582212201495f7451aa918916908ffc19e0fc86a755ba78111ee397ac020c478cd2da4cb64736f6c634300081e0033
67    /// ```
68    #[rustfmt::skip]
69    #[allow(clippy::all)]
70    pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
71        b"_\x80\xFD\xFE\xA2dipfsX\"\x12 \x14\x95\xF7E\x1A\xA9\x18\x91i\x08\xFF\xC1\x9E\x0F\xC8ju[\xA7\x81\x11\xEE9z\xC0 \xC4x\xCD-\xA4\xCBdsolcC\0\x08\x1E\x003",
72    );
73    #[derive(serde::Serialize, serde::Deserialize)]
74    #[derive(Default, Debug, PartialEq, Eq, Hash)]
75    /**Custom error with signature `StringsInsufficientHexLength(uint256,uint256)` and selector `0xe22e27eb`.
76```solidity
77error StringsInsufficientHexLength(uint256 value, uint256 length);
78```*/
79    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
80    #[derive(Clone)]
81    pub struct StringsInsufficientHexLength {
82        #[allow(missing_docs)]
83        pub value: alloy::sol_types::private::primitives::aliases::U256,
84        #[allow(missing_docs)]
85        pub length: alloy::sol_types::private::primitives::aliases::U256,
86    }
87    #[allow(
88        non_camel_case_types,
89        non_snake_case,
90        clippy::pub_underscore_fields,
91        clippy::style
92    )]
93    const _: () = {
94        use alloy::sol_types as alloy_sol_types;
95        #[doc(hidden)]
96        #[allow(dead_code)]
97        type UnderlyingSolTuple<'a> = (
98            alloy::sol_types::sol_data::Uint<256>,
99            alloy::sol_types::sol_data::Uint<256>,
100        );
101        #[doc(hidden)]
102        type UnderlyingRustTuple<'a> = (
103            alloy::sol_types::private::primitives::aliases::U256,
104            alloy::sol_types::private::primitives::aliases::U256,
105        );
106        #[cfg(test)]
107        #[allow(dead_code, unreachable_patterns)]
108        fn _type_assertion(
109            _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
110        ) {
111            match _t {
112                alloy_sol_types::private::AssertTypeEq::<
113                    <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
114                >(_) => {}
115            }
116        }
117        #[automatically_derived]
118        #[doc(hidden)]
119        impl ::core::convert::From<StringsInsufficientHexLength>
120        for UnderlyingRustTuple<'_> {
121            fn from(value: StringsInsufficientHexLength) -> Self {
122                (value.value, value.length)
123            }
124        }
125        #[automatically_derived]
126        #[doc(hidden)]
127        impl ::core::convert::From<UnderlyingRustTuple<'_>>
128        for StringsInsufficientHexLength {
129            fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
130                Self {
131                    value: tuple.0,
132                    length: tuple.1,
133                }
134            }
135        }
136        #[automatically_derived]
137        impl alloy_sol_types::SolError for StringsInsufficientHexLength {
138            type Parameters<'a> = UnderlyingSolTuple<'a>;
139            type Token<'a> = <Self::Parameters<
140                'a,
141            > as alloy_sol_types::SolType>::Token<'a>;
142            const SIGNATURE: &'static str = "StringsInsufficientHexLength(uint256,uint256)";
143            const SELECTOR: [u8; 4] = [226u8, 46u8, 39u8, 235u8];
144            #[inline]
145            fn new<'a>(
146                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
147            ) -> Self {
148                tuple.into()
149            }
150            #[inline]
151            fn tokenize(&self) -> Self::Token<'_> {
152                (
153                    <alloy::sol_types::sol_data::Uint<
154                        256,
155                    > as alloy_sol_types::SolType>::tokenize(&self.value),
156                    <alloy::sol_types::sol_data::Uint<
157                        256,
158                    > as alloy_sol_types::SolType>::tokenize(&self.length),
159                )
160            }
161            #[inline]
162            fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
163                <Self::Parameters<
164                    '_,
165                > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
166                    .map(Self::new)
167            }
168        }
169    };
170    #[derive(serde::Serialize, serde::Deserialize)]
171    #[derive(Default, Debug, PartialEq, Eq, Hash)]
172    /**Custom error with signature `StringsInvalidAddressFormat()` and selector `0x1d15ae44`.
173```solidity
174error StringsInvalidAddressFormat();
175```*/
176    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
177    #[derive(Clone)]
178    pub struct StringsInvalidAddressFormat;
179    #[allow(
180        non_camel_case_types,
181        non_snake_case,
182        clippy::pub_underscore_fields,
183        clippy::style
184    )]
185    const _: () = {
186        use alloy::sol_types as alloy_sol_types;
187        #[doc(hidden)]
188        #[allow(dead_code)]
189        type UnderlyingSolTuple<'a> = ();
190        #[doc(hidden)]
191        type UnderlyingRustTuple<'a> = ();
192        #[cfg(test)]
193        #[allow(dead_code, unreachable_patterns)]
194        fn _type_assertion(
195            _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
196        ) {
197            match _t {
198                alloy_sol_types::private::AssertTypeEq::<
199                    <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
200                >(_) => {}
201            }
202        }
203        #[automatically_derived]
204        #[doc(hidden)]
205        impl ::core::convert::From<StringsInvalidAddressFormat>
206        for UnderlyingRustTuple<'_> {
207            fn from(value: StringsInvalidAddressFormat) -> Self {
208                ()
209            }
210        }
211        #[automatically_derived]
212        #[doc(hidden)]
213        impl ::core::convert::From<UnderlyingRustTuple<'_>>
214        for StringsInvalidAddressFormat {
215            fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
216                Self
217            }
218        }
219        #[automatically_derived]
220        impl alloy_sol_types::SolError for StringsInvalidAddressFormat {
221            type Parameters<'a> = UnderlyingSolTuple<'a>;
222            type Token<'a> = <Self::Parameters<
223                'a,
224            > as alloy_sol_types::SolType>::Token<'a>;
225            const SIGNATURE: &'static str = "StringsInvalidAddressFormat()";
226            const SELECTOR: [u8; 4] = [29u8, 21u8, 174u8, 68u8];
227            #[inline]
228            fn new<'a>(
229                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
230            ) -> Self {
231                tuple.into()
232            }
233            #[inline]
234            fn tokenize(&self) -> Self::Token<'_> {
235                ()
236            }
237            #[inline]
238            fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
239                <Self::Parameters<
240                    '_,
241                > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
242                    .map(Self::new)
243            }
244        }
245    };
246    #[derive(serde::Serialize, serde::Deserialize)]
247    #[derive(Default, Debug, PartialEq, Eq, Hash)]
248    /**Custom error with signature `StringsInvalidChar()` and selector `0x94e2737e`.
249```solidity
250error StringsInvalidChar();
251```*/
252    #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
253    #[derive(Clone)]
254    pub struct StringsInvalidChar;
255    #[allow(
256        non_camel_case_types,
257        non_snake_case,
258        clippy::pub_underscore_fields,
259        clippy::style
260    )]
261    const _: () = {
262        use alloy::sol_types as alloy_sol_types;
263        #[doc(hidden)]
264        #[allow(dead_code)]
265        type UnderlyingSolTuple<'a> = ();
266        #[doc(hidden)]
267        type UnderlyingRustTuple<'a> = ();
268        #[cfg(test)]
269        #[allow(dead_code, unreachable_patterns)]
270        fn _type_assertion(
271            _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
272        ) {
273            match _t {
274                alloy_sol_types::private::AssertTypeEq::<
275                    <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
276                >(_) => {}
277            }
278        }
279        #[automatically_derived]
280        #[doc(hidden)]
281        impl ::core::convert::From<StringsInvalidChar> for UnderlyingRustTuple<'_> {
282            fn from(value: StringsInvalidChar) -> Self {
283                ()
284            }
285        }
286        #[automatically_derived]
287        #[doc(hidden)]
288        impl ::core::convert::From<UnderlyingRustTuple<'_>> for StringsInvalidChar {
289            fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
290                Self
291            }
292        }
293        #[automatically_derived]
294        impl alloy_sol_types::SolError for StringsInvalidChar {
295            type Parameters<'a> = UnderlyingSolTuple<'a>;
296            type Token<'a> = <Self::Parameters<
297                'a,
298            > as alloy_sol_types::SolType>::Token<'a>;
299            const SIGNATURE: &'static str = "StringsInvalidChar()";
300            const SELECTOR: [u8; 4] = [148u8, 226u8, 115u8, 126u8];
301            #[inline]
302            fn new<'a>(
303                tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
304            ) -> Self {
305                tuple.into()
306            }
307            #[inline]
308            fn tokenize(&self) -> Self::Token<'_> {
309                ()
310            }
311            #[inline]
312            fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
313                <Self::Parameters<
314                    '_,
315                > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
316                    .map(Self::new)
317            }
318        }
319    };
320    ///Container for all the [`Strings`](self) custom errors.
321    #[derive(Clone)]
322    #[derive(serde::Serialize, serde::Deserialize)]
323    #[derive(Debug, PartialEq, Eq, Hash)]
324    pub enum StringsErrors {
325        #[allow(missing_docs)]
326        StringsInsufficientHexLength(StringsInsufficientHexLength),
327        #[allow(missing_docs)]
328        StringsInvalidAddressFormat(StringsInvalidAddressFormat),
329        #[allow(missing_docs)]
330        StringsInvalidChar(StringsInvalidChar),
331    }
332    impl StringsErrors {
333        /// All the selectors of this enum.
334        ///
335        /// Note that the selectors might not be in the same order as the variants.
336        /// No guarantees are made about the order of the selectors.
337        ///
338        /// Prefer using `SolInterface` methods instead.
339        pub const SELECTORS: &'static [[u8; 4usize]] = &[
340            [29u8, 21u8, 174u8, 68u8],
341            [148u8, 226u8, 115u8, 126u8],
342            [226u8, 46u8, 39u8, 235u8],
343        ];
344        /// The names of the variants in the same order as `SELECTORS`.
345        pub const VARIANT_NAMES: &'static [&'static str] = &[
346            ::core::stringify!(StringsInvalidAddressFormat),
347            ::core::stringify!(StringsInvalidChar),
348            ::core::stringify!(StringsInsufficientHexLength),
349        ];
350        /// The signatures in the same order as `SELECTORS`.
351        pub const SIGNATURES: &'static [&'static str] = &[
352            <StringsInvalidAddressFormat as alloy_sol_types::SolError>::SIGNATURE,
353            <StringsInvalidChar as alloy_sol_types::SolError>::SIGNATURE,
354            <StringsInsufficientHexLength as alloy_sol_types::SolError>::SIGNATURE,
355        ];
356        /// Returns the signature for the given selector, if known.
357        #[inline]
358        pub fn signature_by_selector(
359            selector: [u8; 4usize],
360        ) -> ::core::option::Option<&'static str> {
361            match Self::SELECTORS.binary_search(&selector) {
362                ::core::result::Result::Ok(idx) => {
363                    ::core::option::Option::Some(Self::SIGNATURES[idx])
364                }
365                ::core::result::Result::Err(_) => ::core::option::Option::None,
366            }
367        }
368        /// Returns the enum variant name for the given selector, if known.
369        #[inline]
370        pub fn name_by_selector(
371            selector: [u8; 4usize],
372        ) -> ::core::option::Option<&'static str> {
373            let sig = Self::signature_by_selector(selector)?;
374            sig.split_once('(').map(|(name, _)| name)
375        }
376    }
377    #[automatically_derived]
378    impl alloy_sol_types::SolInterface for StringsErrors {
379        const NAME: &'static str = "StringsErrors";
380        const MIN_DATA_LENGTH: usize = 0usize;
381        const COUNT: usize = 3usize;
382        #[inline]
383        fn selector(&self) -> [u8; 4] {
384            match self {
385                Self::StringsInsufficientHexLength(_) => {
386                    <StringsInsufficientHexLength as alloy_sol_types::SolError>::SELECTOR
387                }
388                Self::StringsInvalidAddressFormat(_) => {
389                    <StringsInvalidAddressFormat as alloy_sol_types::SolError>::SELECTOR
390                }
391                Self::StringsInvalidChar(_) => {
392                    <StringsInvalidChar as alloy_sol_types::SolError>::SELECTOR
393                }
394            }
395        }
396        #[inline]
397        fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
398            Self::SELECTORS.get(i).copied()
399        }
400        #[inline]
401        fn valid_selector(selector: [u8; 4]) -> bool {
402            Self::SELECTORS.binary_search(&selector).is_ok()
403        }
404        #[inline]
405        #[allow(non_snake_case)]
406        fn abi_decode_raw(
407            selector: [u8; 4],
408            data: &[u8],
409        ) -> alloy_sol_types::Result<Self> {
410            static DECODE_SHIMS: &[fn(
411                &[u8],
412            ) -> alloy_sol_types::Result<StringsErrors>] = &[
413                {
414                    fn StringsInvalidAddressFormat(
415                        data: &[u8],
416                    ) -> alloy_sol_types::Result<StringsErrors> {
417                        <StringsInvalidAddressFormat as alloy_sol_types::SolError>::abi_decode_raw(
418                                data,
419                            )
420                            .map(StringsErrors::StringsInvalidAddressFormat)
421                    }
422                    StringsInvalidAddressFormat
423                },
424                {
425                    fn StringsInvalidChar(
426                        data: &[u8],
427                    ) -> alloy_sol_types::Result<StringsErrors> {
428                        <StringsInvalidChar as alloy_sol_types::SolError>::abi_decode_raw(
429                                data,
430                            )
431                            .map(StringsErrors::StringsInvalidChar)
432                    }
433                    StringsInvalidChar
434                },
435                {
436                    fn StringsInsufficientHexLength(
437                        data: &[u8],
438                    ) -> alloy_sol_types::Result<StringsErrors> {
439                        <StringsInsufficientHexLength as alloy_sol_types::SolError>::abi_decode_raw(
440                                data,
441                            )
442                            .map(StringsErrors::StringsInsufficientHexLength)
443                    }
444                    StringsInsufficientHexLength
445                },
446            ];
447            let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
448                return Err(
449                    alloy_sol_types::Error::unknown_selector(
450                        <Self as alloy_sol_types::SolInterface>::NAME,
451                        selector,
452                    ),
453                );
454            };
455            DECODE_SHIMS[idx](data)
456        }
457        #[inline]
458        #[allow(non_snake_case)]
459        fn abi_decode_raw_validate(
460            selector: [u8; 4],
461            data: &[u8],
462        ) -> alloy_sol_types::Result<Self> {
463            static DECODE_VALIDATE_SHIMS: &[fn(
464                &[u8],
465            ) -> alloy_sol_types::Result<StringsErrors>] = &[
466                {
467                    fn StringsInvalidAddressFormat(
468                        data: &[u8],
469                    ) -> alloy_sol_types::Result<StringsErrors> {
470                        <StringsInvalidAddressFormat as alloy_sol_types::SolError>::abi_decode_raw_validate(
471                                data,
472                            )
473                            .map(StringsErrors::StringsInvalidAddressFormat)
474                    }
475                    StringsInvalidAddressFormat
476                },
477                {
478                    fn StringsInvalidChar(
479                        data: &[u8],
480                    ) -> alloy_sol_types::Result<StringsErrors> {
481                        <StringsInvalidChar as alloy_sol_types::SolError>::abi_decode_raw_validate(
482                                data,
483                            )
484                            .map(StringsErrors::StringsInvalidChar)
485                    }
486                    StringsInvalidChar
487                },
488                {
489                    fn StringsInsufficientHexLength(
490                        data: &[u8],
491                    ) -> alloy_sol_types::Result<StringsErrors> {
492                        <StringsInsufficientHexLength as alloy_sol_types::SolError>::abi_decode_raw_validate(
493                                data,
494                            )
495                            .map(StringsErrors::StringsInsufficientHexLength)
496                    }
497                    StringsInsufficientHexLength
498                },
499            ];
500            let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
501                return Err(
502                    alloy_sol_types::Error::unknown_selector(
503                        <Self as alloy_sol_types::SolInterface>::NAME,
504                        selector,
505                    ),
506                );
507            };
508            DECODE_VALIDATE_SHIMS[idx](data)
509        }
510        #[inline]
511        fn abi_encoded_size(&self) -> usize {
512            match self {
513                Self::StringsInsufficientHexLength(inner) => {
514                    <StringsInsufficientHexLength as alloy_sol_types::SolError>::abi_encoded_size(
515                        inner,
516                    )
517                }
518                Self::StringsInvalidAddressFormat(inner) => {
519                    <StringsInvalidAddressFormat as alloy_sol_types::SolError>::abi_encoded_size(
520                        inner,
521                    )
522                }
523                Self::StringsInvalidChar(inner) => {
524                    <StringsInvalidChar as alloy_sol_types::SolError>::abi_encoded_size(
525                        inner,
526                    )
527                }
528            }
529        }
530        #[inline]
531        fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
532            match self {
533                Self::StringsInsufficientHexLength(inner) => {
534                    <StringsInsufficientHexLength as alloy_sol_types::SolError>::abi_encode_raw(
535                        inner,
536                        out,
537                    )
538                }
539                Self::StringsInvalidAddressFormat(inner) => {
540                    <StringsInvalidAddressFormat as alloy_sol_types::SolError>::abi_encode_raw(
541                        inner,
542                        out,
543                    )
544                }
545                Self::StringsInvalidChar(inner) => {
546                    <StringsInvalidChar as alloy_sol_types::SolError>::abi_encode_raw(
547                        inner,
548                        out,
549                    )
550                }
551            }
552        }
553    }
554    use alloy::contract as alloy_contract;
555    /**Creates a new wrapper around an on-chain [`Strings`](self) contract instance.
556
557See the [wrapper's documentation](`StringsInstance`) for more details.*/
558    #[inline]
559    pub const fn new<
560        P: alloy_contract::private::Provider<N>,
561        N: alloy_contract::private::Network,
562    >(
563        address: alloy_sol_types::private::Address,
564        __provider: P,
565    ) -> StringsInstance<P, N> {
566        StringsInstance::<P, N>::new(address, __provider)
567    }
568    /**Deploys this contract using the given `provider` and constructor arguments, if any.
569
570Returns a new instance of the contract, if the deployment was successful.
571
572For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
573    #[inline]
574    pub fn deploy<
575        P: alloy_contract::private::Provider<N>,
576        N: alloy_contract::private::Network,
577    >(
578        __provider: P,
579    ) -> impl ::core::future::Future<
580        Output = alloy_contract::Result<StringsInstance<P, N>>,
581    > {
582        StringsInstance::<P, N>::deploy(__provider)
583    }
584    /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
585and constructor arguments, if any.
586
587This is a simple wrapper around creating a `RawCallBuilder` with the data set to
588the bytecode concatenated with the constructor's ABI-encoded arguments.*/
589    #[inline]
590    pub fn deploy_builder<
591        P: alloy_contract::private::Provider<N>,
592        N: alloy_contract::private::Network,
593    >(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
594        StringsInstance::<P, N>::deploy_builder(__provider)
595    }
596    /**A [`Strings`](self) instance.
597
598Contains type-safe methods for interacting with an on-chain instance of the
599[`Strings`](self) contract located at a given `address`, using a given
600provider `P`.
601
602If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
603documentation on how to provide it), the `deploy` and `deploy_builder` methods can
604be used to deploy a new instance of the contract.
605
606See the [module-level documentation](self) for all the available methods.*/
607    #[derive(Clone)]
608    pub struct StringsInstance<P, N = alloy_contract::private::Ethereum> {
609        address: alloy_sol_types::private::Address,
610        provider: P,
611        _network: ::core::marker::PhantomData<N>,
612    }
613    #[automatically_derived]
614    impl<P, N> ::core::fmt::Debug for StringsInstance<P, N> {
615        #[inline]
616        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
617            f.debug_tuple("StringsInstance").field(&self.address).finish()
618        }
619    }
620    /// Instantiation and getters/setters.
621    impl<
622        P: alloy_contract::private::Provider<N>,
623        N: alloy_contract::private::Network,
624    > StringsInstance<P, N> {
625        /**Creates a new wrapper around an on-chain [`Strings`](self) contract instance.
626
627See the [wrapper's documentation](`StringsInstance`) for more details.*/
628        #[inline]
629        pub const fn new(
630            address: alloy_sol_types::private::Address,
631            __provider: P,
632        ) -> Self {
633            Self {
634                address,
635                provider: __provider,
636                _network: ::core::marker::PhantomData,
637            }
638        }
639        /**Deploys this contract using the given `provider` and constructor arguments, if any.
640
641Returns a new instance of the contract, if the deployment was successful.
642
643For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
644        #[inline]
645        pub async fn deploy(
646            __provider: P,
647        ) -> alloy_contract::Result<StringsInstance<P, N>> {
648            let call_builder = Self::deploy_builder(__provider);
649            let contract_address = call_builder.deploy().await?;
650            Ok(Self::new(contract_address, call_builder.provider))
651        }
652        /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
653and constructor arguments, if any.
654
655This is a simple wrapper around creating a `RawCallBuilder` with the data set to
656the bytecode concatenated with the constructor's ABI-encoded arguments.*/
657        #[inline]
658        pub fn deploy_builder(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
659            alloy_contract::RawCallBuilder::new_raw_deploy(
660                __provider,
661                ::core::clone::Clone::clone(&BYTECODE),
662            )
663        }
664        /// Returns a reference to the address.
665        #[inline]
666        pub const fn address(&self) -> &alloy_sol_types::private::Address {
667            &self.address
668        }
669        /// Sets the address.
670        #[inline]
671        pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
672            self.address = address;
673        }
674        /// Sets the address and returns `self`.
675        pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
676            self.set_address(address);
677            self
678        }
679        /// Returns a reference to the provider.
680        #[inline]
681        pub const fn provider(&self) -> &P {
682            &self.provider
683        }
684    }
685    impl<P: ::core::clone::Clone, N> StringsInstance<&P, N> {
686        /// Clones the provider and returns a new instance with the cloned provider.
687        #[inline]
688        pub fn with_cloned_provider(self) -> StringsInstance<P, N> {
689            StringsInstance {
690                address: self.address,
691                provider: ::core::clone::Clone::clone(&self.provider),
692                _network: ::core::marker::PhantomData,
693            }
694        }
695    }
696    /// Function calls.
697    impl<
698        P: alloy_contract::private::Provider<N>,
699        N: alloy_contract::private::Network,
700    > StringsInstance<P, N> {
701        /// Creates a new call builder using this contract instance's provider and address.
702        ///
703        /// Note that the call can be any function call, not just those defined in this
704        /// contract. Prefer using the other methods for building type-safe contract calls.
705        pub fn call_builder<C: alloy_sol_types::SolCall>(
706            &self,
707            call: &C,
708        ) -> alloy_contract::SolCallBuilder<&P, C, N> {
709            alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
710        }
711    }
712    /// Event filters.
713    impl<
714        P: alloy_contract::private::Provider<N>,
715        N: alloy_contract::private::Network,
716    > StringsInstance<P, N> {
717        /// Creates a new event filter using this contract instance's provider and address.
718        ///
719        /// Note that the type can be any event, not just those defined in this contract.
720        /// Prefer using the other methods for building type-safe event filters.
721        pub fn event_filter<E: alloy_sol_types::SolEvent>(
722            &self,
723        ) -> alloy_contract::Event<&P, E, N> {
724            alloy_contract::Event::new_sol(&self.provider, &self.address)
725        }
726    }
727}