1#[allow(
54 non_camel_case_types,
55 non_snake_case,
56 clippy::pub_underscore_fields,
57 clippy::style,
58 clippy::empty_structs_with_brackets
59)]
60pub mod IOwned {
61 use super::*;
62 use alloy::sol_types as alloy_sol_types;
63 #[rustfmt::skip]
69 #[allow(clippy::all)]
70 pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
71 b"",
72 );
73 #[rustfmt::skip]
79 #[allow(clippy::all)]
80 pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
81 b"",
82 );
83 #[derive(Default, Debug, PartialEq, Eq, Hash)]
84 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
89 #[derive(Clone)]
90 pub struct getCall {
91 #[allow(missing_docs)]
92 pub key: alloy::sol_types::private::FixedBytes<32>,
93 }
94 #[derive(Default, Debug, PartialEq, Eq, Hash)]
95 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
97 #[derive(Clone)]
98 pub struct getReturn {
99 #[allow(missing_docs)]
100 pub value: alloy::sol_types::private::FixedBytes<32>,
101 }
102 #[allow(
103 non_camel_case_types,
104 non_snake_case,
105 clippy::pub_underscore_fields,
106 clippy::style
107 )]
108 const _: () = {
109 use alloy::sol_types as alloy_sol_types;
110 {
111 #[doc(hidden)]
112 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
113 #[doc(hidden)]
114 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,);
115 #[cfg(test)]
116 #[allow(dead_code, unreachable_patterns)]
117 fn _type_assertion(
118 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
119 ) {
120 match _t {
121 alloy_sol_types::private::AssertTypeEq::<
122 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
123 >(_) => {}
124 }
125 }
126 #[automatically_derived]
127 #[doc(hidden)]
128 impl ::core::convert::From<getCall> for UnderlyingRustTuple<'_> {
129 fn from(value: getCall) -> Self {
130 (value.key,)
131 }
132 }
133 #[automatically_derived]
134 #[doc(hidden)]
135 impl ::core::convert::From<UnderlyingRustTuple<'_>> for getCall {
136 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
137 Self { key: tuple.0 }
138 }
139 }
140 }
141 {
142 #[doc(hidden)]
143 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
144 #[doc(hidden)]
145 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,);
146 #[cfg(test)]
147 #[allow(dead_code, unreachable_patterns)]
148 fn _type_assertion(
149 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
150 ) {
151 match _t {
152 alloy_sol_types::private::AssertTypeEq::<
153 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
154 >(_) => {}
155 }
156 }
157 #[automatically_derived]
158 #[doc(hidden)]
159 impl ::core::convert::From<getReturn> for UnderlyingRustTuple<'_> {
160 fn from(value: getReturn) -> Self {
161 (value.value,)
162 }
163 }
164 #[automatically_derived]
165 #[doc(hidden)]
166 impl ::core::convert::From<UnderlyingRustTuple<'_>> for getReturn {
167 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
168 Self { value: tuple.0 }
169 }
170 }
171 }
172 #[automatically_derived]
173 impl alloy_sol_types::SolCall for getCall {
174 type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
175 type Token<'a> = <Self::Parameters<
176 'a,
177 > as alloy_sol_types::SolType>::Token<'a>;
178 type Return = getReturn;
179 type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
180 type ReturnToken<'a> = <Self::ReturnTuple<
181 'a,
182 > as alloy_sol_types::SolType>::Token<'a>;
183 const SIGNATURE: &'static str = "get(bytes32)";
184 const SELECTOR: [u8; 4] = [142u8, 170u8, 106u8, 192u8];
185 #[inline]
186 fn new<'a>(
187 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
188 ) -> Self {
189 tuple.into()
190 }
191 #[inline]
192 fn tokenize(&self) -> Self::Token<'_> {
193 (
194 <alloy::sol_types::sol_data::FixedBytes<
195 32,
196 > as alloy_sol_types::SolType>::tokenize(&self.key),
197 )
198 }
199 #[inline]
200 fn abi_decode_returns(
201 data: &[u8],
202 validate: bool,
203 ) -> alloy_sol_types::Result<Self::Return> {
204 <Self::ReturnTuple<
205 '_,
206 > as alloy_sol_types::SolType>::abi_decode_sequence(data, validate)
207 .map(Into::into)
208 }
209 }
210 };
211 #[derive(Default, Debug, PartialEq, Eq, Hash)]
212 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
217 #[derive(Clone)]
218 pub struct setCall {
219 #[allow(missing_docs)]
220 pub key: alloy::sol_types::private::FixedBytes<32>,
221 #[allow(missing_docs)]
222 pub value: alloy::sol_types::private::FixedBytes<32>,
223 }
224 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
226 #[derive(Clone)]
227 pub struct setReturn {}
228 #[allow(
229 non_camel_case_types,
230 non_snake_case,
231 clippy::pub_underscore_fields,
232 clippy::style
233 )]
234 const _: () = {
235 use alloy::sol_types as alloy_sol_types;
236 {
237 #[doc(hidden)]
238 type UnderlyingSolTuple<'a> = (
239 alloy::sol_types::sol_data::FixedBytes<32>,
240 alloy::sol_types::sol_data::FixedBytes<32>,
241 );
242 #[doc(hidden)]
243 type UnderlyingRustTuple<'a> = (
244 alloy::sol_types::private::FixedBytes<32>,
245 alloy::sol_types::private::FixedBytes<32>,
246 );
247 #[cfg(test)]
248 #[allow(dead_code, unreachable_patterns)]
249 fn _type_assertion(
250 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
251 ) {
252 match _t {
253 alloy_sol_types::private::AssertTypeEq::<
254 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
255 >(_) => {}
256 }
257 }
258 #[automatically_derived]
259 #[doc(hidden)]
260 impl ::core::convert::From<setCall> for UnderlyingRustTuple<'_> {
261 fn from(value: setCall) -> Self {
262 (value.key, value.value)
263 }
264 }
265 #[automatically_derived]
266 #[doc(hidden)]
267 impl ::core::convert::From<UnderlyingRustTuple<'_>> for setCall {
268 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
269 Self {
270 key: tuple.0,
271 value: tuple.1,
272 }
273 }
274 }
275 }
276 {
277 #[doc(hidden)]
278 type UnderlyingSolTuple<'a> = ();
279 #[doc(hidden)]
280 type UnderlyingRustTuple<'a> = ();
281 #[cfg(test)]
282 #[allow(dead_code, unreachable_patterns)]
283 fn _type_assertion(
284 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
285 ) {
286 match _t {
287 alloy_sol_types::private::AssertTypeEq::<
288 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
289 >(_) => {}
290 }
291 }
292 #[automatically_derived]
293 #[doc(hidden)]
294 impl ::core::convert::From<setReturn> for UnderlyingRustTuple<'_> {
295 fn from(value: setReturn) -> Self {
296 ()
297 }
298 }
299 #[automatically_derived]
300 #[doc(hidden)]
301 impl ::core::convert::From<UnderlyingRustTuple<'_>> for setReturn {
302 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
303 Self {}
304 }
305 }
306 }
307 #[automatically_derived]
308 impl alloy_sol_types::SolCall for setCall {
309 type Parameters<'a> = (
310 alloy::sol_types::sol_data::FixedBytes<32>,
311 alloy::sol_types::sol_data::FixedBytes<32>,
312 );
313 type Token<'a> = <Self::Parameters<
314 'a,
315 > as alloy_sol_types::SolType>::Token<'a>;
316 type Return = setReturn;
317 type ReturnTuple<'a> = ();
318 type ReturnToken<'a> = <Self::ReturnTuple<
319 'a,
320 > as alloy_sol_types::SolType>::Token<'a>;
321 const SIGNATURE: &'static str = "set(bytes32,bytes32)";
322 const SELECTOR: [u8; 4] = [247u8, 31u8, 122u8, 37u8];
323 #[inline]
324 fn new<'a>(
325 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
326 ) -> Self {
327 tuple.into()
328 }
329 #[inline]
330 fn tokenize(&self) -> Self::Token<'_> {
331 (
332 <alloy::sol_types::sol_data::FixedBytes<
333 32,
334 > as alloy_sol_types::SolType>::tokenize(&self.key),
335 <alloy::sol_types::sol_data::FixedBytes<
336 32,
337 > as alloy_sol_types::SolType>::tokenize(&self.value),
338 )
339 }
340 #[inline]
341 fn abi_decode_returns(
342 data: &[u8],
343 validate: bool,
344 ) -> alloy_sol_types::Result<Self::Return> {
345 <Self::ReturnTuple<
346 '_,
347 > as alloy_sol_types::SolType>::abi_decode_sequence(data, validate)
348 .map(Into::into)
349 }
350 }
351 };
352 #[derive()]
354 pub enum IOwnedCalls {
355 #[allow(missing_docs)]
356 get(getCall),
357 #[allow(missing_docs)]
358 set(setCall),
359 }
360 #[automatically_derived]
361 impl IOwnedCalls {
362 pub const SELECTORS: &'static [[u8; 4usize]] = &[
369 [142u8, 170u8, 106u8, 192u8],
370 [247u8, 31u8, 122u8, 37u8],
371 ];
372 }
373 #[automatically_derived]
374 impl alloy_sol_types::SolInterface for IOwnedCalls {
375 const NAME: &'static str = "IOwnedCalls";
376 const MIN_DATA_LENGTH: usize = 32usize;
377 const COUNT: usize = 2usize;
378 #[inline]
379 fn selector(&self) -> [u8; 4] {
380 match self {
381 Self::get(_) => <getCall as alloy_sol_types::SolCall>::SELECTOR,
382 Self::set(_) => <setCall as alloy_sol_types::SolCall>::SELECTOR,
383 }
384 }
385 #[inline]
386 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
387 Self::SELECTORS.get(i).copied()
388 }
389 #[inline]
390 fn valid_selector(selector: [u8; 4]) -> bool {
391 Self::SELECTORS.binary_search(&selector).is_ok()
392 }
393 #[inline]
394 #[allow(non_snake_case)]
395 fn abi_decode_raw(
396 selector: [u8; 4],
397 data: &[u8],
398 validate: bool,
399 ) -> alloy_sol_types::Result<Self> {
400 static DECODE_SHIMS: &[fn(
401 &[u8],
402 bool,
403 ) -> alloy_sol_types::Result<IOwnedCalls>] = &[
404 {
405 fn get(
406 data: &[u8],
407 validate: bool,
408 ) -> alloy_sol_types::Result<IOwnedCalls> {
409 <getCall as alloy_sol_types::SolCall>::abi_decode_raw(
410 data,
411 validate,
412 )
413 .map(IOwnedCalls::get)
414 }
415 get
416 },
417 {
418 fn set(
419 data: &[u8],
420 validate: bool,
421 ) -> alloy_sol_types::Result<IOwnedCalls> {
422 <setCall as alloy_sol_types::SolCall>::abi_decode_raw(
423 data,
424 validate,
425 )
426 .map(IOwnedCalls::set)
427 }
428 set
429 },
430 ];
431 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
432 return Err(
433 alloy_sol_types::Error::unknown_selector(
434 <Self as alloy_sol_types::SolInterface>::NAME,
435 selector,
436 ),
437 );
438 };
439 DECODE_SHIMS[idx](data, validate)
440 }
441 #[inline]
442 fn abi_encoded_size(&self) -> usize {
443 match self {
444 Self::get(inner) => {
445 <getCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
446 }
447 Self::set(inner) => {
448 <setCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
449 }
450 }
451 }
452 #[inline]
453 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
454 match self {
455 Self::get(inner) => {
456 <getCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
457 }
458 Self::set(inner) => {
459 <setCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
460 }
461 }
462 }
463 }
464 use alloy::contract as alloy_contract;
465 #[inline]
469 pub const fn new<
470 T: alloy_contract::private::Transport + ::core::clone::Clone,
471 P: alloy_contract::private::Provider<T, N>,
472 N: alloy_contract::private::Network,
473 >(
474 address: alloy_sol_types::private::Address,
475 provider: P,
476 ) -> IOwnedInstance<T, P, N> {
477 IOwnedInstance::<T, P, N>::new(address, provider)
478 }
479 #[inline]
485 pub fn deploy<
486 T: alloy_contract::private::Transport + ::core::clone::Clone,
487 P: alloy_contract::private::Provider<T, N>,
488 N: alloy_contract::private::Network,
489 >(
490 provider: P,
491 ) -> impl ::core::future::Future<
492 Output = alloy_contract::Result<IOwnedInstance<T, P, N>>,
493 > {
494 IOwnedInstance::<T, P, N>::deploy(provider)
495 }
496 #[inline]
502 pub fn deploy_builder<
503 T: alloy_contract::private::Transport + ::core::clone::Clone,
504 P: alloy_contract::private::Provider<T, N>,
505 N: alloy_contract::private::Network,
506 >(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
507 IOwnedInstance::<T, P, N>::deploy_builder(provider)
508 }
509 #[derive(Clone)]
521 pub struct IOwnedInstance<T, P, N = alloy_contract::private::Ethereum> {
522 address: alloy_sol_types::private::Address,
523 provider: P,
524 _network_transport: ::core::marker::PhantomData<(N, T)>,
525 }
526 #[automatically_derived]
527 impl<T, P, N> ::core::fmt::Debug for IOwnedInstance<T, P, N> {
528 #[inline]
529 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
530 f.debug_tuple("IOwnedInstance").field(&self.address).finish()
531 }
532 }
533 #[automatically_derived]
535 impl<
536 T: alloy_contract::private::Transport + ::core::clone::Clone,
537 P: alloy_contract::private::Provider<T, N>,
538 N: alloy_contract::private::Network,
539 > IOwnedInstance<T, P, N> {
540 #[inline]
544 pub const fn new(
545 address: alloy_sol_types::private::Address,
546 provider: P,
547 ) -> Self {
548 Self {
549 address,
550 provider,
551 _network_transport: ::core::marker::PhantomData,
552 }
553 }
554 #[inline]
560 pub async fn deploy(
561 provider: P,
562 ) -> alloy_contract::Result<IOwnedInstance<T, P, N>> {
563 let call_builder = Self::deploy_builder(provider);
564 let contract_address = call_builder.deploy().await?;
565 Ok(Self::new(contract_address, call_builder.provider))
566 }
567 #[inline]
573 pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
574 alloy_contract::RawCallBuilder::new_raw_deploy(
575 provider,
576 ::core::clone::Clone::clone(&BYTECODE),
577 )
578 }
579 #[inline]
581 pub const fn address(&self) -> &alloy_sol_types::private::Address {
582 &self.address
583 }
584 #[inline]
586 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
587 self.address = address;
588 }
589 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
591 self.set_address(address);
592 self
593 }
594 #[inline]
596 pub const fn provider(&self) -> &P {
597 &self.provider
598 }
599 }
600 impl<T, P: ::core::clone::Clone, N> IOwnedInstance<T, &P, N> {
601 #[inline]
603 pub fn with_cloned_provider(self) -> IOwnedInstance<T, P, N> {
604 IOwnedInstance {
605 address: self.address,
606 provider: ::core::clone::Clone::clone(&self.provider),
607 _network_transport: ::core::marker::PhantomData,
608 }
609 }
610 }
611 #[automatically_derived]
613 impl<
614 T: alloy_contract::private::Transport + ::core::clone::Clone,
615 P: alloy_contract::private::Provider<T, N>,
616 N: alloy_contract::private::Network,
617 > IOwnedInstance<T, P, N> {
618 pub fn call_builder<C: alloy_sol_types::SolCall>(
623 &self,
624 call: &C,
625 ) -> alloy_contract::SolCallBuilder<T, &P, C, N> {
626 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
627 }
628 pub fn get(
630 &self,
631 key: alloy::sol_types::private::FixedBytes<32>,
632 ) -> alloy_contract::SolCallBuilder<T, &P, getCall, N> {
633 self.call_builder(&getCall { key })
634 }
635 pub fn set(
637 &self,
638 key: alloy::sol_types::private::FixedBytes<32>,
639 value: alloy::sol_types::private::FixedBytes<32>,
640 ) -> alloy_contract::SolCallBuilder<T, &P, setCall, N> {
641 self.call_builder(&setCall { key, value })
642 }
643 }
644 #[automatically_derived]
646 impl<
647 T: alloy_contract::private::Transport + ::core::clone::Clone,
648 P: alloy_contract::private::Provider<T, N>,
649 N: alloy_contract::private::Network,
650 > IOwnedInstance<T, P, N> {
651 pub fn event_filter<E: alloy_sol_types::SolEvent>(
656 &self,
657 ) -> alloy_contract::Event<T, &P, E, N> {
658 alloy_contract::Event::new_sol(&self.provider, &self.address)
659 }
660 }
661}