#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style,
clippy::empty_structs_with_brackets
)]
pub mod IMachineFacade {
use super::*;
use ::alloy_sol_types as alloy_sol_types;
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct MachineCreated {
#[allow(missing_docs)]
pub kind: u8,
#[allow(missing_docs)]
pub owner: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub metadata: ::alloy_sol_types::private::Bytes,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use ::alloy_sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for MachineCreated {
type DataTuple<'a> = (::alloy_sol_types::sol_data::Bytes,);
type DataToken<'a> = <Self::DataTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (
alloy_sol_types::sol_data::FixedBytes<32>,
::alloy_sol_types::sol_data::Uint<8>,
::alloy_sol_types::sol_data::Address,
);
const SIGNATURE: &'static str = "MachineCreated(uint8,address,bytes)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
120u8,
52u8,
73u8,
115u8,
87u8,
56u8,
153u8,
229u8,
218u8,
152u8,
132u8,
150u8,
171u8,
151u8,
71u8,
107u8,
55u8,
2u8,
236u8,
252u8,
163u8,
113u8,
198u8,
178u8,
90u8,
97u8,
70u8,
15u8,
152u8,
157u8,
64u8,
209u8,
]);
const ANONYMOUS: bool = false;
#[allow(unused_variables)]
#[inline]
fn new(
topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
) -> Self {
Self {
kind: topics.1,
owner: topics.2,
metadata: data.0,
}
}
#[inline]
fn check_signature(
topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
) -> alloy_sol_types::Result<()> {
if topics.0 != Self::SIGNATURE_HASH {
return Err(
alloy_sol_types::Error::invalid_event_signature_hash(
Self::SIGNATURE,
topics.0,
Self::SIGNATURE_HASH,
),
);
}
Ok(())
}
#[inline]
fn tokenize_body(&self) -> Self::DataToken<'_> {
(
<::alloy_sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
&self.metadata,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(Self::SIGNATURE_HASH.into(), self.kind.clone(), self.owner.clone())
}
#[inline]
fn encode_topics_raw(
&self,
out: &mut [alloy_sol_types::abi::token::WordToken],
) -> alloy_sol_types::Result<()> {
if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
return Err(alloy_sol_types::Error::Overrun);
}
out[0usize] = alloy_sol_types::abi::token::WordToken(
Self::SIGNATURE_HASH,
);
out[1usize] = <::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::EventTopic>::encode_topic(&self.kind);
out[2usize] = <::alloy_sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.owner,
);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for MachineCreated {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
From::from(self)
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
From::from(&self)
}
}
#[automatically_derived]
impl From<&MachineCreated> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &MachineCreated) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct MachineInitialized {
#[allow(missing_docs)]
pub kind: u8,
#[allow(missing_docs)]
pub machineAddress: ::alloy_sol_types::private::Address,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use ::alloy_sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for MachineInitialized {
type DataTuple<'a> = (::alloy_sol_types::sol_data::Address,);
type DataToken<'a> = <Self::DataTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (
alloy_sol_types::sol_data::FixedBytes<32>,
::alloy_sol_types::sol_data::Uint<8>,
);
const SIGNATURE: &'static str = "MachineInitialized(uint8,address)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
143u8,
114u8,
82u8,
100u8,
35u8,
115u8,
213u8,
240u8,
184u8,
154u8,
12u8,
92u8,
217u8,
205u8,
36u8,
46u8,
92u8,
213u8,
187u8,
26u8,
54u8,
174u8,
198u8,
35u8,
117u8,
110u8,
79u8,
82u8,
168u8,
193u8,
234u8,
110u8,
]);
const ANONYMOUS: bool = false;
#[allow(unused_variables)]
#[inline]
fn new(
topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
) -> Self {
Self {
kind: topics.1,
machineAddress: data.0,
}
}
#[inline]
fn check_signature(
topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
) -> alloy_sol_types::Result<()> {
if topics.0 != Self::SIGNATURE_HASH {
return Err(
alloy_sol_types::Error::invalid_event_signature_hash(
Self::SIGNATURE,
topics.0,
Self::SIGNATURE_HASH,
),
);
}
Ok(())
}
#[inline]
fn tokenize_body(&self) -> Self::DataToken<'_> {
(
<::alloy_sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.machineAddress,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(Self::SIGNATURE_HASH.into(), self.kind.clone())
}
#[inline]
fn encode_topics_raw(
&self,
out: &mut [alloy_sol_types::abi::token::WordToken],
) -> alloy_sol_types::Result<()> {
if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
return Err(alloy_sol_types::Error::Overrun);
}
out[0usize] = alloy_sol_types::abi::token::WordToken(
Self::SIGNATURE_HASH,
);
out[1usize] = <::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::EventTopic>::encode_topic(&self.kind);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for MachineInitialized {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
From::from(self)
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
From::from(&self)
}
}
#[automatically_derived]
impl From<&MachineInitialized> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &MachineInitialized) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
pub enum IMachineFacadeEvents {
#[allow(missing_docs)]
MachineCreated(MachineCreated),
#[allow(missing_docs)]
MachineInitialized(MachineInitialized),
}
#[automatically_derived]
impl IMachineFacadeEvents {
pub const SELECTORS: &'static [[u8; 32usize]] = &[
[
120u8,
52u8,
73u8,
115u8,
87u8,
56u8,
153u8,
229u8,
218u8,
152u8,
132u8,
150u8,
171u8,
151u8,
71u8,
107u8,
55u8,
2u8,
236u8,
252u8,
163u8,
113u8,
198u8,
178u8,
90u8,
97u8,
70u8,
15u8,
152u8,
157u8,
64u8,
209u8,
],
[
143u8,
114u8,
82u8,
100u8,
35u8,
115u8,
213u8,
240u8,
184u8,
154u8,
12u8,
92u8,
217u8,
205u8,
36u8,
46u8,
92u8,
213u8,
187u8,
26u8,
54u8,
174u8,
198u8,
35u8,
117u8,
110u8,
79u8,
82u8,
168u8,
193u8,
234u8,
110u8,
],
];
}
#[automatically_derived]
impl alloy_sol_types::SolEventInterface for IMachineFacadeEvents {
const NAME: &'static str = "IMachineFacadeEvents";
const COUNT: usize = 2usize;
fn decode_raw_log(
topics: &[alloy_sol_types::Word],
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self> {
match topics.first().copied() {
Some(<MachineCreated as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<MachineCreated as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
validate,
)
.map(Self::MachineCreated)
}
Some(
<MachineInitialized as alloy_sol_types::SolEvent>::SIGNATURE_HASH,
) => {
<MachineInitialized as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
validate,
)
.map(Self::MachineInitialized)
}
_ => {
alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
name: <Self as alloy_sol_types::SolEventInterface>::NAME,
log: alloy_sol_types::private::Box::new(
alloy_sol_types::private::LogData::new_unchecked(
topics.to_vec(),
data.to_vec().into(),
),
),
})
}
}
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for IMachineFacadeEvents {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::MachineCreated(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::MachineInitialized(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::MachineCreated(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::MachineInitialized(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
}