#[allow(non_camel_case_types, non_snake_case, clippy::style)]
pub mod ISocketUpdater {
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::style)]
#[derive(Clone)]
pub struct OperatorSocketUpdate {
#[allow(missing_docs)]
pub operatorId: alloy::sol_types::private::FixedBytes<32>,
#[allow(missing_docs)]
pub socket: alloy::sol_types::private::String,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for OperatorSocketUpdate {
type DataTuple<'a> = (alloy::sol_types::sol_data::String,);
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::FixedBytes<32>,
);
const SIGNATURE: &'static str = "OperatorSocketUpdate(bytes32,string)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 =
alloy_sol_types::private::B256::new([
236u8, 41u8, 99u8, 171u8, 33u8, 193u8, 229u8, 14u8, 30u8, 88u8, 42u8, 165u8,
66u8, 175u8, 46u8, 75u8, 247u8, 191u8, 56u8, 230u8, 225u8, 64u8, 60u8, 39u8,
180u8, 46u8, 28u8, 93u8, 110u8, 98u8, 30u8, 170u8,
]);
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 {
operatorId: topics.1,
socket: 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::String as alloy_sol_types::SolType>::tokenize(
&self.socket,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(Self::SIGNATURE_HASH.into(), self.operatorId.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::FixedBytes<
32,
> as alloy_sol_types::EventTopic>::encode_topic(&self.operatorId);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for OperatorSocketUpdate {
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<&OperatorSocketUpdate> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &OperatorSocketUpdate) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct updateSocketCall {
pub socket: alloy::sol_types::private::String,
}
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct updateSocketReturn {}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<updateSocketCall> for UnderlyingRustTuple<'_> {
fn from(value: updateSocketCall) -> Self {
(value.socket,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for updateSocketCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { socket: tuple.0 }
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<updateSocketReturn> for UnderlyingRustTuple<'_> {
fn from(value: updateSocketReturn) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for updateSocketReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for updateSocketCall {
type Parameters<'a> = (alloy::sol_types::sol_data::String,);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = updateSocketReturn;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "updateSocket(string)";
const SELECTOR: [u8; 4] = [12u8, 244u8, 183u8, 103u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(
&self.socket,
),
)
}
#[inline]
fn abi_decode_returns(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(
data, validate,
)
.map(Into::into)
}
}
};
pub enum ISocketUpdaterCalls {
updateSocket(updateSocketCall),
}
#[automatically_derived]
impl ISocketUpdaterCalls {
pub const SELECTORS: &'static [[u8; 4usize]] = &[[12u8, 244u8, 183u8, 103u8]];
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for ISocketUpdaterCalls {
const NAME: &'static str = "ISocketUpdaterCalls";
const MIN_DATA_LENGTH: usize = 64usize;
const COUNT: usize = 1usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::updateSocket(_) => <updateSocketCall as alloy_sol_types::SolCall>::SELECTOR,
}
}
#[inline]
fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
Self::SELECTORS.get(i).copied()
}
#[inline]
fn valid_selector(selector: [u8; 4]) -> bool {
Self::SELECTORS.binary_search(&selector).is_ok()
}
#[inline]
#[allow(unsafe_code, non_snake_case)]
fn abi_decode_raw(
selector: [u8; 4],
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(
&[u8],
bool,
)
-> alloy_sol_types::Result<ISocketUpdaterCalls>] = &[{
fn updateSocket(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<ISocketUpdaterCalls> {
<updateSocketCall as alloy_sol_types::SolCall>::abi_decode_raw(data, validate)
.map(ISocketUpdaterCalls::updateSocket)
}
updateSocket
}];
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
return Err(alloy_sol_types::Error::unknown_selector(
<Self as alloy_sol_types::SolInterface>::NAME,
selector,
));
};
(unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate)
}
#[inline]
fn abi_encoded_size(&self) -> usize {
match self {
Self::updateSocket(inner) => {
<updateSocketCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
}
}
#[inline]
fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
match self {
Self::updateSocket(inner) => {
<updateSocketCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
}
}
}
pub enum ISocketUpdaterEvents {
OperatorSocketUpdate(OperatorSocketUpdate),
}
#[automatically_derived]
impl ISocketUpdaterEvents {
pub const SELECTORS: &'static [[u8; 32usize]] = &[[
236u8, 41u8, 99u8, 171u8, 33u8, 193u8, 229u8, 14u8, 30u8, 88u8, 42u8, 165u8, 66u8,
175u8, 46u8, 75u8, 247u8, 191u8, 56u8, 230u8, 225u8, 64u8, 60u8, 39u8, 180u8, 46u8,
28u8, 93u8, 110u8, 98u8, 30u8, 170u8,
]];
}
#[automatically_derived]
impl alloy_sol_types::SolEventInterface for ISocketUpdaterEvents {
const NAME: &'static str = "ISocketUpdaterEvents";
const COUNT: usize = 1usize;
fn decode_raw_log(
topics: &[alloy_sol_types::Word],
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self> {
match topics.first().copied() {
Some(<OperatorSocketUpdate as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<OperatorSocketUpdate as alloy_sol_types::SolEvent>::decode_raw_log(
topics, data, validate,
)
.map(Self::OperatorSocketUpdate)
}
_ => 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 ISocketUpdaterEvents {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::OperatorSocketUpdate(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::OperatorSocketUpdate(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
use alloy::contract as alloy_contract;
#[inline]
pub const fn new<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
>(
address: alloy_sol_types::private::Address,
provider: P,
) -> ISocketUpdaterInstance<T, P, N> {
ISocketUpdaterInstance::<T, P, N>::new(address, provider)
}
#[inline]
pub fn deploy<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
>(
provider: P,
) -> impl ::core::future::Future<Output = alloy_contract::Result<ISocketUpdaterInstance<T, P, N>>>
{
ISocketUpdaterInstance::<T, P, N>::deploy(provider)
}
#[inline]
pub fn deploy_builder<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
>(
provider: P,
) -> alloy_contract::RawCallBuilder<T, P, N> {
ISocketUpdaterInstance::<T, P, N>::deploy_builder(provider)
}
#[derive(Clone)]
pub struct ISocketUpdaterInstance<T, P, N = alloy_contract::private::Ethereum> {
address: alloy_sol_types::private::Address,
provider: P,
_network_transport: ::core::marker::PhantomData<(N, T)>,
}
#[automatically_derived]
impl<T, P, N> ::core::fmt::Debug for ISocketUpdaterInstance<T, P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ISocketUpdaterInstance")
.field(&self.address)
.finish()
}
}
#[automatically_derived]
impl<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
> ISocketUpdaterInstance<T, P, N>
{
#[inline]
pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self {
Self {
address,
provider,
_network_transport: ::core::marker::PhantomData,
}
}
#[inline]
pub async fn deploy(
provider: P,
) -> alloy_contract::Result<ISocketUpdaterInstance<T, P, N>> {
let call_builder = Self::deploy_builder(provider);
let contract_address = call_builder.deploy().await?;
Ok(Self::new(contract_address, call_builder.provider))
}
#[inline]
pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<T, P, N> {
alloy_contract::RawCallBuilder::new_raw_deploy(
provider,
::core::clone::Clone::clone(&BYTECODE),
)
}
#[inline]
pub const fn address(&self) -> &alloy_sol_types::private::Address {
&self.address
}
#[inline]
pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
self.address = address;
}
pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
self.set_address(address);
self
}
#[inline]
pub const fn provider(&self) -> &P {
&self.provider
}
}
impl<T, P: ::core::clone::Clone, N> ISocketUpdaterInstance<T, &P, N> {
#[inline]
pub fn with_cloned_provider(self) -> ISocketUpdaterInstance<T, P, N> {
ISocketUpdaterInstance {
address: self.address,
provider: ::core::clone::Clone::clone(&self.provider),
_network_transport: ::core::marker::PhantomData,
}
}
}
#[automatically_derived]
impl<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
> ISocketUpdaterInstance<T, P, N>
{
pub fn call_builder<C: alloy_sol_types::SolCall>(
&self,
call: &C,
) -> alloy_contract::SolCallBuilder<T, &P, C, N> {
alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
}
pub fn updateSocket(
&self,
socket: alloy::sol_types::private::String,
) -> alloy_contract::SolCallBuilder<T, &P, updateSocketCall, N> {
self.call_builder(&updateSocketCall { socket })
}
}
#[automatically_derived]
impl<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
> ISocketUpdaterInstance<T, P, N>
{
pub fn event_filter<E: alloy_sol_types::SolEvent>(
&self,
) -> alloy_contract::Event<T, &P, E, N> {
alloy_contract::Event::new_sol(&self.provider, &self.address)
}
pub fn OperatorSocketUpdate_filter(
&self,
) -> alloy_contract::Event<T, &P, OperatorSocketUpdate, N> {
self.event_filter::<OperatorSocketUpdate>()
}
}
}