ve_orn_bindings/
strings.rs

1pub use strings::*;
2#[allow(
3    clippy::too_many_arguments,
4    non_camel_case_types,
5    clippy::upper_case_acronyms
6)]
7pub mod strings {
8    #![allow(clippy::enum_variant_names)]
9    #![allow(dead_code)]
10    #![allow(clippy::type_complexity)]
11    #![allow(unused_imports)]
12    //!Strings was auto-generated with ethers-rs Abigen. More information at: <https://github.com/gakonst/ethers-rs>
13    use ::ethers::contract::{
14        builders::{ContractCall, Event},
15        Contract, Lazy,
16    };
17    use ::ethers::core::{
18        abi::{Abi, Detokenize, InvalidOutputType, Token, Tokenizable},
19        types::*,
20    };
21    use ::ethers::providers::Middleware;
22    use std::sync::Arc;
23    #[rustfmt::skip]
24    const __ABI: &str = "[]";
25    ///The parsed JSON ABI of the contract.
26    pub static STRINGS_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> =
27        ::ethers::contract::Lazy::new(|| {
28            ::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid")
29        });
30    #[rustfmt::skip]
31    const __BYTECODE: &[u8] = &[
32        96,
33        86,
34        96,
35        55,
36        96,
37        11,
38        130,
39        130,
40        130,
41        57,
42        128,
43        81,
44        96,
45        0,
46        26,
47        96,
48        115,
49        20,
50        96,
51        42,
52        87,
53        99,
54        78,
55        72,
56        123,
57        113,
58        96,
59        224,
60        27,
61        96,
62        0,
63        82,
64        96,
65        0,
66        96,
67        4,
68        82,
69        96,
70        36,
71        96,
72        0,
73        253,
74        91,
75        48,
76        96,
77        0,
78        82,
79        96,
80        115,
81        129,
82        83,
83        130,
84        129,
85        243,
86        254,
87        115,
88        0,
89        0,
90        0,
91        0,
92        0,
93        0,
94        0,
95        0,
96        0,
97        0,
98        0,
99        0,
100        0,
101        0,
102        0,
103        0,
104        0,
105        0,
106        0,
107        0,
108        48,
109        20,
110        96,
111        128,
112        96,
113        64,
114        82,
115        96,
116        0,
117        128,
118        253,
119        254,
120        162,
121        100,
122        105,
123        112,
124        102,
125        115,
126        88,
127        34,
128        18,
129        32,
130        194,
131        36,
132        37,
133        147,
134        88,
135        64,
136        208,
137        25,
138        187,
139        60,
140        212,
141        126,
142        13,
143        123,
144        251,
145        199,
146        209,
147        136,
148        94,
149        6,
150        38,
151        23,
152        143,
153        90,
154        0,
155        156,
156        128,
157        247,
158        14,
159        68,
160        221,
161        112,
162        100,
163        115,
164        111,
165        108,
166        99,
167        67,
168        0,
169        8,
170        15,
171        0,
172        51,
173    ];
174    ///The bytecode of the contract.
175    lazy_static::lazy_static! {
176            pub static ref STRINGS_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from(
177            __BYTECODE.to_vec(),
178        );
179    }
180    pub struct Strings<M>(::ethers::contract::Contract<M>);
181    impl<M> Clone for Strings<M> {
182        fn clone(&self) -> Self {
183            Strings(self.0.clone())
184        }
185    }
186    impl<M> std::ops::Deref for Strings<M> {
187        type Target = ::ethers::contract::Contract<M>;
188        fn deref(&self) -> &Self::Target {
189            &self.0
190        }
191    }
192    impl<M> std::fmt::Debug for Strings<M> {
193        fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
194            f.debug_tuple(stringify!(Strings))
195                .field(&self.address())
196                .finish()
197        }
198    }
199    impl<M: ::ethers::providers::Middleware> Strings<M> {
200        /// Creates a new contract instance with the specified `ethers`
201        /// client at the given `Address`. The contract derefs to a `ethers::Contract`
202        /// object
203        pub fn new<T: Into<::ethers::core::types::Address>>(
204            address: T,
205            client: ::std::sync::Arc<M>,
206        ) -> Self {
207            Self(::ethers::contract::Contract::new(
208                address.into(),
209                STRINGS_ABI.clone(),
210                client,
211            ))
212        }
213        /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it.
214        /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction
215        ///
216        /// Notes:
217        /// 1. If there are no constructor arguments, you should pass `()` as the argument.
218        /// 1. The default poll duration is 7 seconds.
219        /// 1. The default number of confirmations is 1 block.
220        ///
221        ///
222        /// # Example
223        ///
224        /// Generate contract bindings with `abigen!` and deploy a new contract instance.
225        ///
226        /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact.
227        ///
228        /// ```ignore
229        /// # async fn deploy<M: ethers::providers::Middleware>(client: ::std::sync::Arc<M>) {
230        ///     abigen!(Greeter,"../greeter.json");
231        ///
232        ///    let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap();
233        ///    let msg = greeter_contract.greet().call().await.unwrap();
234        /// # }
235        /// ```
236        pub fn deploy<T: ::ethers::core::abi::Tokenize>(
237            client: ::std::sync::Arc<M>,
238            constructor_args: T,
239        ) -> ::std::result::Result<
240            ::ethers::contract::builders::ContractDeployer<M, Self>,
241            ::ethers::contract::ContractError<M>,
242        > {
243            let factory = ::ethers::contract::ContractFactory::new(
244                STRINGS_ABI.clone(),
245                STRINGS_BYTECODE.clone().into(),
246                client,
247            );
248            let deployer = factory.deploy(constructor_args)?;
249            let deployer = ::ethers::contract::ContractDeployer::new(deployer);
250            Ok(deployer)
251        }
252    }
253    impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>> for Strings<M> {
254        fn from(contract: ::ethers::contract::Contract<M>) -> Self {
255            Self::new(contract.address(), contract.client())
256        }
257    }
258}