fluence_marketplace_api_draft/
string.rs

1/**
2
3Generated by the following Solidity interface...
4```solidity
5interface String {}
6```
7
8...which was generated by the following JSON ABI:
9```json
10[]
11```*/
12#[allow(
13    non_camel_case_types,
14    non_snake_case,
15    clippy::pub_underscore_fields,
16    clippy::style,
17    clippy::empty_structs_with_brackets
18)]
19pub mod String {
20    use super::*;
21    use alloy::sol_types as alloy_sol_types;
22    /// The creation / init bytecode of the contract.
23    ///
24    /// ```text
25    ///0x6080806040523460175760399081601c823930815050f35b5f80fdfe5f80fdfea26469706673582212205376bbea451bb7dd2ba169825d0f565d5f1e1c5ad6d8edb00790ced56cc79e0664736f6c634300081c0033
26    /// ```
27    #[rustfmt::skip]
28    #[allow(clippy::all)]
29    pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
30        b"`\x80\x80`@R4`\x17W`9\x90\x81`\x1C\x8290\x81PP\xF3[_\x80\xFD\xFE_\x80\xFD\xFE\xA2dipfsX\"\x12 Sv\xBB\xEAE\x1B\xB7\xDD+\xA1i\x82]\x0FV]_\x1E\x1CZ\xD6\xD8\xED\xB0\x07\x90\xCE\xD5l\xC7\x9E\x06dsolcC\0\x08\x1C\x003",
31    );
32    /// The runtime bytecode of the contract, as deployed on the network.
33    ///
34    /// ```text
35    ///0x5f80fdfea26469706673582212205376bbea451bb7dd2ba169825d0f565d5f1e1c5ad6d8edb00790ced56cc79e0664736f6c634300081c0033
36    /// ```
37    #[rustfmt::skip]
38    #[allow(clippy::all)]
39    pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
40        b"_\x80\xFD\xFE\xA2dipfsX\"\x12 Sv\xBB\xEAE\x1B\xB7\xDD+\xA1i\x82]\x0FV]_\x1E\x1CZ\xD6\xD8\xED\xB0\x07\x90\xCE\xD5l\xC7\x9E\x06dsolcC\0\x08\x1C\x003",
41    );
42    use alloy::contract as alloy_contract;
43    /**Creates a new wrapper around an on-chain [`String`](self) contract instance.
44
45See the [wrapper's documentation](`StringInstance`) for more details.*/
46    #[inline]
47    pub const fn new<
48        T: alloy_contract::private::Transport + ::core::clone::Clone,
49        P: alloy_contract::private::Provider<T, N>,
50        N: alloy_contract::private::Network,
51    >(
52        address: alloy_sol_types::private::Address,
53        provider: P,
54    ) -> StringInstance<T, P, N> {
55        StringInstance::<T, P, N>::new(address, provider)
56    }
57    /**Deploys this contract using the given `provider` and constructor arguments, if any.
58
59Returns a new instance of the contract, if the deployment was successful.
60
61For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
62    #[inline]
63    pub fn deploy<
64        T: alloy_contract::private::Transport + ::core::clone::Clone,
65        P: alloy_contract::private::Provider<T, N>,
66        N: alloy_contract::private::Network,
67    >(
68        provider: P,
69    ) -> impl ::core::future::Future<
70        Output = alloy_contract::Result<StringInstance<T, P, N>>,
71    > {
72        StringInstance::<T, P, N>::deploy(provider)
73    }
74    /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
75and constructor arguments, if any.
76
77This is a simple wrapper around creating a `RawCallBuilder` with the data set to
78the bytecode concatenated with the constructor's ABI-encoded arguments.*/
79    #[inline]
80    pub fn deploy_builder<
81        T: alloy_contract::private::Transport + ::core::clone::Clone,
82        P: alloy_contract::private::Provider<T, N>,
83        N: alloy_contract::private::Network,
84    >(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
85        StringInstance::<T, P, N>::deploy_builder(provider)
86    }
87    /**A [`String`](self) instance.
88
89Contains type-safe methods for interacting with an on-chain instance of the
90[`String`](self) contract located at a given `address`, using a given
91provider `P`.
92
93If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
94documentation on how to provide it), the `deploy` and `deploy_builder` methods can
95be used to deploy a new instance of the contract.
96
97See the [module-level documentation](self) for all the available methods.*/
98    #[derive(Clone)]
99    pub struct StringInstance<T, P, N = alloy_contract::private::Ethereum> {
100        address: alloy_sol_types::private::Address,
101        provider: P,
102        _network_transport: ::core::marker::PhantomData<(N, T)>,
103    }
104    #[automatically_derived]
105    impl<T, P, N> ::core::fmt::Debug for StringInstance<T, P, N> {
106        #[inline]
107        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
108            f.debug_tuple("StringInstance").field(&self.address).finish()
109        }
110    }
111    /// Instantiation and getters/setters.
112    #[automatically_derived]
113    impl<
114        T: alloy_contract::private::Transport + ::core::clone::Clone,
115        P: alloy_contract::private::Provider<T, N>,
116        N: alloy_contract::private::Network,
117    > StringInstance<T, P, N> {
118        /**Creates a new wrapper around an on-chain [`String`](self) contract instance.
119
120See the [wrapper's documentation](`StringInstance`) for more details.*/
121        #[inline]
122        pub const fn new(
123            address: alloy_sol_types::private::Address,
124            provider: P,
125        ) -> Self {
126            Self {
127                address,
128                provider,
129                _network_transport: ::core::marker::PhantomData,
130            }
131        }
132        /**Deploys this contract using the given `provider` and constructor arguments, if any.
133
134Returns a new instance of the contract, if the deployment was successful.
135
136For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
137        #[inline]
138        pub async fn deploy(
139            provider: P,
140        ) -> alloy_contract::Result<StringInstance<T, P, N>> {
141            let call_builder = Self::deploy_builder(provider);
142            let contract_address = call_builder.deploy().await?;
143            Ok(Self::new(contract_address, call_builder.provider))
144        }
145        /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
146and constructor arguments, if any.
147
148This is a simple wrapper around creating a `RawCallBuilder` with the data set to
149the bytecode concatenated with the constructor's ABI-encoded arguments.*/
150        #[inline]
151        pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
152            alloy_contract::RawCallBuilder::new_raw_deploy(
153                provider,
154                ::core::clone::Clone::clone(&BYTECODE),
155            )
156        }
157        /// Returns a reference to the address.
158        #[inline]
159        pub const fn address(&self) -> &alloy_sol_types::private::Address {
160            &self.address
161        }
162        /// Sets the address.
163        #[inline]
164        pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
165            self.address = address;
166        }
167        /// Sets the address and returns `self`.
168        pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
169            self.set_address(address);
170            self
171        }
172        /// Returns a reference to the provider.
173        #[inline]
174        pub const fn provider(&self) -> &P {
175            &self.provider
176        }
177    }
178    impl<T, P: ::core::clone::Clone, N> StringInstance<T, &P, N> {
179        /// Clones the provider and returns a new instance with the cloned provider.
180        #[inline]
181        pub fn with_cloned_provider(self) -> StringInstance<T, P, N> {
182            StringInstance {
183                address: self.address,
184                provider: ::core::clone::Clone::clone(&self.provider),
185                _network_transport: ::core::marker::PhantomData,
186            }
187        }
188    }
189    /// Function calls.
190    #[automatically_derived]
191    impl<
192        T: alloy_contract::private::Transport + ::core::clone::Clone,
193        P: alloy_contract::private::Provider<T, N>,
194        N: alloy_contract::private::Network,
195    > StringInstance<T, P, N> {
196        /// Creates a new call builder using this contract instance's provider and address.
197        ///
198        /// Note that the call can be any function call, not just those defined in this
199        /// contract. Prefer using the other methods for building type-safe contract calls.
200        pub fn call_builder<C: alloy_sol_types::SolCall>(
201            &self,
202            call: &C,
203        ) -> alloy_contract::SolCallBuilder<T, &P, C, N> {
204            alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
205        }
206    }
207    /// Event filters.
208    #[automatically_derived]
209    impl<
210        T: alloy_contract::private::Transport + ::core::clone::Clone,
211        P: alloy_contract::private::Provider<T, N>,
212        N: alloy_contract::private::Network,
213    > StringInstance<T, P, N> {
214        /// Creates a new event filter using this contract instance's provider and address.
215        ///
216        /// Note that the type can be any event, not just those defined in this contract.
217        /// Prefer using the other methods for building type-safe event filters.
218        pub fn event_filter<E: alloy_sol_types::SolEvent>(
219            &self,
220        ) -> alloy_contract::Event<T, &P, E, N> {
221            alloy_contract::Event::new_sol(&self.provider, &self.address)
222        }
223    }
224}