hopr_bindings/codegen/
hopr_winning_probability_oracle.rs

1pub use hopr_winning_probability_oracle::*;
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 {
13    #[allow(deprecated)]
14    fn __abi() -> ::ethers::core::abi::Abi {
15        ::ethers::core::abi::ethabi::Contract {
16            constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor {
17                inputs: ::std::vec![
18                    ::ethers::core::abi::ethabi::Param {
19                        name: ::std::borrow::ToOwned::to_owned("_newOwner"),
20                        kind: ::ethers::core::abi::ethabi::ParamType::Address,
21                        internal_type: ::core::option::Option::Some(
22                            ::std::borrow::ToOwned::to_owned("address"),
23                        ),
24                    },
25                    ::ethers::core::abi::ethabi::Param {
26                        name: ::std::borrow::ToOwned::to_owned("_initialWinProb"),
27                        kind: ::ethers::core::abi::ethabi::ParamType::Uint(56usize),
28                        internal_type: ::core::option::Option::Some(
29                            ::std::borrow::ToOwned::to_owned("WinProb"),
30                        ),
31                    },
32                ],
33            }),
34            functions: ::core::convert::From::from([
35                (
36                    ::std::borrow::ToOwned::to_owned("acceptOwnership"),
37                    ::std::vec![
38                        ::ethers::core::abi::ethabi::Function {
39                            name: ::std::borrow::ToOwned::to_owned("acceptOwnership"),
40                            inputs: ::std::vec![],
41                            outputs: ::std::vec![],
42                            constant: ::core::option::Option::None,
43                            state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
44                        },
45                    ],
46                ),
47                (
48                    ::std::borrow::ToOwned::to_owned("currentWinProb"),
49                    ::std::vec![
50                        ::ethers::core::abi::ethabi::Function {
51                            name: ::std::borrow::ToOwned::to_owned("currentWinProb"),
52                            inputs: ::std::vec![],
53                            outputs: ::std::vec![
54                                ::ethers::core::abi::ethabi::Param {
55                                    name: ::std::string::String::new(),
56                                    kind: ::ethers::core::abi::ethabi::ParamType::Uint(56usize),
57                                    internal_type: ::core::option::Option::Some(
58                                        ::std::borrow::ToOwned::to_owned("WinProb"),
59                                    ),
60                                },
61                            ],
62                            constant: ::core::option::Option::None,
63                            state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
64                        },
65                    ],
66                ),
67                (
68                    ::std::borrow::ToOwned::to_owned("owner"),
69                    ::std::vec![
70                        ::ethers::core::abi::ethabi::Function {
71                            name: ::std::borrow::ToOwned::to_owned("owner"),
72                            inputs: ::std::vec![],
73                            outputs: ::std::vec![
74                                ::ethers::core::abi::ethabi::Param {
75                                    name: ::std::string::String::new(),
76                                    kind: ::ethers::core::abi::ethabi::ParamType::Address,
77                                    internal_type: ::core::option::Option::Some(
78                                        ::std::borrow::ToOwned::to_owned("address"),
79                                    ),
80                                },
81                            ],
82                            constant: ::core::option::Option::None,
83                            state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
84                        },
85                    ],
86                ),
87                (
88                    ::std::borrow::ToOwned::to_owned("pendingOwner"),
89                    ::std::vec![
90                        ::ethers::core::abi::ethabi::Function {
91                            name: ::std::borrow::ToOwned::to_owned("pendingOwner"),
92                            inputs: ::std::vec![],
93                            outputs: ::std::vec![
94                                ::ethers::core::abi::ethabi::Param {
95                                    name: ::std::string::String::new(),
96                                    kind: ::ethers::core::abi::ethabi::ParamType::Address,
97                                    internal_type: ::core::option::Option::Some(
98                                        ::std::borrow::ToOwned::to_owned("address"),
99                                    ),
100                                },
101                            ],
102                            constant: ::core::option::Option::None,
103                            state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
104                        },
105                    ],
106                ),
107                (
108                    ::std::borrow::ToOwned::to_owned("renounceOwnership"),
109                    ::std::vec![
110                        ::ethers::core::abi::ethabi::Function {
111                            name: ::std::borrow::ToOwned::to_owned("renounceOwnership"),
112                            inputs: ::std::vec![],
113                            outputs: ::std::vec![],
114                            constant: ::core::option::Option::None,
115                            state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
116                        },
117                    ],
118                ),
119                (
120                    ::std::borrow::ToOwned::to_owned("setWinProb"),
121                    ::std::vec![
122                        ::ethers::core::abi::ethabi::Function {
123                            name: ::std::borrow::ToOwned::to_owned("setWinProb"),
124                            inputs: ::std::vec![
125                                ::ethers::core::abi::ethabi::Param {
126                                    name: ::std::borrow::ToOwned::to_owned("_newWinProb"),
127                                    kind: ::ethers::core::abi::ethabi::ParamType::Uint(56usize),
128                                    internal_type: ::core::option::Option::Some(
129                                        ::std::borrow::ToOwned::to_owned("WinProb"),
130                                    ),
131                                },
132                            ],
133                            outputs: ::std::vec![],
134                            constant: ::core::option::Option::None,
135                            state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
136                        },
137                    ],
138                ),
139                (
140                    ::std::borrow::ToOwned::to_owned("transferOwnership"),
141                    ::std::vec![
142                        ::ethers::core::abi::ethabi::Function {
143                            name: ::std::borrow::ToOwned::to_owned("transferOwnership"),
144                            inputs: ::std::vec![
145                                ::ethers::core::abi::ethabi::Param {
146                                    name: ::std::borrow::ToOwned::to_owned("newOwner"),
147                                    kind: ::ethers::core::abi::ethabi::ParamType::Address,
148                                    internal_type: ::core::option::Option::Some(
149                                        ::std::borrow::ToOwned::to_owned("address"),
150                                    ),
151                                },
152                            ],
153                            outputs: ::std::vec![],
154                            constant: ::core::option::Option::None,
155                            state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
156                        },
157                    ],
158                ),
159            ]),
160            events: ::core::convert::From::from([
161                (
162                    ::std::borrow::ToOwned::to_owned("OwnershipTransferStarted"),
163                    ::std::vec![
164                        ::ethers::core::abi::ethabi::Event {
165                            name: ::std::borrow::ToOwned::to_owned(
166                                "OwnershipTransferStarted",
167                            ),
168                            inputs: ::std::vec![
169                                ::ethers::core::abi::ethabi::EventParam {
170                                    name: ::std::borrow::ToOwned::to_owned("previousOwner"),
171                                    kind: ::ethers::core::abi::ethabi::ParamType::Address,
172                                    indexed: true,
173                                },
174                                ::ethers::core::abi::ethabi::EventParam {
175                                    name: ::std::borrow::ToOwned::to_owned("newOwner"),
176                                    kind: ::ethers::core::abi::ethabi::ParamType::Address,
177                                    indexed: true,
178                                },
179                            ],
180                            anonymous: false,
181                        },
182                    ],
183                ),
184                (
185                    ::std::borrow::ToOwned::to_owned("OwnershipTransferred"),
186                    ::std::vec![
187                        ::ethers::core::abi::ethabi::Event {
188                            name: ::std::borrow::ToOwned::to_owned(
189                                "OwnershipTransferred",
190                            ),
191                            inputs: ::std::vec![
192                                ::ethers::core::abi::ethabi::EventParam {
193                                    name: ::std::borrow::ToOwned::to_owned("previousOwner"),
194                                    kind: ::ethers::core::abi::ethabi::ParamType::Address,
195                                    indexed: true,
196                                },
197                                ::ethers::core::abi::ethabi::EventParam {
198                                    name: ::std::borrow::ToOwned::to_owned("newOwner"),
199                                    kind: ::ethers::core::abi::ethabi::ParamType::Address,
200                                    indexed: true,
201                                },
202                            ],
203                            anonymous: false,
204                        },
205                    ],
206                ),
207                (
208                    ::std::borrow::ToOwned::to_owned("WinProbUpdated"),
209                    ::std::vec![
210                        ::ethers::core::abi::ethabi::Event {
211                            name: ::std::borrow::ToOwned::to_owned("WinProbUpdated"),
212                            inputs: ::std::vec![
213                                ::ethers::core::abi::ethabi::EventParam {
214                                    name: ::std::borrow::ToOwned::to_owned("oldWinProb"),
215                                    kind: ::ethers::core::abi::ethabi::ParamType::Uint(56usize),
216                                    indexed: false,
217                                },
218                                ::ethers::core::abi::ethabi::EventParam {
219                                    name: ::std::borrow::ToOwned::to_owned("newWinProb"),
220                                    kind: ::ethers::core::abi::ethabi::ParamType::Uint(56usize),
221                                    indexed: false,
222                                },
223                            ],
224                            anonymous: false,
225                        },
226                    ],
227                ),
228            ]),
229            errors: ::core::convert::From::from([
230                (
231                    ::std::borrow::ToOwned::to_owned("WinProbMustNotBeSame"),
232                    ::std::vec![
233                        ::ethers::core::abi::ethabi::AbiError {
234                            name: ::std::borrow::ToOwned::to_owned(
235                                "WinProbMustNotBeSame",
236                            ),
237                            inputs: ::std::vec![],
238                        },
239                    ],
240                ),
241            ]),
242            receive: false,
243            fallback: false,
244        }
245    }
246    ///The parsed JSON ABI of the contract.
247    pub static HOPRWINNINGPROBABILITYORACLE_ABI: ::ethers::contract::Lazy<
248        ::ethers::core::abi::Abi,
249    > = ::ethers::contract::Lazy::new(__abi);
250    #[rustfmt::skip]
251    const __BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`@Qa\x05\xC78\x03\x80a\x05\xC7\x839\x81\x01`@\x81\x90Ra\0/\x91a\x010V[a\083a\0QV[a\0A\x82a\0QV[a\0J\x81a\0mV[PPa\x01\x82V[`\x01\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16\x90Ua\0j\x81a\0\xE0V[PV[`\x01\x80Tf\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x16`\x01`\xA0\x1B\x90\x81\x02f\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xA0\x1B\x19\x84\x16\x17\x93\x84\x90U`@\x80Q\x93\x82\x90\x04\x83\x16\x80\x85R\x91\x90\x94\x04\x90\x91\x16` \x83\x01R\x91\x7F\x02r\x8CJ\x807?GeU\x9D\xC3\xA0F\xED\xEA\x88\x18d$\x82r8\xBBF$Vh1]8\0\x91\x01`@Q\x80\x91\x03\x90\xA1PPV[`\0\x80T`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\x01`\x01`\xA0\x1B\x03\x19\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0\x80`@\x83\x85\x03\x12\x15a\x01CW`\0\x80\xFD[\x82Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x01ZW`\0\x80\xFD[` \x84\x01Q\x90\x92Pf\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x01wW`\0\x80\xFD[\x80\x91PP\x92P\x92\x90PV[a\x046\x80a\x01\x91`\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0}W`\x005`\xE0\x1C\x80c\x8D\xA5\xCB[\x11a\0[W\x80c\x8D\xA5\xCB[\x14a\0\xCBW\x80c\xE3\x0C9x\x14a\0\xF0W\x80c\xF2\xFD\xE3\x8B\x14a\x01\x01W\x80c\xFD\xE4o\xF8\x14a\x01\x14W`\0\x80\xFD[\x80c\x16\x8E\x91`\x14a\0\x82W\x80cqP\x18\xA6\x14a\0\xB9W\x80cy\xBAP\x97\x14a\0\xC3W[`\0\x80\xFD[`\x01Ta\0\x9C\x90`\x01`\xA0\x1B\x90\x04f\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qf\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0\xC1a\x01'V[\0[a\0\xC1a\x01;V[`\0T`\x01`\x01`\xA0\x1B\x03\x16[`@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x01a\0\xB0V[`\x01T`\x01`\x01`\xA0\x1B\x03\x16a\0\xD8V[a\0\xC1a\x01\x0F6`\x04a\x03\xA7V[a\x01\xBAV[a\0\xC1a\x01\"6`\x04a\x03\xD7V[a\x02+V[a\x01/a\x02qV[a\x019`\0a\x02\xCBV[V[`\x01T3\x90`\x01`\x01`\xA0\x1B\x03\x16\x81\x14a\x01\xAEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`)`$\x82\x01R\x7FOwnable2Step: caller is not the `D\x82\x01Rh72\xBB\x907\xBB\xB72\xB9`\xB9\x1B`d\x82\x01R`\x84\x01[`@Q\x80\x91\x03\x90\xFD[a\x01\xB7\x81a\x02\xCBV[PV[a\x01\xC2a\x02qV[`\x01\x80T`\x01`\x01`\xA0\x1B\x03\x83\x16`\x01`\x01`\xA0\x1B\x03\x19\x90\x91\x16\x81\x17\x90\x91Ua\x01\xF3`\0T`\x01`\x01`\xA0\x1B\x03\x16\x90V[`\x01`\x01`\xA0\x1B\x03\x16\x7F8\xD1k\x8C\xAC\"\xD9\x9F\xC7\xC1$\xB9\xCD\r\xE2\xD3\xFA\x1F\xAE\xF4 \xBF\xE7\x91\xD8\xC3b\xD7e\xE2'\0`@Q`@Q\x80\x91\x03\x90\xA3PV[a\x023a\x02qV[`\x01Tf\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x83\x16`\x01`\xA0\x1B\x90\x92\x04\x16\x03a\x02hW`@Qc6\xBF\x1F\xCD`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[a\x01\xB7\x81a\x02\xE4V[`\0T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x019W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01\x81\x90R`$\x82\x01R\x7FOwnable: caller is not the owner`D\x82\x01R`d\x01a\x01\xA5V[`\x01\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16\x90Ua\x01\xB7\x81a\x03WV[`\x01\x80Tf\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x16`\x01`\xA0\x1B\x90\x81\x02f\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xA0\x1B\x19\x84\x16\x17\x93\x84\x90U`@\x80Q\x93\x82\x90\x04\x83\x16\x80\x85R\x91\x90\x94\x04\x90\x91\x16` \x83\x01R\x91\x7F\x02r\x8CJ\x807?GeU\x9D\xC3\xA0F\xED\xEA\x88\x18d$\x82r8\xBBF$Vh1]8\0\x91\x01`@Q\x80\x91\x03\x90\xA1PPV[`\0\x80T`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\x01`\x01`\xA0\x1B\x03\x19\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\x03\xB9W`\0\x80\xFD[\x815`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x03\xD0W`\0\x80\xFD[\x93\x92PPPV[`\0` \x82\x84\x03\x12\x15a\x03\xE9W`\0\x80\xFD[\x815f\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x03\xD0W`\0\x80\xFD\xFE\xA2dipfsX\"\x12 \xEB\xC7->e\xDC:\x08\x1F\xE6\xE8I(\x162\x931\x8D\t\x86\rG\x1C\xE1\xC1\x80v\xE7\xA6aH*dsolcC\0\x08\x13\x003";
252    /// The bytecode of the contract.
253    pub static HOPRWINNINGPROBABILITYORACLE_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static(
254        __BYTECODE,
255    );
256    #[rustfmt::skip]
257    const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0}W`\x005`\xE0\x1C\x80c\x8D\xA5\xCB[\x11a\0[W\x80c\x8D\xA5\xCB[\x14a\0\xCBW\x80c\xE3\x0C9x\x14a\0\xF0W\x80c\xF2\xFD\xE3\x8B\x14a\x01\x01W\x80c\xFD\xE4o\xF8\x14a\x01\x14W`\0\x80\xFD[\x80c\x16\x8E\x91`\x14a\0\x82W\x80cqP\x18\xA6\x14a\0\xB9W\x80cy\xBAP\x97\x14a\0\xC3W[`\0\x80\xFD[`\x01Ta\0\x9C\x90`\x01`\xA0\x1B\x90\x04f\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qf\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0\xC1a\x01'V[\0[a\0\xC1a\x01;V[`\0T`\x01`\x01`\xA0\x1B\x03\x16[`@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x01a\0\xB0V[`\x01T`\x01`\x01`\xA0\x1B\x03\x16a\0\xD8V[a\0\xC1a\x01\x0F6`\x04a\x03\xA7V[a\x01\xBAV[a\0\xC1a\x01\"6`\x04a\x03\xD7V[a\x02+V[a\x01/a\x02qV[a\x019`\0a\x02\xCBV[V[`\x01T3\x90`\x01`\x01`\xA0\x1B\x03\x16\x81\x14a\x01\xAEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`)`$\x82\x01R\x7FOwnable2Step: caller is not the `D\x82\x01Rh72\xBB\x907\xBB\xB72\xB9`\xB9\x1B`d\x82\x01R`\x84\x01[`@Q\x80\x91\x03\x90\xFD[a\x01\xB7\x81a\x02\xCBV[PV[a\x01\xC2a\x02qV[`\x01\x80T`\x01`\x01`\xA0\x1B\x03\x83\x16`\x01`\x01`\xA0\x1B\x03\x19\x90\x91\x16\x81\x17\x90\x91Ua\x01\xF3`\0T`\x01`\x01`\xA0\x1B\x03\x16\x90V[`\x01`\x01`\xA0\x1B\x03\x16\x7F8\xD1k\x8C\xAC\"\xD9\x9F\xC7\xC1$\xB9\xCD\r\xE2\xD3\xFA\x1F\xAE\xF4 \xBF\xE7\x91\xD8\xC3b\xD7e\xE2'\0`@Q`@Q\x80\x91\x03\x90\xA3PV[a\x023a\x02qV[`\x01Tf\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x83\x16`\x01`\xA0\x1B\x90\x92\x04\x16\x03a\x02hW`@Qc6\xBF\x1F\xCD`\xE0\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[a\x01\xB7\x81a\x02\xE4V[`\0T`\x01`\x01`\xA0\x1B\x03\x163\x14a\x019W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01\x81\x90R`$\x82\x01R\x7FOwnable: caller is not the owner`D\x82\x01R`d\x01a\x01\xA5V[`\x01\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16\x90Ua\x01\xB7\x81a\x03WV[`\x01\x80Tf\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x16`\x01`\xA0\x1B\x90\x81\x02f\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\xA0\x1B\x19\x84\x16\x17\x93\x84\x90U`@\x80Q\x93\x82\x90\x04\x83\x16\x80\x85R\x91\x90\x94\x04\x90\x91\x16` \x83\x01R\x91\x7F\x02r\x8CJ\x807?GeU\x9D\xC3\xA0F\xED\xEA\x88\x18d$\x82r8\xBBF$Vh1]8\0\x91\x01`@Q\x80\x91\x03\x90\xA1PPV[`\0\x80T`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\x01`\x01`\xA0\x1B\x03\x19\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\x03\xB9W`\0\x80\xFD[\x815`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x03\xD0W`\0\x80\xFD[\x93\x92PPPV[`\0` \x82\x84\x03\x12\x15a\x03\xE9W`\0\x80\xFD[\x815f\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x03\xD0W`\0\x80\xFD\xFE\xA2dipfsX\"\x12 \xEB\xC7->e\xDC:\x08\x1F\xE6\xE8I(\x162\x931\x8D\t\x86\rG\x1C\xE1\xC1\x80v\xE7\xA6aH*dsolcC\0\x08\x13\x003";
258    /// The deployed bytecode of the contract.
259    pub static HOPRWINNINGPROBABILITYORACLE_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static(
260        __DEPLOYED_BYTECODE,
261    );
262    pub struct HoprWinningProbabilityOracle<M>(::ethers::contract::Contract<M>);
263    impl<M> ::core::clone::Clone for HoprWinningProbabilityOracle<M> {
264        fn clone(&self) -> Self {
265            Self(::core::clone::Clone::clone(&self.0))
266        }
267    }
268    impl<M> ::core::ops::Deref for HoprWinningProbabilityOracle<M> {
269        type Target = ::ethers::contract::Contract<M>;
270        fn deref(&self) -> &Self::Target {
271            &self.0
272        }
273    }
274    impl<M> ::core::ops::DerefMut for HoprWinningProbabilityOracle<M> {
275        fn deref_mut(&mut self) -> &mut Self::Target {
276            &mut self.0
277        }
278    }
279    impl<M> ::core::fmt::Debug for HoprWinningProbabilityOracle<M> {
280        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
281            f.debug_tuple(::core::stringify!(HoprWinningProbabilityOracle))
282                .field(&self.address())
283                .finish()
284        }
285    }
286    impl<M: ::ethers::providers::Middleware> HoprWinningProbabilityOracle<M> {
287        /// Creates a new contract instance with the specified `ethers` client at
288        /// `address`. The contract derefs to a `ethers::Contract` object.
289        pub fn new<T: Into<::ethers::core::types::Address>>(
290            address: T,
291            client: ::std::sync::Arc<M>,
292        ) -> Self {
293            Self(
294                ::ethers::contract::Contract::new(
295                    address.into(),
296                    HOPRWINNINGPROBABILITYORACLE_ABI.clone(),
297                    client,
298                ),
299            )
300        }
301        /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it.
302        /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction
303        ///
304        /// Notes:
305        /// - If there are no constructor arguments, you should pass `()` as the argument.
306        /// - The default poll duration is 7 seconds.
307        /// - The default number of confirmations is 1 block.
308        ///
309        ///
310        /// # Example
311        ///
312        /// Generate contract bindings with `abigen!` and deploy a new contract instance.
313        ///
314        /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact.
315        ///
316        /// ```ignore
317        /// # async fn deploy<M: ethers::providers::Middleware>(client: ::std::sync::Arc<M>) {
318        ///     abigen!(Greeter, "../greeter.json");
319        ///
320        ///    let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap();
321        ///    let msg = greeter_contract.greet().call().await.unwrap();
322        /// # }
323        /// ```
324        pub fn deploy<T: ::ethers::core::abi::Tokenize>(
325            client: ::std::sync::Arc<M>,
326            constructor_args: T,
327        ) -> ::core::result::Result<
328            ::ethers::contract::builders::ContractDeployer<M, Self>,
329            ::ethers::contract::ContractError<M>,
330        > {
331            let factory = ::ethers::contract::ContractFactory::new(
332                HOPRWINNINGPROBABILITYORACLE_ABI.clone(),
333                HOPRWINNINGPROBABILITYORACLE_BYTECODE.clone().into(),
334                client,
335            );
336            let deployer = factory.deploy(constructor_args)?;
337            let deployer = ::ethers::contract::ContractDeployer::new(deployer);
338            Ok(deployer)
339        }
340        ///Calls the contract's `acceptOwnership` (0x79ba5097) function
341        pub fn accept_ownership(
342            &self,
343        ) -> ::ethers::contract::builders::ContractCall<M, ()> {
344            self.0
345                .method_hash([121, 186, 80, 151], ())
346                .expect("method not found (this should never happen)")
347        }
348        ///Calls the contract's `currentWinProb` (0x168e9160) function
349        pub fn current_win_prob(
350            &self,
351        ) -> ::ethers::contract::builders::ContractCall<M, u64> {
352            self.0
353                .method_hash([22, 142, 145, 96], ())
354                .expect("method not found (this should never happen)")
355        }
356        ///Calls the contract's `owner` (0x8da5cb5b) function
357        pub fn owner(
358            &self,
359        ) -> ::ethers::contract::builders::ContractCall<
360            M,
361            ::ethers::core::types::Address,
362        > {
363            self.0
364                .method_hash([141, 165, 203, 91], ())
365                .expect("method not found (this should never happen)")
366        }
367        ///Calls the contract's `pendingOwner` (0xe30c3978) function
368        pub fn pending_owner(
369            &self,
370        ) -> ::ethers::contract::builders::ContractCall<
371            M,
372            ::ethers::core::types::Address,
373        > {
374            self.0
375                .method_hash([227, 12, 57, 120], ())
376                .expect("method not found (this should never happen)")
377        }
378        ///Calls the contract's `renounceOwnership` (0x715018a6) function
379        pub fn renounce_ownership(
380            &self,
381        ) -> ::ethers::contract::builders::ContractCall<M, ()> {
382            self.0
383                .method_hash([113, 80, 24, 166], ())
384                .expect("method not found (this should never happen)")
385        }
386        ///Calls the contract's `setWinProb` (0xfde46ff8) function
387        pub fn set_win_prob(
388            &self,
389            new_win_prob: u64,
390        ) -> ::ethers::contract::builders::ContractCall<M, ()> {
391            self.0
392                .method_hash([253, 228, 111, 248], new_win_prob)
393                .expect("method not found (this should never happen)")
394        }
395        ///Calls the contract's `transferOwnership` (0xf2fde38b) function
396        pub fn transfer_ownership(
397            &self,
398            new_owner: ::ethers::core::types::Address,
399        ) -> ::ethers::contract::builders::ContractCall<M, ()> {
400            self.0
401                .method_hash([242, 253, 227, 139], new_owner)
402                .expect("method not found (this should never happen)")
403        }
404        ///Gets the contract's `OwnershipTransferStarted` event
405        pub fn ownership_transfer_started_filter(
406            &self,
407        ) -> ::ethers::contract::builders::Event<
408            ::std::sync::Arc<M>,
409            M,
410            OwnershipTransferStartedFilter,
411        > {
412            self.0.event()
413        }
414        ///Gets the contract's `OwnershipTransferred` event
415        pub fn ownership_transferred_filter(
416            &self,
417        ) -> ::ethers::contract::builders::Event<
418            ::std::sync::Arc<M>,
419            M,
420            OwnershipTransferredFilter,
421        > {
422            self.0.event()
423        }
424        ///Gets the contract's `WinProbUpdated` event
425        pub fn win_prob_updated_filter(
426            &self,
427        ) -> ::ethers::contract::builders::Event<
428            ::std::sync::Arc<M>,
429            M,
430            WinProbUpdatedFilter,
431        > {
432            self.0.event()
433        }
434        /// Returns an `Event` builder for all the events of this contract.
435        pub fn events(
436            &self,
437        ) -> ::ethers::contract::builders::Event<
438            ::std::sync::Arc<M>,
439            M,
440            HoprWinningProbabilityOracleEvents,
441        > {
442            self.0.event_with_filter(::core::default::Default::default())
443        }
444    }
445    impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>>
446    for HoprWinningProbabilityOracle<M> {
447        fn from(contract: ::ethers::contract::Contract<M>) -> Self {
448            Self::new(contract.address(), contract.client())
449        }
450    }
451    ///Custom Error type `WinProbMustNotBeSame` with signature `WinProbMustNotBeSame()` and selector `0x36bf1fcd`
452    #[derive(
453        Clone,
454        ::ethers::contract::EthError,
455        ::ethers::contract::EthDisplay,
456        serde::Serialize,
457        serde::Deserialize,
458        Default,
459        Debug,
460        PartialEq,
461        Eq,
462        Hash
463    )]
464    #[etherror(name = "WinProbMustNotBeSame", abi = "WinProbMustNotBeSame()")]
465    pub struct WinProbMustNotBeSame;
466    #[derive(
467        Clone,
468        ::ethers::contract::EthEvent,
469        ::ethers::contract::EthDisplay,
470        serde::Serialize,
471        serde::Deserialize,
472        Default,
473        Debug,
474        PartialEq,
475        Eq,
476        Hash
477    )]
478    #[ethevent(
479        name = "OwnershipTransferStarted",
480        abi = "OwnershipTransferStarted(address,address)"
481    )]
482    pub struct OwnershipTransferStartedFilter {
483        #[ethevent(indexed)]
484        pub previous_owner: ::ethers::core::types::Address,
485        #[ethevent(indexed)]
486        pub new_owner: ::ethers::core::types::Address,
487    }
488    #[derive(
489        Clone,
490        ::ethers::contract::EthEvent,
491        ::ethers::contract::EthDisplay,
492        serde::Serialize,
493        serde::Deserialize,
494        Default,
495        Debug,
496        PartialEq,
497        Eq,
498        Hash
499    )]
500    #[ethevent(
501        name = "OwnershipTransferred",
502        abi = "OwnershipTransferred(address,address)"
503    )]
504    pub struct OwnershipTransferredFilter {
505        #[ethevent(indexed)]
506        pub previous_owner: ::ethers::core::types::Address,
507        #[ethevent(indexed)]
508        pub new_owner: ::ethers::core::types::Address,
509    }
510    #[derive(
511        Clone,
512        ::ethers::contract::EthEvent,
513        ::ethers::contract::EthDisplay,
514        serde::Serialize,
515        serde::Deserialize,
516        Default,
517        Debug,
518        PartialEq,
519        Eq,
520        Hash
521    )]
522    #[ethevent(name = "WinProbUpdated", abi = "WinProbUpdated(uint56,uint56)")]
523    pub struct WinProbUpdatedFilter {
524        pub old_win_prob: u64,
525        pub new_win_prob: u64,
526    }
527    ///Container type for all of the contract's events
528    #[derive(
529        Clone,
530        ::ethers::contract::EthAbiType,
531        serde::Serialize,
532        serde::Deserialize,
533        Debug,
534        PartialEq,
535        Eq,
536        Hash
537    )]
538    pub enum HoprWinningProbabilityOracleEvents {
539        OwnershipTransferStartedFilter(OwnershipTransferStartedFilter),
540        OwnershipTransferredFilter(OwnershipTransferredFilter),
541        WinProbUpdatedFilter(WinProbUpdatedFilter),
542    }
543    impl ::ethers::contract::EthLogDecode for HoprWinningProbabilityOracleEvents {
544        fn decode_log(
545            log: &::ethers::core::abi::RawLog,
546        ) -> ::core::result::Result<Self, ::ethers::core::abi::Error> {
547            if let Ok(decoded) = OwnershipTransferStartedFilter::decode_log(log) {
548                return Ok(
549                    HoprWinningProbabilityOracleEvents::OwnershipTransferStartedFilter(
550                        decoded,
551                    ),
552                );
553            }
554            if let Ok(decoded) = OwnershipTransferredFilter::decode_log(log) {
555                return Ok(
556                    HoprWinningProbabilityOracleEvents::OwnershipTransferredFilter(
557                        decoded,
558                    ),
559                );
560            }
561            if let Ok(decoded) = WinProbUpdatedFilter::decode_log(log) {
562                return Ok(
563                    HoprWinningProbabilityOracleEvents::WinProbUpdatedFilter(decoded),
564                );
565            }
566            Err(::ethers::core::abi::Error::InvalidData)
567        }
568    }
569    impl ::core::fmt::Display for HoprWinningProbabilityOracleEvents {
570        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
571            match self {
572                Self::OwnershipTransferStartedFilter(element) => {
573                    ::core::fmt::Display::fmt(element, f)
574                }
575                Self::OwnershipTransferredFilter(element) => {
576                    ::core::fmt::Display::fmt(element, f)
577                }
578                Self::WinProbUpdatedFilter(element) => {
579                    ::core::fmt::Display::fmt(element, f)
580                }
581            }
582        }
583    }
584    impl ::core::convert::From<OwnershipTransferStartedFilter>
585    for HoprWinningProbabilityOracleEvents {
586        fn from(value: OwnershipTransferStartedFilter) -> Self {
587            Self::OwnershipTransferStartedFilter(value)
588        }
589    }
590    impl ::core::convert::From<OwnershipTransferredFilter>
591    for HoprWinningProbabilityOracleEvents {
592        fn from(value: OwnershipTransferredFilter) -> Self {
593            Self::OwnershipTransferredFilter(value)
594        }
595    }
596    impl ::core::convert::From<WinProbUpdatedFilter>
597    for HoprWinningProbabilityOracleEvents {
598        fn from(value: WinProbUpdatedFilter) -> Self {
599            Self::WinProbUpdatedFilter(value)
600        }
601    }
602    ///Container type for all input parameters for the `acceptOwnership` function with signature `acceptOwnership()` and selector `0x79ba5097`
603    #[derive(
604        Clone,
605        ::ethers::contract::EthCall,
606        ::ethers::contract::EthDisplay,
607        serde::Serialize,
608        serde::Deserialize,
609        Default,
610        Debug,
611        PartialEq,
612        Eq,
613        Hash
614    )]
615    #[ethcall(name = "acceptOwnership", abi = "acceptOwnership()")]
616    pub struct AcceptOwnershipCall;
617    ///Container type for all input parameters for the `currentWinProb` function with signature `currentWinProb()` and selector `0x168e9160`
618    #[derive(
619        Clone,
620        ::ethers::contract::EthCall,
621        ::ethers::contract::EthDisplay,
622        serde::Serialize,
623        serde::Deserialize,
624        Default,
625        Debug,
626        PartialEq,
627        Eq,
628        Hash
629    )]
630    #[ethcall(name = "currentWinProb", abi = "currentWinProb()")]
631    pub struct CurrentWinProbCall;
632    ///Container type for all input parameters for the `owner` function with signature `owner()` and selector `0x8da5cb5b`
633    #[derive(
634        Clone,
635        ::ethers::contract::EthCall,
636        ::ethers::contract::EthDisplay,
637        serde::Serialize,
638        serde::Deserialize,
639        Default,
640        Debug,
641        PartialEq,
642        Eq,
643        Hash
644    )]
645    #[ethcall(name = "owner", abi = "owner()")]
646    pub struct OwnerCall;
647    ///Container type for all input parameters for the `pendingOwner` function with signature `pendingOwner()` and selector `0xe30c3978`
648    #[derive(
649        Clone,
650        ::ethers::contract::EthCall,
651        ::ethers::contract::EthDisplay,
652        serde::Serialize,
653        serde::Deserialize,
654        Default,
655        Debug,
656        PartialEq,
657        Eq,
658        Hash
659    )]
660    #[ethcall(name = "pendingOwner", abi = "pendingOwner()")]
661    pub struct PendingOwnerCall;
662    ///Container type for all input parameters for the `renounceOwnership` function with signature `renounceOwnership()` and selector `0x715018a6`
663    #[derive(
664        Clone,
665        ::ethers::contract::EthCall,
666        ::ethers::contract::EthDisplay,
667        serde::Serialize,
668        serde::Deserialize,
669        Default,
670        Debug,
671        PartialEq,
672        Eq,
673        Hash
674    )]
675    #[ethcall(name = "renounceOwnership", abi = "renounceOwnership()")]
676    pub struct RenounceOwnershipCall;
677    ///Container type for all input parameters for the `setWinProb` function with signature `setWinProb(uint56)` and selector `0xfde46ff8`
678    #[derive(
679        Clone,
680        ::ethers::contract::EthCall,
681        ::ethers::contract::EthDisplay,
682        serde::Serialize,
683        serde::Deserialize,
684        Default,
685        Debug,
686        PartialEq,
687        Eq,
688        Hash
689    )]
690    #[ethcall(name = "setWinProb", abi = "setWinProb(uint56)")]
691    pub struct SetWinProbCall {
692        pub new_win_prob: u64,
693    }
694    ///Container type for all input parameters for the `transferOwnership` function with signature `transferOwnership(address)` and selector `0xf2fde38b`
695    #[derive(
696        Clone,
697        ::ethers::contract::EthCall,
698        ::ethers::contract::EthDisplay,
699        serde::Serialize,
700        serde::Deserialize,
701        Default,
702        Debug,
703        PartialEq,
704        Eq,
705        Hash
706    )]
707    #[ethcall(name = "transferOwnership", abi = "transferOwnership(address)")]
708    pub struct TransferOwnershipCall {
709        pub new_owner: ::ethers::core::types::Address,
710    }
711    ///Container type for all of the contract's call
712    #[derive(
713        Clone,
714        ::ethers::contract::EthAbiType,
715        serde::Serialize,
716        serde::Deserialize,
717        Debug,
718        PartialEq,
719        Eq,
720        Hash
721    )]
722    pub enum HoprWinningProbabilityOracleCalls {
723        AcceptOwnership(AcceptOwnershipCall),
724        CurrentWinProb(CurrentWinProbCall),
725        Owner(OwnerCall),
726        PendingOwner(PendingOwnerCall),
727        RenounceOwnership(RenounceOwnershipCall),
728        SetWinProb(SetWinProbCall),
729        TransferOwnership(TransferOwnershipCall),
730    }
731    impl ::ethers::core::abi::AbiDecode for HoprWinningProbabilityOracleCalls {
732        fn decode(
733            data: impl AsRef<[u8]>,
734        ) -> ::core::result::Result<Self, ::ethers::core::abi::AbiError> {
735            let data = data.as_ref();
736            if let Ok(decoded) = <AcceptOwnershipCall as ::ethers::core::abi::AbiDecode>::decode(
737                data,
738            ) {
739                return Ok(Self::AcceptOwnership(decoded));
740            }
741            if let Ok(decoded) = <CurrentWinProbCall as ::ethers::core::abi::AbiDecode>::decode(
742                data,
743            ) {
744                return Ok(Self::CurrentWinProb(decoded));
745            }
746            if let Ok(decoded) = <OwnerCall as ::ethers::core::abi::AbiDecode>::decode(
747                data,
748            ) {
749                return Ok(Self::Owner(decoded));
750            }
751            if let Ok(decoded) = <PendingOwnerCall as ::ethers::core::abi::AbiDecode>::decode(
752                data,
753            ) {
754                return Ok(Self::PendingOwner(decoded));
755            }
756            if let Ok(decoded) = <RenounceOwnershipCall as ::ethers::core::abi::AbiDecode>::decode(
757                data,
758            ) {
759                return Ok(Self::RenounceOwnership(decoded));
760            }
761            if let Ok(decoded) = <SetWinProbCall as ::ethers::core::abi::AbiDecode>::decode(
762                data,
763            ) {
764                return Ok(Self::SetWinProb(decoded));
765            }
766            if let Ok(decoded) = <TransferOwnershipCall as ::ethers::core::abi::AbiDecode>::decode(
767                data,
768            ) {
769                return Ok(Self::TransferOwnership(decoded));
770            }
771            Err(::ethers::core::abi::Error::InvalidData.into())
772        }
773    }
774    impl ::ethers::core::abi::AbiEncode for HoprWinningProbabilityOracleCalls {
775        fn encode(self) -> Vec<u8> {
776            match self {
777                Self::AcceptOwnership(element) => {
778                    ::ethers::core::abi::AbiEncode::encode(element)
779                }
780                Self::CurrentWinProb(element) => {
781                    ::ethers::core::abi::AbiEncode::encode(element)
782                }
783                Self::Owner(element) => ::ethers::core::abi::AbiEncode::encode(element),
784                Self::PendingOwner(element) => {
785                    ::ethers::core::abi::AbiEncode::encode(element)
786                }
787                Self::RenounceOwnership(element) => {
788                    ::ethers::core::abi::AbiEncode::encode(element)
789                }
790                Self::SetWinProb(element) => {
791                    ::ethers::core::abi::AbiEncode::encode(element)
792                }
793                Self::TransferOwnership(element) => {
794                    ::ethers::core::abi::AbiEncode::encode(element)
795                }
796            }
797        }
798    }
799    impl ::core::fmt::Display for HoprWinningProbabilityOracleCalls {
800        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
801            match self {
802                Self::AcceptOwnership(element) => ::core::fmt::Display::fmt(element, f),
803                Self::CurrentWinProb(element) => ::core::fmt::Display::fmt(element, f),
804                Self::Owner(element) => ::core::fmt::Display::fmt(element, f),
805                Self::PendingOwner(element) => ::core::fmt::Display::fmt(element, f),
806                Self::RenounceOwnership(element) => ::core::fmt::Display::fmt(element, f),
807                Self::SetWinProb(element) => ::core::fmt::Display::fmt(element, f),
808                Self::TransferOwnership(element) => ::core::fmt::Display::fmt(element, f),
809            }
810        }
811    }
812    impl ::core::convert::From<AcceptOwnershipCall>
813    for HoprWinningProbabilityOracleCalls {
814        fn from(value: AcceptOwnershipCall) -> Self {
815            Self::AcceptOwnership(value)
816        }
817    }
818    impl ::core::convert::From<CurrentWinProbCall>
819    for HoprWinningProbabilityOracleCalls {
820        fn from(value: CurrentWinProbCall) -> Self {
821            Self::CurrentWinProb(value)
822        }
823    }
824    impl ::core::convert::From<OwnerCall> for HoprWinningProbabilityOracleCalls {
825        fn from(value: OwnerCall) -> Self {
826            Self::Owner(value)
827        }
828    }
829    impl ::core::convert::From<PendingOwnerCall> for HoprWinningProbabilityOracleCalls {
830        fn from(value: PendingOwnerCall) -> Self {
831            Self::PendingOwner(value)
832        }
833    }
834    impl ::core::convert::From<RenounceOwnershipCall>
835    for HoprWinningProbabilityOracleCalls {
836        fn from(value: RenounceOwnershipCall) -> Self {
837            Self::RenounceOwnership(value)
838        }
839    }
840    impl ::core::convert::From<SetWinProbCall> for HoprWinningProbabilityOracleCalls {
841        fn from(value: SetWinProbCall) -> Self {
842            Self::SetWinProb(value)
843        }
844    }
845    impl ::core::convert::From<TransferOwnershipCall>
846    for HoprWinningProbabilityOracleCalls {
847        fn from(value: TransferOwnershipCall) -> Self {
848            Self::TransferOwnership(value)
849        }
850    }
851    ///Container type for all return fields from the `currentWinProb` function with signature `currentWinProb()` and selector `0x168e9160`
852    #[derive(
853        Clone,
854        ::ethers::contract::EthAbiType,
855        ::ethers::contract::EthAbiCodec,
856        serde::Serialize,
857        serde::Deserialize,
858        Default,
859        Debug,
860        PartialEq,
861        Eq,
862        Hash
863    )]
864    pub struct CurrentWinProbReturn(pub u64);
865    ///Container type for all return fields from the `owner` function with signature `owner()` and selector `0x8da5cb5b`
866    #[derive(
867        Clone,
868        ::ethers::contract::EthAbiType,
869        ::ethers::contract::EthAbiCodec,
870        serde::Serialize,
871        serde::Deserialize,
872        Default,
873        Debug,
874        PartialEq,
875        Eq,
876        Hash
877    )]
878    pub struct OwnerReturn(pub ::ethers::core::types::Address);
879    ///Container type for all return fields from the `pendingOwner` function with signature `pendingOwner()` and selector `0xe30c3978`
880    #[derive(
881        Clone,
882        ::ethers::contract::EthAbiType,
883        ::ethers::contract::EthAbiCodec,
884        serde::Serialize,
885        serde::Deserialize,
886        Default,
887        Debug,
888        PartialEq,
889        Eq,
890        Hash
891    )]
892    pub struct PendingOwnerReturn(pub ::ethers::core::types::Address);
893}