fluence_marketplace_api_draft/
strings.rs1#[allow(
32 non_camel_case_types,
33 non_snake_case,
34 clippy::pub_underscore_fields,
35 clippy::style,
36 clippy::empty_structs_with_brackets
37)]
38pub mod Strings {
39 use super::*;
40 use alloy::sol_types as alloy_sol_types;
41 #[rustfmt::skip]
47 #[allow(clippy::all)]
48 pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
49 b"`\x80\x80`@R4`\x17W`9\x90\x81`\x1C\x8290\x81PP\xF3[_\x80\xFD\xFE_\x80\xFD\xFE\xA2dipfsX\"\x12 \xBAz\xA7H\xB5\xDF\xA7\xCA\xDC\xAAr\xDFc\x089e0\x7Fp\xC4\x10\xEE\xA9\xD9\xEDPn\xA3\xE4\xCB\xB4TdsolcC\0\x08\x1C\x003",
50 );
51 #[rustfmt::skip]
57 #[allow(clippy::all)]
58 pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
59 b"_\x80\xFD\xFE\xA2dipfsX\"\x12 \xBAz\xA7H\xB5\xDF\xA7\xCA\xDC\xAAr\xDFc\x089e0\x7Fp\xC4\x10\xEE\xA9\xD9\xEDPn\xA3\xE4\xCB\xB4TdsolcC\0\x08\x1C\x003",
60 );
61 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
66 #[derive(Clone)]
67 pub struct StringsInsufficientHexLength {
68 #[allow(missing_docs)]
69 pub value: alloy::sol_types::private::primitives::aliases::U256,
70 #[allow(missing_docs)]
71 pub length: alloy::sol_types::private::primitives::aliases::U256,
72 }
73 #[allow(
74 non_camel_case_types,
75 non_snake_case,
76 clippy::pub_underscore_fields,
77 clippy::style
78 )]
79 const _: () = {
80 use alloy::sol_types as alloy_sol_types;
81 #[doc(hidden)]
82 type UnderlyingSolTuple<'a> = (
83 alloy::sol_types::sol_data::Uint<256>,
84 alloy::sol_types::sol_data::Uint<256>,
85 );
86 #[doc(hidden)]
87 type UnderlyingRustTuple<'a> = (
88 alloy::sol_types::private::primitives::aliases::U256,
89 alloy::sol_types::private::primitives::aliases::U256,
90 );
91 #[cfg(test)]
92 #[allow(dead_code, unreachable_patterns)]
93 fn _type_assertion(
94 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
95 ) {
96 match _t {
97 alloy_sol_types::private::AssertTypeEq::<
98 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
99 >(_) => {}
100 }
101 }
102 #[automatically_derived]
103 #[doc(hidden)]
104 impl ::core::convert::From<StringsInsufficientHexLength>
105 for UnderlyingRustTuple<'_> {
106 fn from(value: StringsInsufficientHexLength) -> Self {
107 (value.value, value.length)
108 }
109 }
110 #[automatically_derived]
111 #[doc(hidden)]
112 impl ::core::convert::From<UnderlyingRustTuple<'_>>
113 for StringsInsufficientHexLength {
114 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
115 Self {
116 value: tuple.0,
117 length: tuple.1,
118 }
119 }
120 }
121 #[automatically_derived]
122 impl alloy_sol_types::SolError for StringsInsufficientHexLength {
123 type Parameters<'a> = UnderlyingSolTuple<'a>;
124 type Token<'a> = <Self::Parameters<
125 'a,
126 > as alloy_sol_types::SolType>::Token<'a>;
127 const SIGNATURE: &'static str = "StringsInsufficientHexLength(uint256,uint256)";
128 const SELECTOR: [u8; 4] = [226u8, 46u8, 39u8, 235u8];
129 #[inline]
130 fn new<'a>(
131 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
132 ) -> Self {
133 tuple.into()
134 }
135 #[inline]
136 fn tokenize(&self) -> Self::Token<'_> {
137 (
138 <alloy::sol_types::sol_data::Uint<
139 256,
140 > as alloy_sol_types::SolType>::tokenize(&self.value),
141 <alloy::sol_types::sol_data::Uint<
142 256,
143 > as alloy_sol_types::SolType>::tokenize(&self.length),
144 )
145 }
146 }
147 };
148 pub enum StringsErrors {
150 #[allow(missing_docs)]
151 StringsInsufficientHexLength(StringsInsufficientHexLength),
152 }
153 #[automatically_derived]
154 impl StringsErrors {
155 pub const SELECTORS: &'static [[u8; 4usize]] = &[[226u8, 46u8, 39u8, 235u8]];
162 }
163 #[automatically_derived]
164 impl alloy_sol_types::SolInterface for StringsErrors {
165 const NAME: &'static str = "StringsErrors";
166 const MIN_DATA_LENGTH: usize = 64usize;
167 const COUNT: usize = 1usize;
168 #[inline]
169 fn selector(&self) -> [u8; 4] {
170 match self {
171 Self::StringsInsufficientHexLength(_) => {
172 <StringsInsufficientHexLength as alloy_sol_types::SolError>::SELECTOR
173 }
174 }
175 }
176 #[inline]
177 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
178 Self::SELECTORS.get(i).copied()
179 }
180 #[inline]
181 fn valid_selector(selector: [u8; 4]) -> bool {
182 Self::SELECTORS.binary_search(&selector).is_ok()
183 }
184 #[inline]
185 #[allow(non_snake_case)]
186 fn abi_decode_raw(
187 selector: [u8; 4],
188 data: &[u8],
189 validate: bool,
190 ) -> alloy_sol_types::Result<Self> {
191 static DECODE_SHIMS: &[fn(
192 &[u8],
193 bool,
194 ) -> alloy_sol_types::Result<StringsErrors>] = &[
195 {
196 fn StringsInsufficientHexLength(
197 data: &[u8],
198 validate: bool,
199 ) -> alloy_sol_types::Result<StringsErrors> {
200 <StringsInsufficientHexLength as alloy_sol_types::SolError>::abi_decode_raw(
201 data,
202 validate,
203 )
204 .map(StringsErrors::StringsInsufficientHexLength)
205 }
206 StringsInsufficientHexLength
207 },
208 ];
209 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
210 return Err(
211 alloy_sol_types::Error::unknown_selector(
212 <Self as alloy_sol_types::SolInterface>::NAME,
213 selector,
214 ),
215 );
216 };
217 DECODE_SHIMS[idx](data, validate)
218 }
219 #[inline]
220 fn abi_encoded_size(&self) -> usize {
221 match self {
222 Self::StringsInsufficientHexLength(inner) => {
223 <StringsInsufficientHexLength as alloy_sol_types::SolError>::abi_encoded_size(
224 inner,
225 )
226 }
227 }
228 }
229 #[inline]
230 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
231 match self {
232 Self::StringsInsufficientHexLength(inner) => {
233 <StringsInsufficientHexLength as alloy_sol_types::SolError>::abi_encode_raw(
234 inner,
235 out,
236 )
237 }
238 }
239 }
240 }
241 use alloy::contract as alloy_contract;
242 #[inline]
246 pub const fn new<
247 T: alloy_contract::private::Transport + ::core::clone::Clone,
248 P: alloy_contract::private::Provider<T, N>,
249 N: alloy_contract::private::Network,
250 >(
251 address: alloy_sol_types::private::Address,
252 provider: P,
253 ) -> StringsInstance<T, P, N> {
254 StringsInstance::<T, P, N>::new(address, provider)
255 }
256 #[inline]
262 pub fn deploy<
263 T: alloy_contract::private::Transport + ::core::clone::Clone,
264 P: alloy_contract::private::Provider<T, N>,
265 N: alloy_contract::private::Network,
266 >(
267 provider: P,
268 ) -> impl ::core::future::Future<
269 Output = alloy_contract::Result<StringsInstance<T, P, N>>,
270 > {
271 StringsInstance::<T, P, N>::deploy(provider)
272 }
273 #[inline]
279 pub fn deploy_builder<
280 T: alloy_contract::private::Transport + ::core::clone::Clone,
281 P: alloy_contract::private::Provider<T, N>,
282 N: alloy_contract::private::Network,
283 >(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
284 StringsInstance::<T, P, N>::deploy_builder(provider)
285 }
286 #[derive(Clone)]
298 pub struct StringsInstance<T, P, N = alloy_contract::private::Ethereum> {
299 address: alloy_sol_types::private::Address,
300 provider: P,
301 _network_transport: ::core::marker::PhantomData<(N, T)>,
302 }
303 #[automatically_derived]
304 impl<T, P, N> ::core::fmt::Debug for StringsInstance<T, P, N> {
305 #[inline]
306 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
307 f.debug_tuple("StringsInstance").field(&self.address).finish()
308 }
309 }
310 #[automatically_derived]
312 impl<
313 T: alloy_contract::private::Transport + ::core::clone::Clone,
314 P: alloy_contract::private::Provider<T, N>,
315 N: alloy_contract::private::Network,
316 > StringsInstance<T, P, N> {
317 #[inline]
321 pub const fn new(
322 address: alloy_sol_types::private::Address,
323 provider: P,
324 ) -> Self {
325 Self {
326 address,
327 provider,
328 _network_transport: ::core::marker::PhantomData,
329 }
330 }
331 #[inline]
337 pub async fn deploy(
338 provider: P,
339 ) -> alloy_contract::Result<StringsInstance<T, P, N>> {
340 let call_builder = Self::deploy_builder(provider);
341 let contract_address = call_builder.deploy().await?;
342 Ok(Self::new(contract_address, call_builder.provider))
343 }
344 #[inline]
350 pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
351 alloy_contract::RawCallBuilder::new_raw_deploy(
352 provider,
353 ::core::clone::Clone::clone(&BYTECODE),
354 )
355 }
356 #[inline]
358 pub const fn address(&self) -> &alloy_sol_types::private::Address {
359 &self.address
360 }
361 #[inline]
363 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
364 self.address = address;
365 }
366 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
368 self.set_address(address);
369 self
370 }
371 #[inline]
373 pub const fn provider(&self) -> &P {
374 &self.provider
375 }
376 }
377 impl<T, P: ::core::clone::Clone, N> StringsInstance<T, &P, N> {
378 #[inline]
380 pub fn with_cloned_provider(self) -> StringsInstance<T, P, N> {
381 StringsInstance {
382 address: self.address,
383 provider: ::core::clone::Clone::clone(&self.provider),
384 _network_transport: ::core::marker::PhantomData,
385 }
386 }
387 }
388 #[automatically_derived]
390 impl<
391 T: alloy_contract::private::Transport + ::core::clone::Clone,
392 P: alloy_contract::private::Provider<T, N>,
393 N: alloy_contract::private::Network,
394 > StringsInstance<T, P, N> {
395 pub fn call_builder<C: alloy_sol_types::SolCall>(
400 &self,
401 call: &C,
402 ) -> alloy_contract::SolCallBuilder<T, &P, C, N> {
403 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
404 }
405 }
406 #[automatically_derived]
408 impl<
409 T: alloy_contract::private::Transport + ::core::clone::Clone,
410 P: alloy_contract::private::Provider<T, N>,
411 N: alloy_contract::private::Network,
412 > StringsInstance<T, P, N> {
413 pub fn event_filter<E: alloy_sol_types::SolEvent>(
418 &self,
419 ) -> alloy_contract::Event<T, &P, E, N> {
420 alloy_contract::Event::new_sol(&self.provider, &self.address)
421 }
422 }
423}