pod_examples_solidity/
test_mint_balance_precompile.rs

1/**
2
3Generated by the following Solidity interface...
4```solidity
5interface TestMintBalancePrecompile {
6    function mint(uint256 value) external;
7}
8```
9
10...which was generated by the following JSON ABI:
11```json
12[
13  {
14    "type": "function",
15    "name": "mint",
16    "inputs": [
17      {
18        "name": "value",
19        "type": "uint256",
20        "internalType": "uint256"
21      }
22    ],
23    "outputs": [],
24    "stateMutability": "nonpayable"
25  }
26]
27```*/
28#[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    /// The creation / init bytecode of the contract.
39    ///
40    /// ```text
41    ///0x6080604052348015600e575f5ffd5b5061029f8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a0712d681461002d575b5f5ffd5b6100476004803603810190610042919061016c565b610049565b005b5f7f19f1eac828959377b5b3e1c34b3d7ce4be8888ea58439116eba58a2f31ab26505f1c73ffffffffffffffffffffffffffffffffffffffff168260405160200161009491906101a6565b6040516020818303038152906040526040516100b09190610211565b5f60405180830381855afa9150503d805f81146100e8576040519150601f19603f3d011682016040523d82523d5f602084013e6100ed565b606091505b5050905080610131576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012890610281565b60405180910390fd5b5050565b5f5ffd5b5f819050919050565b61014b81610139565b8114610155575f5ffd5b50565b5f8135905061016681610142565b92915050565b5f6020828403121561018157610180610135565b5b5f61018e84828501610158565b91505092915050565b6101a081610139565b82525050565b5f6020820190506101b95f830184610197565b92915050565b5f81519050919050565b5f81905092915050565b8281835e5f83830152505050565b5f6101eb826101bf565b6101f581856101c9565b93506102058185602086016101d3565b80840191505092915050565b5f61021c82846101e1565b915081905092915050565b5f82825260208201905092915050565b7f507265636f6d70696c652063616c6c206661696c6564000000000000000000005f82015250565b5f61026b601683610227565b915061027682610237565b602082019050919050565b5f6020820190508181035f8301526102988161025f565b905091905056
42    /// ```
43    #[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    /// The runtime bytecode of the contract, as deployed on the network.
49    ///
50    /// ```text
51    ///0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a0712d681461002d575b5f5ffd5b6100476004803603810190610042919061016c565b610049565b005b5f7f19f1eac828959377b5b3e1c34b3d7ce4be8888ea58439116eba58a2f31ab26505f1c73ffffffffffffffffffffffffffffffffffffffff168260405160200161009491906101a6565b6040516020818303038152906040526040516100b09190610211565b5f60405180830381855afa9150503d805f81146100e8576040519150601f19603f3d011682016040523d82523d5f602084013e6100ed565b606091505b5050905080610131576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012890610281565b60405180910390fd5b5050565b5f5ffd5b5f819050919050565b61014b81610139565b8114610155575f5ffd5b50565b5f8135905061016681610142565b92915050565b5f6020828403121561018157610180610135565b5b5f61018e84828501610158565b91505092915050565b6101a081610139565b82525050565b5f6020820190506101b95f830184610197565b92915050565b5f81519050919050565b5f81905092915050565b8281835e5f83830152505050565b5f6101eb826101bf565b6101f581856101c9565b93506102058185602086016101d3565b80840191505092915050565b5f61021c82846101e1565b915081905092915050565b5f82825260208201905092915050565b7f507265636f6d70696c652063616c6c206661696c6564000000000000000000005f82015250565b5f61026b601683610227565b915061027682610237565b602082019050919050565b5f6020820190508181035f8301526102988161025f565b905091905056
52    /// ```
53    #[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    /**Function with signature `mint(uint256)` and selector `0xa0712d68`.
61```solidity
62function mint(uint256 value) external;
63```*/
64    #[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    ///Container type for the return parameters of the [`mint(uint256)`](mintCall) function.
71    #[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    ///Container for all the [`TestMintBalancePrecompile`](self) function calls.
205    #[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        /// All the selectors of this enum.
214        ///
215        /// Note that the selectors might not be in the same order as the variants.
216        /// No guarantees are made about the order of the selectors.
217        ///
218        /// Prefer using `SolInterface` methods instead.
219        pub const SELECTORS: &'static [[u8; 4usize]] = &[[160u8, 113u8, 45u8, 104u8]];
220        /// The names of the variants in the same order as `SELECTORS`.
221        pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(mint)];
222        /// The signatures in the same order as `SELECTORS`.
223        pub const SIGNATURES: &'static [&'static str] = &[
224            <mintCall as alloy_sol_types::SolCall>::SIGNATURE,
225        ];
226        /// Returns the signature for the given selector, if known.
227        #[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        /// Returns the enum variant name for the given selector, if known.
239        #[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    /**Creates a new wrapper around an on-chain [`TestMintBalancePrecompile`](self) contract instance.
345
346See the [wrapper's documentation](`TestMintBalancePrecompileInstance`) for more details.*/
347    #[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    /**Deploys this contract using the given `provider` and constructor arguments, if any.
358
359Returns a new instance of the contract, if the deployment was successful.
360
361For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
362    #[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    /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
374and constructor arguments, if any.
375
376This is a simple wrapper around creating a `RawCallBuilder` with the data set to
377the bytecode concatenated with the constructor's ABI-encoded arguments.*/
378    #[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    /**A [`TestMintBalancePrecompile`](self) instance.
386
387Contains type-safe methods for interacting with an on-chain instance of the
388[`TestMintBalancePrecompile`](self) contract located at a given `address`, using a given
389provider `P`.
390
391If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
392documentation on how to provide it), the `deploy` and `deploy_builder` methods can
393be used to deploy a new instance of the contract.
394
395See the [module-level documentation](self) for all the available methods.*/
396    #[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    /// Instantiation and getters/setters.
415    impl<
416        P: alloy_contract::private::Provider<N>,
417        N: alloy_contract::private::Network,
418    > TestMintBalancePrecompileInstance<P, N> {
419        /**Creates a new wrapper around an on-chain [`TestMintBalancePrecompile`](self) contract instance.
420
421See the [wrapper's documentation](`TestMintBalancePrecompileInstance`) for more details.*/
422        #[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        /**Deploys this contract using the given `provider` and constructor arguments, if any.
434
435Returns a new instance of the contract, if the deployment was successful.
436
437For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
438        #[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        /**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
447and constructor arguments, if any.
448
449This is a simple wrapper around creating a `RawCallBuilder` with the data set to
450the bytecode concatenated with the constructor's ABI-encoded arguments.*/
451        #[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        /// Returns a reference to the address.
459        #[inline]
460        pub const fn address(&self) -> &alloy_sol_types::private::Address {
461            &self.address
462        }
463        /// Sets the address.
464        #[inline]
465        pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
466            self.address = address;
467        }
468        /// Sets the address and returns `self`.
469        pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
470            self.set_address(address);
471            self
472        }
473        /// Returns a reference to the provider.
474        #[inline]
475        pub const fn provider(&self) -> &P {
476            &self.provider
477        }
478    }
479    impl<P: ::core::clone::Clone, N> TestMintBalancePrecompileInstance<&P, N> {
480        /// Clones the provider and returns a new instance with the cloned provider.
481        #[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    /// Function calls.
491    impl<
492        P: alloy_contract::private::Provider<N>,
493        N: alloy_contract::private::Network,
494    > TestMintBalancePrecompileInstance<P, N> {
495        /// Creates a new call builder using this contract instance's provider and address.
496        ///
497        /// Note that the call can be any function call, not just those defined in this
498        /// contract. Prefer using the other methods for building type-safe contract calls.
499        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        ///Creates a new call builder for the [`mint`] function.
506        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    /// Event filters.
514    impl<
515        P: alloy_contract::private::Provider<N>,
516        N: alloy_contract::private::Network,
517    > TestMintBalancePrecompileInstance<P, N> {
518        /// Creates a new event filter using this contract instance's provider and address.
519        ///
520        /// Note that the type can be any event, not just those defined in this contract.
521        /// Prefer using the other methods for building type-safe event filters.
522        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}