#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style,
clippy::empty_structs_with_brackets
)]
pub mod EIP712Upgradeable {
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"",
);
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct EIP712DomainChanged;
#[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 EIP712DomainChanged {
type DataTuple<'a> = ();
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 = "EIP712DomainChanged()";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
10u8, 99u8, 135u8, 201u8, 234u8, 54u8, 40u8, 184u8, 138u8, 99u8, 59u8,
180u8, 243u8, 177u8, 81u8, 119u8, 15u8, 112u8, 8u8, 81u8, 23u8, 161u8,
95u8, 155u8, 243u8, 120u8, 124u8, 218u8, 83u8, 241u8, 61u8, 49u8,
]);
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 {}
}
#[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<'_> {
()
}
#[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 EIP712DomainChanged {
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<&EIP712DomainChanged> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &EIP712DomainChanged) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct Initialized {
#[allow(missing_docs)]
pub version: u8,
}
#[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 Initialized {
type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,);
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 = "Initialized(uint8)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
127u8, 38u8, 184u8, 63u8, 249u8, 110u8, 31u8, 43u8, 106u8, 104u8, 47u8,
19u8, 56u8, 82u8, 246u8, 121u8, 138u8, 9u8, 196u8, 101u8, 218u8, 149u8,
146u8, 20u8, 96u8, 206u8, 251u8, 56u8, 71u8, 64u8, 36u8, 152u8,
]);
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 { version: 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::Uint<
8,
> as alloy_sol_types::SolType>::tokenize(&self.version),
)
}
#[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 Initialized {
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<&Initialized> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &Initialized) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct eip712DomainCall;
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct eip712DomainReturn {
#[allow(missing_docs)]
pub fields: alloy::sol_types::private::FixedBytes<1>,
#[allow(missing_docs)]
pub name: alloy::sol_types::private::String,
#[allow(missing_docs)]
pub version: alloy::sol_types::private::String,
#[allow(missing_docs)]
pub chainId: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub verifyingContract: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub salt: alloy::sol_types::private::FixedBytes<32>,
#[allow(missing_docs)]
pub extensions: alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
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<eip712DomainCall> for UnderlyingRustTuple<'_> {
fn from(value: eip712DomainCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for eip712DomainCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::FixedBytes<1>,
alloy::sol_types::sol_data::String,
alloy::sol_types::sol_data::String,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Uint<256>>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::FixedBytes<1>,
alloy::sol_types::private::String,
alloy::sol_types::private::String,
alloy::sol_types::private::primitives::aliases::U256,
alloy::sol_types::private::Address,
alloy::sol_types::private::FixedBytes<32>,
alloy::sol_types::private::Vec<
alloy::sol_types::private::primitives::aliases::U256,
>,
);
#[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<eip712DomainReturn> for UnderlyingRustTuple<'_> {
fn from(value: eip712DomainReturn) -> Self {
(
value.fields,
value.name,
value.version,
value.chainId,
value.verifyingContract,
value.salt,
value.extensions,
)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for eip712DomainReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
fields: tuple.0,
name: tuple.1,
version: tuple.2,
chainId: tuple.3,
verifyingContract: tuple.4,
salt: tuple.5,
extensions: tuple.6,
}
}
}
}
impl eip712DomainReturn {
fn _tokenize(
&self,
) -> <eip712DomainCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::FixedBytes<
1,
> as alloy_sol_types::SolType>::tokenize(&self.fields),
<alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(
&self.name,
),
<alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(
&self.version,
),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.chainId),
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.verifyingContract,
),
<alloy::sol_types::sol_data::FixedBytes<
32,
> as alloy_sol_types::SolType>::tokenize(&self.salt),
<alloy::sol_types::sol_data::Array<
alloy::sol_types::sol_data::Uint<256>,
> as alloy_sol_types::SolType>::tokenize(&self.extensions),
)
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for eip712DomainCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = eip712DomainReturn;
type ReturnTuple<'a> = (
alloy::sol_types::sol_data::FixedBytes<1>,
alloy::sol_types::sol_data::String,
alloy::sol_types::sol_data::String,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Array<alloy::sol_types::sol_data::Uint<256>>,
);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "eip712Domain()";
const SELECTOR: [u8; 4] = [132u8, 176u8, 25u8, 110u8];
#[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 tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
eip712DomainReturn::_tokenize(ret)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(Into::into)
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Into::into)
}
}
};
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive()]
pub enum EIP712UpgradeableCalls {
#[allow(missing_docs)]
eip712Domain(eip712DomainCall),
}
impl EIP712UpgradeableCalls {
pub const SELECTORS: &'static [[u8; 4usize]] = &[[132u8, 176u8, 25u8, 110u8]];
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(eip712Domain),
];
pub const SIGNATURES: &'static [&'static str] = &[
<eip712DomainCall as alloy_sol_types::SolCall>::SIGNATURE,
];
#[inline]
pub fn signature_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
#[inline]
pub fn name_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for EIP712UpgradeableCalls {
const NAME: &'static str = "EIP712UpgradeableCalls";
const MIN_DATA_LENGTH: usize = 0usize;
const COUNT: usize = 1usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::eip712Domain(_) => {
<eip712DomainCall 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(non_snake_case)]
fn abi_decode_raw(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<EIP712UpgradeableCalls>] = &[
{
fn eip712Domain(
data: &[u8],
) -> alloy_sol_types::Result<EIP712UpgradeableCalls> {
<eip712DomainCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(EIP712UpgradeableCalls::eip712Domain)
}
eip712Domain
},
];
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,
),
);
};
DECODE_SHIMS[idx](data)
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw_validate(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_VALIDATE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<EIP712UpgradeableCalls>] = &[
{
fn eip712Domain(
data: &[u8],
) -> alloy_sol_types::Result<EIP712UpgradeableCalls> {
<eip712DomainCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(EIP712UpgradeableCalls::eip712Domain)
}
eip712Domain
},
];
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,
),
);
};
DECODE_VALIDATE_SHIMS[idx](data)
}
#[inline]
fn abi_encoded_size(&self) -> usize {
match self {
Self::eip712Domain(inner) => {
<eip712DomainCall 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::eip712Domain(inner) => {
<eip712DomainCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
}
}
}
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Debug, PartialEq, Eq, Hash)]
pub enum EIP712UpgradeableEvents {
#[allow(missing_docs)]
EIP712DomainChanged(EIP712DomainChanged),
#[allow(missing_docs)]
Initialized(Initialized),
}
impl EIP712UpgradeableEvents {
pub const SELECTORS: &'static [[u8; 32usize]] = &[
[
10u8, 99u8, 135u8, 201u8, 234u8, 54u8, 40u8, 184u8, 138u8, 99u8, 59u8,
180u8, 243u8, 177u8, 81u8, 119u8, 15u8, 112u8, 8u8, 81u8, 23u8, 161u8,
95u8, 155u8, 243u8, 120u8, 124u8, 218u8, 83u8, 241u8, 61u8, 49u8,
],
[
127u8, 38u8, 184u8, 63u8, 249u8, 110u8, 31u8, 43u8, 106u8, 104u8, 47u8,
19u8, 56u8, 82u8, 246u8, 121u8, 138u8, 9u8, 196u8, 101u8, 218u8, 149u8,
146u8, 20u8, 96u8, 206u8, 251u8, 56u8, 71u8, 64u8, 36u8, 152u8,
],
];
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(EIP712DomainChanged),
::core::stringify!(Initialized),
];
pub const SIGNATURES: &'static [&'static str] = &[
<EIP712DomainChanged as alloy_sol_types::SolEvent>::SIGNATURE,
<Initialized as alloy_sol_types::SolEvent>::SIGNATURE,
];
#[inline]
pub fn signature_by_selector(
selector: [u8; 32usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
#[inline]
pub fn name_by_selector(
selector: [u8; 32usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolEventInterface for EIP712UpgradeableEvents {
const NAME: &'static str = "EIP712UpgradeableEvents";
const COUNT: usize = 2usize;
fn decode_raw_log(
topics: &[alloy_sol_types::Word],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
match topics.first().copied() {
Some(
<EIP712DomainChanged as alloy_sol_types::SolEvent>::SIGNATURE_HASH,
) => {
<EIP712DomainChanged as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
)
.map(Self::EIP712DomainChanged)
}
Some(<Initialized as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<Initialized as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
)
.map(Self::Initialized)
}
_ => {
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 EIP712UpgradeableEvents {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::EIP712DomainChanged(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::Initialized(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::EIP712DomainChanged(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::Initialized(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
use alloy::contract as alloy_contract;
#[inline]
pub const fn new<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(
address: alloy_sol_types::private::Address,
__provider: P,
) -> EIP712UpgradeableInstance<P, N> {
EIP712UpgradeableInstance::<P, N>::new(address, __provider)
}
#[inline]
pub fn deploy<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(
__provider: P,
) -> impl ::core::future::Future<
Output = alloy_contract::Result<EIP712UpgradeableInstance<P, N>>,
> {
EIP712UpgradeableInstance::<P, N>::deploy(__provider)
}
#[inline]
pub fn deploy_builder<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
EIP712UpgradeableInstance::<P, N>::deploy_builder(__provider)
}
#[derive(Clone)]
pub struct EIP712UpgradeableInstance<P, N = alloy_contract::private::Ethereum> {
address: alloy_sol_types::private::Address,
provider: P,
_network: ::core::marker::PhantomData<N>,
}
#[automatically_derived]
impl<P, N> ::core::fmt::Debug for EIP712UpgradeableInstance<P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("EIP712UpgradeableInstance").field(&self.address).finish()
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> EIP712UpgradeableInstance<P, N> {
#[inline]
pub const fn new(
address: alloy_sol_types::private::Address,
__provider: P,
) -> Self {
Self {
address,
provider: __provider,
_network: ::core::marker::PhantomData,
}
}
#[inline]
pub async fn deploy(
__provider: P,
) -> alloy_contract::Result<EIP712UpgradeableInstance<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<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<P: ::core::clone::Clone, N> EIP712UpgradeableInstance<&P, N> {
#[inline]
pub fn with_cloned_provider(self) -> EIP712UpgradeableInstance<P, N> {
EIP712UpgradeableInstance {
address: self.address,
provider: ::core::clone::Clone::clone(&self.provider),
_network: ::core::marker::PhantomData,
}
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> EIP712UpgradeableInstance<P, N> {
pub fn call_builder<C: alloy_sol_types::SolCall>(
&self,
call: &C,
) -> alloy_contract::SolCallBuilder<&P, C, N> {
alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
}
pub fn eip712Domain(
&self,
) -> alloy_contract::SolCallBuilder<&P, eip712DomainCall, N> {
self.call_builder(&eip712DomainCall)
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> EIP712UpgradeableInstance<P, N> {
pub fn event_filter<E: alloy_sol_types::SolEvent>(
&self,
) -> alloy_contract::Event<&P, E, N> {
alloy_contract::Event::new_sol(&self.provider, &self.address)
}
pub fn EIP712DomainChanged_filter(
&self,
) -> alloy_contract::Event<&P, EIP712DomainChanged, N> {
self.event_filter::<EIP712DomainChanged>()
}
pub fn Initialized_filter(&self) -> alloy_contract::Event<&P, Initialized, N> {
self.event_filter::<Initialized>()
}
}
}