1#[allow(
35 non_camel_case_types,
36 non_snake_case,
37 clippy::pub_underscore_fields,
38 clippy::style,
39 clippy::empty_structs_with_brackets
40)]
41pub mod HoprTicketPriceOracleEvents {
42 use super::*;
43 use alloy::sol_types as alloy_sol_types;
44 #[rustfmt::skip]
50 #[allow(clippy::all)]
51 pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
52 b"",
53 );
54 #[rustfmt::skip]
60 #[allow(clippy::all)]
61 pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
62 b"",
63 );
64 #[derive(serde::Serialize, serde::Deserialize)]
65 #[derive(Default, Debug, PartialEq, Eq, Hash)]
66 #[allow(
71 non_camel_case_types,
72 non_snake_case,
73 clippy::pub_underscore_fields,
74 clippy::style
75 )]
76 #[derive(Clone)]
77 pub struct TicketPriceUpdated {
78 #[allow(missing_docs)]
79 pub _0: alloy::sol_types::private::primitives::aliases::U256,
80 #[allow(missing_docs)]
81 pub _1: alloy::sol_types::private::primitives::aliases::U256,
82 }
83 #[allow(
84 non_camel_case_types,
85 non_snake_case,
86 clippy::pub_underscore_fields,
87 clippy::style
88 )]
89 const _: () = {
90 use alloy::sol_types as alloy_sol_types;
91 #[automatically_derived]
92 impl alloy_sol_types::SolEvent for TicketPriceUpdated {
93 type DataTuple<'a> = (
94 alloy::sol_types::sol_data::Uint<256>,
95 alloy::sol_types::sol_data::Uint<256>,
96 );
97 type DataToken<'a> = <Self::DataTuple<
98 'a,
99 > as alloy_sol_types::SolType>::Token<'a>;
100 type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,);
101 const SIGNATURE: &'static str = "TicketPriceUpdated(uint256,uint256)";
102 const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
103 212u8, 197u8, 224u8, 107u8, 26u8, 224u8, 151u8, 186u8, 2u8, 55u8, 38u8,
104 82u8, 167u8, 173u8, 170u8, 110u8, 74u8, 142u8, 0u8, 190u8, 82u8, 116u8,
105 151u8, 163u8, 173u8, 14u8, 188u8, 63u8, 118u8, 30u8, 243u8, 251u8,
106 ]);
107 const ANONYMOUS: bool = false;
108 #[allow(unused_variables)]
109 #[inline]
110 fn new(
111 topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
112 data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
113 ) -> Self {
114 Self { _0: data.0, _1: data.1 }
115 }
116 #[inline]
117 fn check_signature(
118 topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
119 ) -> alloy_sol_types::Result<()> {
120 if topics.0 != Self::SIGNATURE_HASH {
121 return Err(
122 alloy_sol_types::Error::invalid_event_signature_hash(
123 Self::SIGNATURE,
124 topics.0,
125 Self::SIGNATURE_HASH,
126 ),
127 );
128 }
129 Ok(())
130 }
131 #[inline]
132 fn tokenize_body(&self) -> Self::DataToken<'_> {
133 (
134 <alloy::sol_types::sol_data::Uint<
135 256,
136 > as alloy_sol_types::SolType>::tokenize(&self._0),
137 <alloy::sol_types::sol_data::Uint<
138 256,
139 > as alloy_sol_types::SolType>::tokenize(&self._1),
140 )
141 }
142 #[inline]
143 fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
144 (Self::SIGNATURE_HASH.into(),)
145 }
146 #[inline]
147 fn encode_topics_raw(
148 &self,
149 out: &mut [alloy_sol_types::abi::token::WordToken],
150 ) -> alloy_sol_types::Result<()> {
151 if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
152 return Err(alloy_sol_types::Error::Overrun);
153 }
154 out[0usize] = alloy_sol_types::abi::token::WordToken(
155 Self::SIGNATURE_HASH,
156 );
157 Ok(())
158 }
159 }
160 #[automatically_derived]
161 impl alloy_sol_types::private::IntoLogData for TicketPriceUpdated {
162 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
163 From::from(self)
164 }
165 fn into_log_data(self) -> alloy_sol_types::private::LogData {
166 From::from(&self)
167 }
168 }
169 #[automatically_derived]
170 impl From<&TicketPriceUpdated> for alloy_sol_types::private::LogData {
171 #[inline]
172 fn from(this: &TicketPriceUpdated) -> alloy_sol_types::private::LogData {
173 alloy_sol_types::SolEvent::encode_log_data(this)
174 }
175 }
176 };
177 #[derive(serde::Serialize, serde::Deserialize)]
179 #[derive(Debug, PartialEq, Eq, Hash)]
180 pub enum HoprTicketPriceOracleEventsEvents {
181 #[allow(missing_docs)]
182 TicketPriceUpdated(TicketPriceUpdated),
183 }
184 #[automatically_derived]
185 impl HoprTicketPriceOracleEventsEvents {
186 pub const SELECTORS: &'static [[u8; 32usize]] = &[
193 [
194 212u8, 197u8, 224u8, 107u8, 26u8, 224u8, 151u8, 186u8, 2u8, 55u8, 38u8,
195 82u8, 167u8, 173u8, 170u8, 110u8, 74u8, 142u8, 0u8, 190u8, 82u8, 116u8,
196 151u8, 163u8, 173u8, 14u8, 188u8, 63u8, 118u8, 30u8, 243u8, 251u8,
197 ],
198 ];
199 }
200 #[automatically_derived]
201 impl alloy_sol_types::SolEventInterface for HoprTicketPriceOracleEventsEvents {
202 const NAME: &'static str = "HoprTicketPriceOracleEventsEvents";
203 const COUNT: usize = 1usize;
204 fn decode_raw_log(
205 topics: &[alloy_sol_types::Word],
206 data: &[u8],
207 ) -> alloy_sol_types::Result<Self> {
208 match topics.first().copied() {
209 Some(
210 <TicketPriceUpdated as alloy_sol_types::SolEvent>::SIGNATURE_HASH,
211 ) => {
212 <TicketPriceUpdated as alloy_sol_types::SolEvent>::decode_raw_log(
213 topics,
214 data,
215 )
216 .map(Self::TicketPriceUpdated)
217 }
218 _ => {
219 alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
220 name: <Self as alloy_sol_types::SolEventInterface>::NAME,
221 log: alloy_sol_types::private::Box::new(
222 alloy_sol_types::private::LogData::new_unchecked(
223 topics.to_vec(),
224 data.to_vec().into(),
225 ),
226 ),
227 })
228 }
229 }
230 }
231 }
232 #[automatically_derived]
233 impl alloy_sol_types::private::IntoLogData for HoprTicketPriceOracleEventsEvents {
234 fn to_log_data(&self) -> alloy_sol_types::private::LogData {
235 match self {
236 Self::TicketPriceUpdated(inner) => {
237 alloy_sol_types::private::IntoLogData::to_log_data(inner)
238 }
239 }
240 }
241 fn into_log_data(self) -> alloy_sol_types::private::LogData {
242 match self {
243 Self::TicketPriceUpdated(inner) => {
244 alloy_sol_types::private::IntoLogData::into_log_data(inner)
245 }
246 }
247 }
248 }
249 use alloy::contract as alloy_contract;
250 #[inline]
254 pub const fn new<
255 P: alloy_contract::private::Provider<N>,
256 N: alloy_contract::private::Network,
257 >(
258 address: alloy_sol_types::private::Address,
259 provider: P,
260 ) -> HoprTicketPriceOracleEventsInstance<P, N> {
261 HoprTicketPriceOracleEventsInstance::<P, N>::new(address, provider)
262 }
263 #[inline]
269 pub fn deploy<
270 P: alloy_contract::private::Provider<N>,
271 N: alloy_contract::private::Network,
272 >(
273 provider: P,
274 ) -> impl ::core::future::Future<
275 Output = alloy_contract::Result<HoprTicketPriceOracleEventsInstance<P, N>>,
276 > {
277 HoprTicketPriceOracleEventsInstance::<P, N>::deploy(provider)
278 }
279 #[inline]
285 pub fn deploy_builder<
286 P: alloy_contract::private::Provider<N>,
287 N: alloy_contract::private::Network,
288 >(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
289 HoprTicketPriceOracleEventsInstance::<P, N>::deploy_builder(provider)
290 }
291 #[derive(Clone)]
303 pub struct HoprTicketPriceOracleEventsInstance<
304 P,
305 N = alloy_contract::private::Ethereum,
306 > {
307 address: alloy_sol_types::private::Address,
308 provider: P,
309 _network: ::core::marker::PhantomData<N>,
310 }
311 #[automatically_derived]
312 impl<P, N> ::core::fmt::Debug for HoprTicketPriceOracleEventsInstance<P, N> {
313 #[inline]
314 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
315 f.debug_tuple("HoprTicketPriceOracleEventsInstance")
316 .field(&self.address)
317 .finish()
318 }
319 }
320 #[automatically_derived]
322 impl<
323 P: alloy_contract::private::Provider<N>,
324 N: alloy_contract::private::Network,
325 > HoprTicketPriceOracleEventsInstance<P, N> {
326 #[inline]
330 pub const fn new(
331 address: alloy_sol_types::private::Address,
332 provider: P,
333 ) -> Self {
334 Self {
335 address,
336 provider,
337 _network: ::core::marker::PhantomData,
338 }
339 }
340 #[inline]
346 pub async fn deploy(
347 provider: P,
348 ) -> alloy_contract::Result<HoprTicketPriceOracleEventsInstance<P, N>> {
349 let call_builder = Self::deploy_builder(provider);
350 let contract_address = call_builder.deploy().await?;
351 Ok(Self::new(contract_address, call_builder.provider))
352 }
353 #[inline]
359 pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
360 alloy_contract::RawCallBuilder::new_raw_deploy(
361 provider,
362 ::core::clone::Clone::clone(&BYTECODE),
363 )
364 }
365 #[inline]
367 pub const fn address(&self) -> &alloy_sol_types::private::Address {
368 &self.address
369 }
370 #[inline]
372 pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
373 self.address = address;
374 }
375 pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
377 self.set_address(address);
378 self
379 }
380 #[inline]
382 pub const fn provider(&self) -> &P {
383 &self.provider
384 }
385 }
386 impl<P: ::core::clone::Clone, N> HoprTicketPriceOracleEventsInstance<&P, N> {
387 #[inline]
389 pub fn with_cloned_provider(self) -> HoprTicketPriceOracleEventsInstance<P, N> {
390 HoprTicketPriceOracleEventsInstance {
391 address: self.address,
392 provider: ::core::clone::Clone::clone(&self.provider),
393 _network: ::core::marker::PhantomData,
394 }
395 }
396 }
397 #[automatically_derived]
399 impl<
400 P: alloy_contract::private::Provider<N>,
401 N: alloy_contract::private::Network,
402 > HoprTicketPriceOracleEventsInstance<P, N> {
403 pub fn call_builder<C: alloy_sol_types::SolCall>(
408 &self,
409 call: &C,
410 ) -> alloy_contract::SolCallBuilder<&P, C, N> {
411 alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
412 }
413 }
414 #[automatically_derived]
416 impl<
417 P: alloy_contract::private::Provider<N>,
418 N: alloy_contract::private::Network,
419 > HoprTicketPriceOracleEventsInstance<P, N> {
420 pub fn event_filter<E: alloy_sol_types::SolEvent>(
425 &self,
426 ) -> alloy_contract::Event<&P, E, N> {
427 alloy_contract::Event::new_sol(&self.provider, &self.address)
428 }
429 pub fn TicketPriceUpdated_filter(
431 &self,
432 ) -> alloy_contract::Event<&P, TicketPriceUpdated, N> {
433 self.event_filter::<TicketPriceUpdated>()
434 }
435 }
436}