hopr_bindings/codegen/
hopr_winning_probability_oracle_events.rs

1pub use hopr_winning_probability_oracle_events::*;
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 hopr_winning_probability_oracle_events {
13    #[allow(deprecated)]
14    fn __abi() -> ::ethers::core::abi::Abi {
15        ::ethers::core::abi::ethabi::Contract {
16            constructor: ::core::option::Option::None,
17            functions: ::std::collections::BTreeMap::new(),
18            events: ::core::convert::From::from([
19                (
20                    ::std::borrow::ToOwned::to_owned("WinProbUpdated"),
21                    ::std::vec![
22                        ::ethers::core::abi::ethabi::Event {
23                            name: ::std::borrow::ToOwned::to_owned("WinProbUpdated"),
24                            inputs: ::std::vec![
25                                ::ethers::core::abi::ethabi::EventParam {
26                                    name: ::std::borrow::ToOwned::to_owned("oldWinProb"),
27                                    kind: ::ethers::core::abi::ethabi::ParamType::Uint(56usize),
28                                    indexed: false,
29                                },
30                                ::ethers::core::abi::ethabi::EventParam {
31                                    name: ::std::borrow::ToOwned::to_owned("newWinProb"),
32                                    kind: ::ethers::core::abi::ethabi::ParamType::Uint(56usize),
33                                    indexed: false,
34                                },
35                            ],
36                            anonymous: false,
37                        },
38                    ],
39                ),
40            ]),
41            errors: ::std::collections::BTreeMap::new(),
42            receive: false,
43            fallback: false,
44        }
45    }
46    ///The parsed JSON ABI of the contract.
47    pub static HOPRWINNINGPROBABILITYORACLEEVENTS_ABI: ::ethers::contract::Lazy<
48        ::ethers::core::abi::Abi,
49    > = ::ethers::contract::Lazy::new(__abi);
50    pub struct HoprWinningProbabilityOracleEvents<M>(::ethers::contract::Contract<M>);
51    impl<M> ::core::clone::Clone for HoprWinningProbabilityOracleEvents<M> {
52        fn clone(&self) -> Self {
53            Self(::core::clone::Clone::clone(&self.0))
54        }
55    }
56    impl<M> ::core::ops::Deref for HoprWinningProbabilityOracleEvents<M> {
57        type Target = ::ethers::contract::Contract<M>;
58        fn deref(&self) -> &Self::Target {
59            &self.0
60        }
61    }
62    impl<M> ::core::ops::DerefMut for HoprWinningProbabilityOracleEvents<M> {
63        fn deref_mut(&mut self) -> &mut Self::Target {
64            &mut self.0
65        }
66    }
67    impl<M> ::core::fmt::Debug for HoprWinningProbabilityOracleEvents<M> {
68        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
69            f.debug_tuple(::core::stringify!(HoprWinningProbabilityOracleEvents))
70                .field(&self.address())
71                .finish()
72        }
73    }
74    impl<M: ::ethers::providers::Middleware> HoprWinningProbabilityOracleEvents<M> {
75        /// Creates a new contract instance with the specified `ethers` client at
76        /// `address`. The contract derefs to a `ethers::Contract` object.
77        pub fn new<T: Into<::ethers::core::types::Address>>(
78            address: T,
79            client: ::std::sync::Arc<M>,
80        ) -> Self {
81            Self(
82                ::ethers::contract::Contract::new(
83                    address.into(),
84                    HOPRWINNINGPROBABILITYORACLEEVENTS_ABI.clone(),
85                    client,
86                ),
87            )
88        }
89        ///Gets the contract's `WinProbUpdated` event
90        pub fn win_prob_updated_filter(
91            &self,
92        ) -> ::ethers::contract::builders::Event<
93            ::std::sync::Arc<M>,
94            M,
95            WinProbUpdatedFilter,
96        > {
97            self.0.event()
98        }
99        /// Returns an `Event` builder for all the events of this contract.
100        pub fn events(
101            &self,
102        ) -> ::ethers::contract::builders::Event<
103            ::std::sync::Arc<M>,
104            M,
105            WinProbUpdatedFilter,
106        > {
107            self.0.event_with_filter(::core::default::Default::default())
108        }
109    }
110    impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>>
111    for HoprWinningProbabilityOracleEvents<M> {
112        fn from(contract: ::ethers::contract::Contract<M>) -> Self {
113            Self::new(contract.address(), contract.client())
114        }
115    }
116    #[derive(
117        Clone,
118        ::ethers::contract::EthEvent,
119        ::ethers::contract::EthDisplay,
120        serde::Serialize,
121        serde::Deserialize,
122        Default,
123        Debug,
124        PartialEq,
125        Eq,
126        Hash
127    )]
128    #[ethevent(name = "WinProbUpdated", abi = "WinProbUpdated(uint56,uint56)")]
129    pub struct WinProbUpdatedFilter {
130        pub old_win_prob: u64,
131        pub new_win_prob: u64,
132    }
133}