1#[allow(
29 non_camel_case_types,
30 non_snake_case,
31 clippy::pub_underscore_fields,
32 clippy::style,
33 clippy::empty_structs_with_brackets
34)]
35pub mod TestMintBalancePrecompile {
36 use super::*;
37 use alloy::sol_types as alloy_sol_types;
38 #[rustfmt::skip]
44 #[allow(clippy::all)]
45 pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
46 b"`\x80`@R4\x80\x15`\x0EW__\xFD[Pa\x02\x9F\x80a\0\x1C_9_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0)W_5`\xE0\x1C\x80c\xA0q-h\x14a\0-W[__\xFD[a\0G`\x04\x806\x03\x81\x01\x90a\0B\x91\x90a\x01lV[a\0IV[\0[_\x7F\x19\xF1\xEA\xC8(\x95\x93w\xB5\xB3\xE1\xC3K=|\xE4\xBE\x88\x88\xEAXC\x91\x16\xEB\xA5\x8A/1\xAB&P_\x1Cs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82`@Q` \x01a\0\x94\x91\x90a\x01\xA6V[`@Q` \x81\x83\x03\x03\x81R\x90`@R`@Qa\0\xB0\x91\x90a\x02\x11V[_`@Q\x80\x83\x03\x81\x85Z\xFA\x91PP=\x80_\x81\x14a\0\xE8W`@Q\x91P`\x1F\x19`?=\x01\x16\x82\x01`@R=\x82R=_` \x84\x01>a\0\xEDV[``\x91P[PP\x90P\x80a\x011W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x01(\x90a\x02\x81V[`@Q\x80\x91\x03\x90\xFD[PPV[__\xFD[_\x81\x90P\x91\x90PV[a\x01K\x81a\x019V[\x81\x14a\x01UW__\xFD[PV[_\x815\x90Pa\x01f\x81a\x01BV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x01\x81Wa\x01\x80a\x015V[[_a\x01\x8E\x84\x82\x85\x01a\x01XV[\x91PP\x92\x91PPV[a\x01\xA0\x81a\x019V[\x82RPPV[_` \x82\x01\x90Pa\x01\xB9_\x83\x01\x84a\x01\x97V[\x92\x91PPV[_\x81Q\x90P\x91\x90PV[_\x81\x90P\x92\x91PPV[\x82\x81\x83^_\x83\x83\x01RPPPV[_a\x01\xEB\x82a\x01\xBFV[a\x01\xF5\x81\x85a\x01\xC9V[\x93Pa\x02\x05\x81\x85` \x86\x01a\x01\xD3V[\x80\x84\x01\x91PP\x92\x91PPV[_a\x02\x1C\x82\x84a\x01\xE1V[\x91P\x81\x90P\x92\x91PPV[_\x82\x82R` \x82\x01\x90P\x92\x91PPV[\x7FPrecompile call failed\0\0\0\0\0\0\0\0\0\0_\x82\x01RPV[_a\x02k`\x16\x83a\x02'V[\x91Pa\x02v\x82a\x027V[` \x82\x01\x90P\x91\x90PV[_` \x82\x01\x90P\x81\x81\x03_\x83\x01Ra\x02\x98\x81a\x02_V[\x90P\x91\x90PV",
47 );
48 #[rustfmt::skip]
54 #[allow(clippy::all)]
55 pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
56 b"`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0)W_5`\xE0\x1C\x80c\xA0q-h\x14a\0-W[__\xFD[a\0G`\x04\x806\x03\x81\x01\x90a\0B\x91\x90a\x01lV[a\0IV[\0[_\x7F\x19\xF1\xEA\xC8(\x95\x93w\xB5\xB3\xE1\xC3K=|\xE4\xBE\x88\x88\xEAXC\x91\x16\xEB\xA5\x8A/1\xAB&P_\x1Cs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82`@Q` \x01a\0\x94\x91\x90a\x01\xA6V[`@Q` \x81\x83\x03\x03\x81R\x90`@R`@Qa\0\xB0\x91\x90a\x02\x11V[_`@Q\x80\x83\x03\x81\x85Z\xFA\x91PP=\x80_\x81\x14a\0\xE8W`@Q\x91P`\x1F\x19`?=\x01\x16\x82\x01`@R=\x82R=_` \x84\x01>a\0\xEDV[``\x91P[PP\x90P\x80a\x011W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x01(\x90a\x02\x81V[`@Q\x80\x91\x03\x90\xFD[PPV[__\xFD[_\x81\x90P\x91\x90PV[a\x01K\x81a\x019V[\x81\x14a\x01UW__\xFD[PV[_\x815\x90Pa\x01f\x81a\x01BV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x01\x81Wa\x01\x80a\x015V[[_a\x01\x8E\x84\x82\x85\x01a\x01XV[\x91PP\x92\x91PPV[a\x01\xA0\x81a\x019V[\x82RPPV[_` \x82\x01\x90Pa\x01\xB9_\x83\x01\x84a\x01\x97V[\x92\x91PPV[_\x81Q\x90P\x91\x90PV[_\x81\x90P\x92\x91PPV[\x82\x81\x83^_\x83\x83\x01RPPPV[_a\x01\xEB\x82a\x01\xBFV[a\x01\xF5\x81\x85a\x01\xC9V[\x93Pa\x02\x05\x81\x85` \x86\x01a\x01\xD3V[\x80\x84\x01\x91PP\x92\x91PPV[_a\x02\x1C\x82\x84a\x01\xE1V[\x91P\x81\x90P\x92\x91PPV[_\x82\x82R` \x82\x01\x90P\x92\x91PPV[\x7FPrecompile call failed\0\0\0\0\0\0\0\0\0\0_\x82\x01RPV[_a\x02k`\x16\x83a\x02'V[\x91Pa\x02v\x82a\x027V[` \x82\x01\x90P\x91\x90PV[_` \x82\x01\x90P\x81\x81\x03_\x83\x01Ra\x02\x98\x81a\x02_V[\x90P\x91\x90PV",
57 );
58 #[derive(serde::Serialize, serde::Deserialize)]
59 #[derive(Default, Debug, PartialEq, Eq, Hash)]
60 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
65 #[derive(Clone)]
66 pub struct mintCall {
67 #[allow(missing_docs)]
68 pub value: alloy::sol_types::private::primitives::aliases::U256,
69 }
70 #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
72 #[derive(Clone)]
73 pub struct mintReturn {}
74 #[allow(
75 non_camel_case_types,
76 non_snake_case,
77 clippy::pub_underscore_fields,
78 clippy::style
79 )]
80 const _: () = {
81 use alloy::sol_types as alloy_sol_types;
82 {
83 #[doc(hidden)]
84 #[allow(dead_code)]
85 type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
86 #[doc(hidden)]
87 type UnderlyingRustTuple<'a> = (
88 alloy::sol_types::private::primitives::aliases::U256,
89 );
90 #[cfg(test)]
91 #[allow(dead_code, unreachable_patterns)]
92 fn _type_assertion(
93 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
94 ) {
95 match _t {
96 alloy_sol_types::private::AssertTypeEq::<
97 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
98 >(_) => {}
99 }
100 }
101 #[automatically_derived]
102 #[doc(hidden)]
103 impl ::core::convert::From<mintCall> for UnderlyingRustTuple<'_> {
104 fn from(value: mintCall) -> Self {
105 (value.value,)
106 }
107 }
108 #[automatically_derived]
109 #[doc(hidden)]
110 impl ::core::convert::From<UnderlyingRustTuple<'_>> for mintCall {
111 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
112 Self { value: tuple.0 }
113 }
114 }
115 }
116 {
117 #[doc(hidden)]
118 #[allow(dead_code)]
119 type UnderlyingSolTuple<'a> = ();
120 #[doc(hidden)]
121 type UnderlyingRustTuple<'a> = ();
122 #[cfg(test)]
123 #[allow(dead_code, unreachable_patterns)]
124 fn _type_assertion(
125 _t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
126 ) {
127 match _t {
128 alloy_sol_types::private::AssertTypeEq::<
129 <UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
130 >(_) => {}
131 }
132 }
133 #[automatically_derived]
134 #[doc(hidden)]
135 impl ::core::convert::From<mintReturn> for UnderlyingRustTuple<'_> {
136 fn from(value: mintReturn) -> Self {
137 ()
138 }
139 }
140 #[automatically_derived]
141 #[doc(hidden)]
142 impl ::core::convert::From<UnderlyingRustTuple<'_>> for mintReturn {
143 fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
144 Self {}
145 }
146 }
147 }
148 impl mintReturn {
149 fn _tokenize(
150 &self,
151 ) -> <mintCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
152 ()
153 }
154 }
155 #[automatically_derived]
156 impl alloy_sol_types::SolCall for mintCall {
157 type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,);
158 type Token<'a> = <Self::Parameters<
159 'a,
160 > as alloy_sol_types::SolType>::Token<'a>;
161 type Return = mintReturn;
162 type ReturnTuple<'a> = ();
163 type ReturnToken<'a> = <Self::ReturnTuple<
164 'a,
165 > as alloy_sol_types::SolType>::Token<'a>;
166 const SIGNATURE: &'static str = "mint(uint256)";
167 const SELECTOR: [u8; 4] = [160u8, 113u8, 45u8, 104u8];
168 #[inline]
169 fn new<'a>(
170 tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
171 ) -> Self {
172 tuple.into()
173 }
174 #[inline]
175 fn tokenize(&self) -> Self::Token<'_> {
176 (
177 <alloy::sol_types::sol_data::Uint<
178 256,
179 > as alloy_sol_types::SolType>::tokenize(&self.value),
180 )
181 }
182 #[inline]
183 fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
184 mintReturn::_tokenize(ret)
185 }
186 #[inline]
187 fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
188 <Self::ReturnTuple<
189 '_,
190 > as alloy_sol_types::SolType>::abi_decode_sequence(data)
191 .map(Into::into)
192 }
193 #[inline]
194 fn abi_decode_returns_validate(
195 data: &[u8],
196 ) -> alloy_sol_types::Result<Self::Return> {
197 <Self::ReturnTuple<
198 '_,
199 > as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
200 .map(Into::into)
201 }
202 }
203 };
204 #[derive(Clone)]
206 #[derive(serde::Serialize, serde::Deserialize)]
207 #[derive()]
208 pub enum TestMintBalancePrecompileCalls {
209 #[allow(missing_docs)]
210 mint(mintCall),
211 }
212 impl TestMintBalancePrecompileCalls {
213 pub const SELECTORS: &'static [[u8; 4usize]] = &[[160u8, 113u8, 45u8, 104u8]];
220 pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(mint)];
222 pub const SIGNATURES: &'static [&'static str] = &[
224 <mintCall as alloy_sol_types::SolCall>::SIGNATURE,
225 ];
226 #[inline]
228 pub fn signature_by_selector(
229 selector: [u8; 4usize],
230 ) -> ::core::option::Option<&'static str> {
231 match Self::SELECTORS.binary_search(&selector) {
232 ::core::result::Result::Ok(idx) => {
233 ::core::option::Option::Some(Self::SIGNATURES[idx])
234 }
235 ::core::result::Result::Err(_) => ::core::option::Option::None,
236 }
237 }
238 #[inline]
240 pub fn name_by_selector(
241 selector: [u8; 4usize],
242 ) -> ::core::option::Option<&'static str> {
243 let sig = Self::signature_by_selector(selector)?;
244 sig.split_once('(').map(|(name, _)| name)
245 }
246 }
247 #[automatically_derived]
248 impl alloy_sol_types::SolInterface for TestMintBalancePrecompileCalls {
249 const NAME: &'static str = "TestMintBalancePrecompileCalls";
250 const MIN_DATA_LENGTH: usize = 32usize;
251 const COUNT: usize = 1usize;
252 #[inline]
253 fn selector(&self) -> [u8; 4] {
254 match self {
255 Self::mint(_) => <mintCall as alloy_sol_types::SolCall>::SELECTOR,
256 }
257 }
258 #[inline]
259 fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
260 Self::SELECTORS.get(i).copied()
261 }
262 #[inline]
263 fn valid_selector(selector: [u8; 4]) -> bool {
264 Self::SELECTORS.binary_search(&selector).is_ok()
265 }
266 #[inline]
267 #[allow(non_snake_case)]
268 fn abi_decode_raw(
269 selector: [u8; 4],
270 data: &[u8],
271 ) -> alloy_sol_types::Result<Self> {
272 static DECODE_SHIMS: &[fn(
273 &[u8],
274 ) -> alloy_sol_types::Result<TestMintBalancePrecompileCalls>] = &[
275 {
276 fn mint(
277 data: &[u8],
278 ) -> alloy_sol_types::Result<TestMintBalancePrecompileCalls> {
279 <mintCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
280 .map(TestMintBalancePrecompileCalls::mint)
281 }
282 mint
283 },
284 ];
285 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
286 return Err(
287 alloy_sol_types::Error::unknown_selector(
288 <Self as alloy_sol_types::SolInterface>::NAME,
289 selector,
290 ),
291 );
292 };
293 DECODE_SHIMS[idx](data)
294 }
295 #[inline]
296 #[allow(non_snake_case)]
297 fn abi_decode_raw_validate(
298 selector: [u8; 4],
299 data: &[u8],
300 ) -> alloy_sol_types::Result<Self> {
301 static DECODE_VALIDATE_SHIMS: &[fn(
302 &[u8],
303 ) -> alloy_sol_types::Result<TestMintBalancePrecompileCalls>] = &[
304 {
305 fn mint(
306 data: &[u8],
307 ) -> alloy_sol_types::Result<TestMintBalancePrecompileCalls> {
308 <mintCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
309 data,
310 )
311 .map(TestMintBalancePrecompileCalls::mint)
312 }
313 mint
314 },
315 ];
316 let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
317 return Err(
318 alloy_sol_types::Error::unknown_selector(
319 <Self as alloy_sol_types::SolInterface>::NAME,
320 selector,
321 ),
322 );
323 };
324 DECODE_VALIDATE_SHIMS[idx](data)
325 }
326 #[inline]
327 fn abi_encoded_size(&self) -> usize {
328 match self {
329 Self::mint(inner) => {
330 <mintCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
331 }
332 }
333 }
334 #[inline]
335 fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
336 match self {
337 Self::mint(inner) => {
338 <mintCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
339 }
340 }
341 }
342 }
343 use alloy::contract as alloy_contract;
344 #[inline]
348 pub const fn new<
349 P: alloy_contract::private::Provider<N>,
350 N: alloy_contract::private::Network,
351 >(
352 address: alloy_sol_types::private::Address,
353 __provider: P,
354 ) -> TestMintBalancePrecompileInstance<P, N> {
355 TestMintBalancePrecompileInstance::<P, N>::new(address, __provider)
356 }
357 #[inline]
363 pub fn deploy<
364 P: alloy_contract::private::Provider<N>,
365 N: alloy_contract::private::Network,
366 >(
367 __provider: P,
368 ) -> impl ::core::future::Future<
369 Output = alloy_contract::Result<TestMintBalancePrecompileInstance<P, N>>,
370 > {
371 TestMintBalancePrecompileInstance::<P, N>::deploy(__provider)
372 }
373 #[inline]
379 pub fn deploy_builder<
380 P: alloy_contract::private::Provider<N>,
381 N: alloy_contract::private::Network,
382 >(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
383 TestMintBalancePrecompileInstance::<P, N>::deploy_builder(__provider)
384 }
385 #[derive(Clone)]
397 pub struct TestMintBalancePrecompileInstance<
398 P,
399 N = alloy_contract::private::Ethereum,
400 > {
401 address: alloy_sol_types::private::Address,
402 provider: P,
403 _network: ::core::marker::PhantomData<N>,
404 }
405 #[automatically_derived]
406 impl<P, N> ::core::fmt::Debug for TestMintBalancePrecompileInstance<P, N> {
407 #[inline]
408 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
409 f.debug_tuple("TestMintBalancePrecompileInstance")
410 .field(&self.address)
411 .finish()
412 }
413 }
414 impl<
416 P: alloy_contract::private::Provider<N>,
417 N: alloy_contract::private::Network,
418 > TestMintBalancePrecompileInstance<P, N> {
419 #[inline]
423 pub const fn new(
424 address: alloy_sol_types::private::Address,
425 __provider: P,
426 ) -> Self {
427 Self {
428 address,
429 provider: __provider,
430 _network: ::core::marker::PhantomData,
431 }
432 }
433 #[inline]
439 pub async fn deploy(
440 __provider: P,
441 ) -> alloy_contract::Result<TestMintBalancePrecompileInstance<P, N>> {
442 let call_builder = Self::deploy_builder(__provider);
443 let contract_address = call_builder.deploy().await?;
444 Ok(Self::new(contract_address, call_builder.provider))
445 }
446 #[inline]
452 pub fn deploy_builder(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
453 alloy_contract::RawCallBuilder::new_raw_deploy(
454 __provider,
455 ::core::clone::Clone::clone(&BYTECODE),
456 )
457 }
458 #[inline]
460 pub const fn address(&self) -> &alloy_sol_types::private::Address {
461 &self.address
462 }
463 #[inline]
465 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
466 self.address = address;
467 }
468 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
470 self.set_address(address);
471 self
472 }
473 #[inline]
475 pub const fn provider(&self) -> &P {
476 &self.provider
477 }
478 }
479 impl<P: ::core::clone::Clone, N> TestMintBalancePrecompileInstance<&P, N> {
480 #[inline]
482 pub fn with_cloned_provider(self) -> TestMintBalancePrecompileInstance<P, N> {
483 TestMintBalancePrecompileInstance {
484 address: self.address,
485 provider: ::core::clone::Clone::clone(&self.provider),
486 _network: ::core::marker::PhantomData,
487 }
488 }
489 }
490 impl<
492 P: alloy_contract::private::Provider<N>,
493 N: alloy_contract::private::Network,
494 > TestMintBalancePrecompileInstance<P, N> {
495 pub fn call_builder<C: alloy_sol_types::SolCall>(
500 &self,
501 call: &C,
502 ) -> alloy_contract::SolCallBuilder<&P, C, N> {
503 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
504 }
505 pub fn mint(
507 &self,
508 value: alloy::sol_types::private::primitives::aliases::U256,
509 ) -> alloy_contract::SolCallBuilder<&P, mintCall, N> {
510 self.call_builder(&mintCall { value })
511 }
512 }
513 impl<
515 P: alloy_contract::private::Provider<N>,
516 N: alloy_contract::private::Network,
517 > TestMintBalancePrecompileInstance<P, N> {
518 pub fn event_filter<E: alloy_sol_types::SolEvent>(
523 &self,
524 ) -> alloy_contract::Event<&P, E, N> {
525 alloy_contract::Event::new_sol(&self.provider, &self.address)
526 }
527 }
528}