#![allow(clippy::all, warnings)]
#[doc = "\n\nGenerated by the following Solidity interface...\n```solidity\ninterface PauserRegistry {\n event PauserStatusChanged(address pauser, bool canPause);\n event UnpauserChanged(address previousUnpauser, address newUnpauser);\n\n function isPauser(address pauser) external view returns (bool);\n function unpauser() external view returns (address);\n}\n```\n\n...which was generated by the following JSON ABI:\n```json\n[\n {\n \"type\": \"function\",\n \"name\": \"isPauser\",\n \"inputs\": [\n {\n \"name\": \"pauser\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"unpauser\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"event\",\n \"name\": \"PauserStatusChanged\",\n \"inputs\": [\n {\n \"name\": \"pauser\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"canPause\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"UnpauserChanged\",\n \"inputs\": [\n {\n \"name\": \"previousUnpauser\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newUnpauser\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n }\n]\n```"]
#[allow(missing_docs)]
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
pub mod PauserRegistry {
use super::*;
use ::alloy_sol_types;
#[doc = r" The creation / init bytecode of the contract."]
#[doc = r""]
#[doc = r" ```text"]
#[doc = "0x"]
#[doc = r" ```"]
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(b"");
#[doc = r" The runtime bytecode of the contract, as deployed on the network."]
#[doc = r""]
#[doc = r" ```text"]
#[doc = "0x"]
#[doc = r" ```"]
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(b"");
#[allow(missing_docs)]
#[derive(Debug)]
#[doc = "Event with signature `PauserStatusChanged(address,bool)` and selector `0x65d3a1fd4c13f05cba164f80d03ce90fb4b5e21946bfc3ab7dbd434c2d0b9152`.\n```solidity\nevent PauserStatusChanged(address pauser, bool canPause);\n```"]
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
#[derive(Clone)]
pub struct PauserStatusChanged {
#[allow(missing_docs)]
pub pauser: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub canPause: bool,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use ::alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for PauserStatusChanged {
type DataTuple<'a> = (
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Bool,
);
type DataToken<'a> = <Self::DataTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,);
const SIGNATURE: &'static str = "PauserStatusChanged(address,bool)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 =
alloy_sol_types::private::B256::new([
101u8, 211u8, 161u8, 253u8, 76u8, 19u8, 240u8, 92u8, 186u8, 22u8, 79u8, 128u8,
208u8, 60u8, 233u8, 15u8, 180u8, 181u8, 226u8, 25u8, 70u8, 191u8, 195u8, 171u8,
125u8, 189u8, 67u8, 76u8, 45u8, 11u8, 145u8, 82u8,
]);
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 {
pauser: data.0,
canPause: data.1,
}
}
#[inline]
fn tokenize_body(&self) -> Self::DataToken<'_> {
(
<::alloy_sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.pauser,
),
<::alloy_sol_types::sol_data::Bool as alloy_sol_types::SolType>::tokenize(
&self.canPause,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(Self::SIGNATURE_HASH.into(),)
}
#[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);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for PauserStatusChanged {
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<&PauserStatusChanged> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &PauserStatusChanged) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[allow(missing_docs)]
#[derive(Debug)]
#[doc = "Event with signature `UnpauserChanged(address,address)` and selector `0x06b4167a2528887a1e97a366eefe8549bfbf1ea3e6ac81cb2564a934d20e8892`.\n```solidity\nevent UnpauserChanged(address previousUnpauser, address newUnpauser);\n```"]
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
#[derive(Clone)]
pub struct UnpauserChanged {
#[allow(missing_docs)]
pub previousUnpauser: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub newUnpauser: ::alloy_sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use ::alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for UnpauserChanged {
type DataTuple<'a> = (
::alloy_sol_types::sol_data::Address,
::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>,);
const SIGNATURE: &'static str = "UnpauserChanged(address,address)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 =
alloy_sol_types::private::B256::new([
6u8, 180u8, 22u8, 122u8, 37u8, 40u8, 136u8, 122u8, 30u8, 151u8, 163u8, 102u8,
238u8, 254u8, 133u8, 73u8, 191u8, 191u8, 30u8, 163u8, 230u8, 172u8, 129u8,
203u8, 37u8, 100u8, 169u8, 52u8, 210u8, 14u8, 136u8, 146u8,
]);
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 {
previousUnpauser: data.0,
newUnpauser: data.1,
}
}
#[inline]
fn tokenize_body(&self) -> Self::DataToken<'_> {
(
<::alloy_sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.previousUnpauser,
),
<::alloy_sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.newUnpauser,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(Self::SIGNATURE_HASH.into(),)
}
#[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);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for UnpauserChanged {
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<&UnpauserChanged> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &UnpauserChanged) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[allow(missing_docs)]
#[derive(Debug)]
#[doc = "Function with signature `isPauser(address)` and selector `0x46fbf68e`.\n```solidity\nfunction isPauser(address pauser) external view returns (bool);\n```"]
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct isPauserCall {
pub pauser: ::alloy_sol_types::private::Address,
}
#[allow(missing_docs)]
#[derive(Debug)]
#[doc = "Container type for the return parameters of the [`isPauser(address)`](isPauserCall) function."]
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct isPauserReturn {
pub _0: bool,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use ::alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (::alloy_sol_types::sol_data::Address,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (::alloy_sol_types::private::Address,);
#[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<isPauserCall> for UnderlyingRustTuple<'_> {
fn from(value: isPauserCall) -> Self {
(value.pauser,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for isPauserCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { pauser: tuple.0 }
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (::alloy_sol_types::sol_data::Bool,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (bool,);
#[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<isPauserReturn> for UnderlyingRustTuple<'_> {
fn from(value: isPauserReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for isPauserReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for isPauserCall {
type Parameters<'a> = (::alloy_sol_types::sol_data::Address,);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = isPauserReturn;
type ReturnTuple<'a> = (::alloy_sol_types::sol_data::Bool,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "isPauser(address)";
const SELECTOR: [u8; 4] = [70u8, 251u8, 246u8, 142u8];
#[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::Address as alloy_sol_types::SolType>::tokenize(
&self.pauser,
),
)
}
#[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)
}
}
};
#[allow(missing_docs)]
#[derive(Debug)]
#[doc = "Function with signature `unpauser()` and selector `0xeab66d7a`.\n```solidity\nfunction unpauser() external view returns (address);\n```"]
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct unpauserCall {}
#[allow(missing_docs)]
#[derive(Debug)]
#[doc = "Container type for the return parameters of the [`unpauser()`](unpauserCall) function."]
#[allow(non_camel_case_types, non_snake_case)]
#[derive(Clone)]
pub struct unpauserReturn {
pub _0: ::alloy_sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case, clippy::style)]
const _: () = {
use ::alloy_sol_types;
{
#[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<unpauserCall> for UnderlyingRustTuple<'_> {
fn from(value: unpauserCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for unpauserCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (::alloy_sol_types::sol_data::Address,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (::alloy_sol_types::private::Address,);
#[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<unpauserReturn> for UnderlyingRustTuple<'_> {
fn from(value: unpauserReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for unpauserReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for unpauserCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = unpauserReturn;
type ReturnTuple<'a> = (::alloy_sol_types::sol_data::Address,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "unpauser()";
const SELECTOR: [u8; 4] = [234u8, 182u8, 109u8, 122u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[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)
}
}
};
#[allow(missing_docs)]
#[derive(Debug)]
#[doc = "Container for all the [`PauserRegistry`](self) function calls."]
pub enum PauserRegistryCalls {
isPauser(isPauserCall),
unpauser(unpauserCall),
}
#[automatically_derived]
impl PauserRegistryCalls {
#[doc = r" All the selectors of this enum."]
#[doc = r""]
#[doc = r" Note that the selectors might not be in the same order as the variants."]
#[doc = r" No guarantees are made about the order of the selectors."]
#[doc = r""]
#[doc = r" Prefer using `SolInterface` methods instead."]
pub const SELECTORS: &'static [[u8; 4usize]] =
&[[70u8, 251u8, 246u8, 142u8], [234u8, 182u8, 109u8, 122u8]];
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for PauserRegistryCalls {
const NAME: &'static str = "PauserRegistryCalls";
const MIN_DATA_LENGTH: usize = 0usize;
const COUNT: usize = 2usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::isPauser(_) => <isPauserCall as alloy_sol_types::SolCall>::SELECTOR,
Self::unpauser(_) => <unpauserCall 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<PauserRegistryCalls>] = &[
{
fn isPauser(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<PauserRegistryCalls> {
<isPauserCall as alloy_sol_types::SolCall>::abi_decode_raw(data, validate)
.map(PauserRegistryCalls::isPauser)
}
isPauser
},
{
fn unpauser(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<PauserRegistryCalls> {
<unpauserCall as alloy_sol_types::SolCall>::abi_decode_raw(data, validate)
.map(PauserRegistryCalls::unpauser)
}
unpauser
},
];
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::isPauser(inner) => {
<isPauserCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::unpauser(inner) => {
<unpauserCall 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::isPauser(inner) => {
<isPauserCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::unpauser(inner) => {
<unpauserCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
}
}
}
#[allow(missing_docs)]
#[derive(Debug)]
#[doc = "Container for all the [`PauserRegistry`](self) events."]
pub enum PauserRegistryEvents {
PauserStatusChanged(PauserStatusChanged),
UnpauserChanged(UnpauserChanged),
}
#[automatically_derived]
impl PauserRegistryEvents {
#[doc = r" All the selectors of this enum."]
#[doc = r""]
#[doc = r" Note that the selectors might not be in the same order as the variants."]
#[doc = r" No guarantees are made about the order of the selectors."]
#[doc = r""]
#[doc = r" Prefer using `SolInterface` methods instead."]
pub const SELECTORS: &'static [[u8; 32usize]] = &[
[
6u8, 180u8, 22u8, 122u8, 37u8, 40u8, 136u8, 122u8, 30u8, 151u8, 163u8, 102u8,
238u8, 254u8, 133u8, 73u8, 191u8, 191u8, 30u8, 163u8, 230u8, 172u8, 129u8, 203u8,
37u8, 100u8, 169u8, 52u8, 210u8, 14u8, 136u8, 146u8,
],
[
101u8, 211u8, 161u8, 253u8, 76u8, 19u8, 240u8, 92u8, 186u8, 22u8, 79u8, 128u8,
208u8, 60u8, 233u8, 15u8, 180u8, 181u8, 226u8, 25u8, 70u8, 191u8, 195u8, 171u8,
125u8, 189u8, 67u8, 76u8, 45u8, 11u8, 145u8, 82u8,
],
];
}
#[automatically_derived]
impl alloy_sol_types::SolEventInterface for PauserRegistryEvents {
const NAME: &'static str = "PauserRegistryEvents";
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(<PauserStatusChanged as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<PauserStatusChanged as alloy_sol_types::SolEvent>::decode_raw_log(
topics, data, validate,
)
.map(Self::PauserStatusChanged)
}
Some(<UnpauserChanged as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<UnpauserChanged as alloy_sol_types::SolEvent>::decode_raw_log(
topics, data, validate,
)
.map(Self::UnpauserChanged)
}
_ => 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 PauserRegistryEvents {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::PauserStatusChanged(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::UnpauserChanged(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::PauserStatusChanged(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::UnpauserChanged(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
use ::alloy_contract;
#[doc = "Creates a new wrapper around an on-chain [`PauserRegistry`](self) contract instance.\n\nSee the [wrapper's documentation](`PauserRegistryInstance`) for more details."]
#[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,
) -> PauserRegistryInstance<T, P, N> {
PauserRegistryInstance::<T, P, N>::new(address, provider)
}
#[doc = "Deploys this contract using the given `provider` and constructor arguments, if any.\n\nReturns a new instance of the contract, if the deployment was successful.\n\nFor more fine-grained control over the deployment process, use [`deploy_builder`] instead."]
#[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<PauserRegistryInstance<T, P, N>>>
{
PauserRegistryInstance::<T, P, N>::deploy(provider)
}
#[doc = "Creates a `RawCallBuilder` for deploying this contract using the given `provider`\nand constructor arguments, if any.\n\nThis is a simple wrapper around creating a `RawCallBuilder` with the data set to\nthe bytecode concatenated with the constructor's ABI-encoded arguments."]
#[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> {
PauserRegistryInstance::<T, P, N>::deploy_builder(provider)
}
#[doc = "A [`PauserRegistry`](self) instance.\n\nContains type-safe methods for interacting with an on-chain instance of the\n[`PauserRegistry`](self) contract located at a given `address`, using a given\nprovider `P`.\n\nIf the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)\ndocumentation on how to provide it), the `deploy` and `deploy_builder` methods can\nbe used to deploy a new instance of the contract.\n\nSee the [module-level documentation](self) for all the available methods."]
#[derive(Clone)]
pub struct PauserRegistryInstance<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 PauserRegistryInstance<T, P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("PauserRegistryInstance")
.field(&self.address)
.finish()
}
}
#[doc = r" Instantiation and getters/setters."]
#[automatically_derived]
impl<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
> PauserRegistryInstance<T, P, N>
{
#[doc = "Creates a new wrapper around an on-chain [`PauserRegistry`](self) contract instance.\n\nSee the [wrapper's documentation](`PauserRegistryInstance`) for more details."]
#[inline]
pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self {
Self {
address,
provider,
_network_transport: ::core::marker::PhantomData,
}
}
#[doc = "Deploys this contract using the given `provider` and constructor arguments, if any.\n\nReturns a new instance of the contract, if the deployment was successful.\n\nFor more fine-grained control over the deployment process, use [`deploy_builder`] instead."]
#[inline]
pub async fn deploy(
provider: P,
) -> alloy_contract::Result<PauserRegistryInstance<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))
}
#[doc = "Creates a `RawCallBuilder` for deploying this contract using the given `provider`\nand constructor arguments, if any.\n\nThis is a simple wrapper around creating a `RawCallBuilder` with the data set to\nthe bytecode concatenated with the constructor's ABI-encoded arguments."]
#[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),
)
}
#[doc = r" Returns a reference to the address."]
#[inline]
pub const fn address(&self) -> &alloy_sol_types::private::Address {
&self.address
}
#[doc = r" Sets the address."]
#[inline]
pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
self.address = address;
}
#[doc = r" Sets the address and returns `self`."]
pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
self.set_address(address);
self
}
#[doc = r" Returns a reference to the provider."]
#[inline]
pub const fn provider(&self) -> &P {
&self.provider
}
}
impl<T, P: ::core::clone::Clone, N> PauserRegistryInstance<T, &P, N> {
#[doc = r" Clones the provider and returns a new instance with the cloned provider."]
#[inline]
pub fn with_cloned_provider(self) -> PauserRegistryInstance<T, P, N> {
PauserRegistryInstance {
address: self.address,
provider: ::core::clone::Clone::clone(&self.provider),
_network_transport: ::core::marker::PhantomData,
}
}
}
#[doc = r" Function calls."]
#[automatically_derived]
impl<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
> PauserRegistryInstance<T, P, N>
{
#[doc = r" Creates a new call builder using this contract instance's provider and address."]
#[doc = r""]
#[doc = r" Note that the call can be any function call, not just those defined in this"]
#[doc = r" contract. Prefer using the other methods for building type-safe contract calls."]
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)
}
#[doc = "Creates a new call builder for the [`isPauser`] function."]
pub fn isPauser(
&self,
pauser: ::alloy_sol_types::private::Address,
) -> alloy_contract::SolCallBuilder<T, &P, isPauserCall, N> {
self.call_builder(&isPauserCall { pauser })
}
#[doc = "Creates a new call builder for the [`unpauser`] function."]
pub fn unpauser(&self) -> alloy_contract::SolCallBuilder<T, &P, unpauserCall, N> {
self.call_builder(&unpauserCall {})
}
}
#[doc = r" Event filters."]
#[automatically_derived]
impl<
T: alloy_contract::private::Transport + ::core::clone::Clone,
P: alloy_contract::private::Provider<T, N>,
N: alloy_contract::private::Network,
> PauserRegistryInstance<T, P, N>
{
#[doc = r" Creates a new event filter using this contract instance's provider and address."]
#[doc = r""]
#[doc = r" Note that the type can be any event, not just those defined in this contract."]
#[doc = r" Prefer using the other methods for building type-safe event filters."]
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)
}
#[doc = "Creates a new event filter for the [`PauserStatusChanged`] event."]
pub fn PauserStatusChanged_filter(
&self,
) -> alloy_contract::Event<T, &P, PauserStatusChanged, N> {
self.event_filter::<PauserStatusChanged>()
}
#[doc = "Creates a new event filter for the [`UnpauserChanged`] event."]
pub fn UnpauserChanged_filter(&self) -> alloy_contract::Event<T, &P, UnpauserChanged, N> {
self.event_filter::<UnpauserChanged>()
}
}
}