weiroll/bindings/
lib_tupler.rs

1pub use lib_tupler::*;
2/// This module was auto-generated with ethers-rs Abigen.
3/// More information at: <https://github.com/gakonst/ethers-rs>
4#[allow(
5    clippy::enum_variant_names,
6    clippy::too_many_arguments,
7    clippy::upper_case_acronyms,
8    clippy::type_complexity,
9    dead_code,
10    non_camel_case_types
11)]
12pub mod lib_tupler {
13    #[rustfmt::skip]
14    const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"tuple\",\"type\":\"bytes\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"pure\",\"type\":\"function\",\"name\":\"extractElement\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\",\"components\":[]}]}]";
15    ///The parsed JSON ABI of the contract.
16    pub static LIBTUPLER_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> =
17        ::ethers::contract::Lazy::new(|| {
18            ::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid")
19        });
20    #[rustfmt::skip]
21    const __BYTECODE: &[u8] = &[
22        96,
23        128,
24        96,
25        64,
26        82,
27        52,
28        128,
29        21,
30        97,
31        0,
32        16,
33        87,
34        96,
35        0,
36        128,
37        253,
38        91,
39        80,
40        97,
41        1,
42        100,
43        128,
44        97,
45        0,
46        32,
47        96,
48        0,
49        57,
50        96,
51        0,
52        243,
53        254,
54        96,
55        128,
56        96,
57        64,
58        82,
59        52,
60        128,
61        21,
62        97,
63        0,
64        16,
65        87,
66        96,
67        0,
68        128,
69        253,
70        91,
71        80,
72        96,
73        4,
74        54,
75        16,
76        97,
77        0,
78        43,
79        87,
80        96,
81        0,
82        53,
83        96,
84        224,
85        28,
86        128,
87        99,
88        155,
89        211,
90        178,
91        39,
92        20,
93        97,
94        0,
95        48,
96        87,
97        91,
98        96,
99        0,
100        128,
101        253,
102        91,
103        97,
104        0,
105        67,
106        97,
107        0,
108        62,
109        54,
110        96,
111        4,
112        97,
113        0,
114        121,
115        86,
116        91,
117        97,
118        0,
119        85,
120        86,
121        91,
122        96,
123        64,
124        81,
125        144,
126        129,
127        82,
128        96,
129        32,
130        1,
131        96,
132        64,
133        81,
134        128,
135        145,
136        3,
137        144,
138        243,
139        91,
140        96,
141        0,
142        96,
143        32,
144        128,
145        96,
146        1,
147        132,
148        1,
149        2,
150        132,
151        1,
152        243,
153        91,
154        99,
155        78,
156        72,
157        123,
158        113,
159        96,
160        224,
161        27,
162        96,
163        0,
164        82,
165        96,
166        65,
167        96,
168        4,
169        82,
170        96,
171        36,
172        96,
173        0,
174        253,
175        91,
176        96,
177        0,
178        128,
179        96,
180        64,
181        131,
182        133,
183        3,
184        18,
185        21,
186        97,
187        0,
188        140,
189        87,
190        96,
191        0,
192        128,
193        253,
194        91,
195        130,
196        53,
197        103,
198        255,
199        255,
200        255,
201        255,
202        255,
203        255,
204        255,
205        255,
206        128,
207        130,
208        17,
209        21,
210        97,
211        0,
212        164,
213        87,
214        96,
215        0,
216        128,
217        253,
218        91,
219        129,
220        133,
221        1,
222        145,
223        80,
224        133,
225        96,
226        31,
227        131,
228        1,
229        18,
230        97,
231        0,
232        184,
233        87,
234        96,
235        0,
236        128,
237        253,
238        91,
239        129,
240        53,
241        129,
242        129,
243        17,
244        21,
245        97,
246        0,
247        202,
248        87,
249        97,
250        0,
251        202,
252        97,
253        0,
254        99,
255        86,
256        91,
257        96,
258        64,
259        81,
260        96,
261        31,
262        130,
263        1,
264        96,
265        31,
266        25,
267        144,
268        129,
269        22,
270        96,
271        63,
272        1,
273        22,
274        129,
275        1,
276        144,
277        131,
278        130,
279        17,
280        129,
281        131,
282        16,
283        23,
284        21,
285        97,
286        0,
287        242,
288        87,
289        97,
290        0,
291        242,
292        97,
293        0,
294        99,
295        86,
296        91,
297        129,
298        96,
299        64,
300        82,
301        130,
302        129,
303        82,
304        136,
305        96,
306        32,
307        132,
308        135,
309        1,
310        1,
311        17,
312        21,
313        97,
314        1,
315        11,
316        87,
317        96,
318        0,
319        128,
320        253,
321        91,
322        130,
323        96,
324        32,
325        134,
326        1,
327        96,
328        32,
329        131,
330        1,
331        55,
332        96,
333        0,
334        96,
335        32,
336        147,
337        130,
338        1,
339        132,
340        1,
341        82,
342        152,
343        150,
344        144,
345        145,
346        1,
347        53,
348        150,
349        80,
350        80,
351        80,
352        80,
353        80,
354        80,
355        86,
356        254,
357        162,
358        100,
359        105,
360        112,
361        102,
362        115,
363        88,
364        34,
365        18,
366        32,
367        134,
368        177,
369        176,
370        176,
371        235,
372        195,
373        84,
374        149,
375        155,
376        167,
377        208,
378        201,
379        245,
380        47,
381        221,
382        139,
383        34,
384        226,
385        176,
386        38,
387        153,
388        127,
389        195,
390        150,
391        134,
392        66,
393        98,
394        202,
395        53,
396        76,
397        78,
398        208,
399        100,
400        115,
401        111,
402        108,
403        99,
404        67,
405        0,
406        8,
407        19,
408        0,
409        51,
410    ];
411    ///The bytecode of the contract.
412    pub static LIBTUPLER_BYTECODE: ::ethers::core::types::Bytes =
413        ::ethers::core::types::Bytes::from_static(__BYTECODE);
414    #[rustfmt::skip]
415    const __DEPLOYED_BYTECODE: &[u8] = &[
416        96,
417        128,
418        96,
419        64,
420        82,
421        52,
422        128,
423        21,
424        97,
425        0,
426        16,
427        87,
428        96,
429        0,
430        128,
431        253,
432        91,
433        80,
434        96,
435        4,
436        54,
437        16,
438        97,
439        0,
440        43,
441        87,
442        96,
443        0,
444        53,
445        96,
446        224,
447        28,
448        128,
449        99,
450        155,
451        211,
452        178,
453        39,
454        20,
455        97,
456        0,
457        48,
458        87,
459        91,
460        96,
461        0,
462        128,
463        253,
464        91,
465        97,
466        0,
467        67,
468        97,
469        0,
470        62,
471        54,
472        96,
473        4,
474        97,
475        0,
476        121,
477        86,
478        91,
479        97,
480        0,
481        85,
482        86,
483        91,
484        96,
485        64,
486        81,
487        144,
488        129,
489        82,
490        96,
491        32,
492        1,
493        96,
494        64,
495        81,
496        128,
497        145,
498        3,
499        144,
500        243,
501        91,
502        96,
503        0,
504        96,
505        32,
506        128,
507        96,
508        1,
509        132,
510        1,
511        2,
512        132,
513        1,
514        243,
515        91,
516        99,
517        78,
518        72,
519        123,
520        113,
521        96,
522        224,
523        27,
524        96,
525        0,
526        82,
527        96,
528        65,
529        96,
530        4,
531        82,
532        96,
533        36,
534        96,
535        0,
536        253,
537        91,
538        96,
539        0,
540        128,
541        96,
542        64,
543        131,
544        133,
545        3,
546        18,
547        21,
548        97,
549        0,
550        140,
551        87,
552        96,
553        0,
554        128,
555        253,
556        91,
557        130,
558        53,
559        103,
560        255,
561        255,
562        255,
563        255,
564        255,
565        255,
566        255,
567        255,
568        128,
569        130,
570        17,
571        21,
572        97,
573        0,
574        164,
575        87,
576        96,
577        0,
578        128,
579        253,
580        91,
581        129,
582        133,
583        1,
584        145,
585        80,
586        133,
587        96,
588        31,
589        131,
590        1,
591        18,
592        97,
593        0,
594        184,
595        87,
596        96,
597        0,
598        128,
599        253,
600        91,
601        129,
602        53,
603        129,
604        129,
605        17,
606        21,
607        97,
608        0,
609        202,
610        87,
611        97,
612        0,
613        202,
614        97,
615        0,
616        99,
617        86,
618        91,
619        96,
620        64,
621        81,
622        96,
623        31,
624        130,
625        1,
626        96,
627        31,
628        25,
629        144,
630        129,
631        22,
632        96,
633        63,
634        1,
635        22,
636        129,
637        1,
638        144,
639        131,
640        130,
641        17,
642        129,
643        131,
644        16,
645        23,
646        21,
647        97,
648        0,
649        242,
650        87,
651        97,
652        0,
653        242,
654        97,
655        0,
656        99,
657        86,
658        91,
659        129,
660        96,
661        64,
662        82,
663        130,
664        129,
665        82,
666        136,
667        96,
668        32,
669        132,
670        135,
671        1,
672        1,
673        17,
674        21,
675        97,
676        1,
677        11,
678        87,
679        96,
680        0,
681        128,
682        253,
683        91,
684        130,
685        96,
686        32,
687        134,
688        1,
689        96,
690        32,
691        131,
692        1,
693        55,
694        96,
695        0,
696        96,
697        32,
698        147,
699        130,
700        1,
701        132,
702        1,
703        82,
704        152,
705        150,
706        144,
707        145,
708        1,
709        53,
710        150,
711        80,
712        80,
713        80,
714        80,
715        80,
716        80,
717        86,
718        254,
719        162,
720        100,
721        105,
722        112,
723        102,
724        115,
725        88,
726        34,
727        18,
728        32,
729        134,
730        177,
731        176,
732        176,
733        235,
734        195,
735        84,
736        149,
737        155,
738        167,
739        208,
740        201,
741        245,
742        47,
743        221,
744        139,
745        34,
746        226,
747        176,
748        38,
749        153,
750        127,
751        195,
752        150,
753        134,
754        66,
755        98,
756        202,
757        53,
758        76,
759        78,
760        208,
761        100,
762        115,
763        111,
764        108,
765        99,
766        67,
767        0,
768        8,
769        19,
770        0,
771        51,
772    ];
773    ///The deployed bytecode of the contract.
774    pub static LIBTUPLER_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes =
775        ::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE);
776    pub struct LibTupler<M>(::ethers::contract::Contract<M>);
777    impl<M> ::core::clone::Clone for LibTupler<M> {
778        fn clone(&self) -> Self {
779            Self(::core::clone::Clone::clone(&self.0))
780        }
781    }
782    impl<M> ::core::ops::Deref for LibTupler<M> {
783        type Target = ::ethers::contract::Contract<M>;
784        fn deref(&self) -> &Self::Target {
785            &self.0
786        }
787    }
788    impl<M> ::core::ops::DerefMut for LibTupler<M> {
789        fn deref_mut(&mut self) -> &mut Self::Target {
790            &mut self.0
791        }
792    }
793    impl<M> ::core::fmt::Debug for LibTupler<M> {
794        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
795            f.debug_tuple(stringify!(LibTupler))
796                .field(&self.address())
797                .finish()
798        }
799    }
800    impl<M: ::ethers::providers::Middleware> LibTupler<M> {
801        /// Creates a new contract instance with the specified `ethers` client at
802        /// `address`. The contract derefs to a `ethers::Contract` object.
803        pub fn new<T: Into<::ethers::core::types::Address>>(
804            address: T,
805            client: ::std::sync::Arc<M>,
806        ) -> Self {
807            Self(::ethers::contract::Contract::new(
808                address.into(),
809                LIBTUPLER_ABI.clone(),
810                client,
811            ))
812        }
813        /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it.
814        /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction
815        ///
816        /// Notes:
817        /// - If there are no constructor arguments, you should pass `()` as the argument.
818        /// - The default poll duration is 7 seconds.
819        /// - The default number of confirmations is 1 block.
820        ///
821        ///
822        /// # Example
823        ///
824        /// Generate contract bindings with `abigen!` and deploy a new contract instance.
825        ///
826        /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact.
827        ///
828        /// ```ignore
829        /// # async fn deploy<M: ethers::providers::Middleware>(client: ::std::sync::Arc<M>) {
830        ///     abigen!(Greeter, "../greeter.json");
831        ///
832        ///    let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap();
833        ///    let msg = greeter_contract.greet().call().await.unwrap();
834        /// # }
835        /// ```
836        pub fn deploy<T: ::ethers::core::abi::Tokenize>(
837            client: ::std::sync::Arc<M>,
838            constructor_args: T,
839        ) -> ::core::result::Result<
840            ::ethers::contract::builders::ContractDeployer<M, Self>,
841            ::ethers::contract::ContractError<M>,
842        > {
843            let factory = ::ethers::contract::ContractFactory::new(
844                LIBTUPLER_ABI.clone(),
845                LIBTUPLER_BYTECODE.clone().into(),
846                client,
847            );
848            let deployer = factory.deploy(constructor_args)?;
849            let deployer = ::ethers::contract::ContractDeployer::new(deployer);
850            Ok(deployer)
851        }
852        ///Calls the contract's `extractElement` (0x9bd3b227) function
853        pub fn extract_element(
854            &self,
855            tuple: ::ethers::core::types::Bytes,
856            index: ::ethers::core::types::U256,
857        ) -> ::ethers::contract::builders::ContractCall<M, [u8; 32]> {
858            self.0
859                .method_hash([155, 211, 178, 39], (tuple, index))
860                .expect("method not found (this should never happen)")
861        }
862    }
863    impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>> for LibTupler<M> {
864        fn from(contract: ::ethers::contract::Contract<M>) -> Self {
865            Self::new(contract.address(), contract.client())
866        }
867    }
868    ///Container type for all input parameters for the `extractElement` function with signature `extractElement(bytes,uint256)` and selector `0x9bd3b227`
869    #[derive(
870        Clone,
871        ::ethers::contract::EthCall,
872        ::ethers::contract::EthDisplay,
873        Default,
874        Debug,
875        PartialEq,
876        Eq,
877        Hash,
878    )]
879    #[ethcall(name = "extractElement", abi = "extractElement(bytes,uint256)")]
880    pub struct ExtractElementCall {
881        pub tuple: ::ethers::core::types::Bytes,
882        pub index: ::ethers::core::types::U256,
883    }
884    ///Container type for all return fields from the `extractElement` function with signature `extractElement(bytes,uint256)` and selector `0x9bd3b227`
885    #[derive(
886        Clone,
887        ::ethers::contract::EthAbiType,
888        ::ethers::contract::EthAbiCodec,
889        Default,
890        Debug,
891        PartialEq,
892        Eq,
893        Hash,
894    )]
895    pub struct ExtractElementReturn(pub [u8; 32]);
896}