pub use ierc6372::*;
#[allow(
clippy::enum_variant_names,
clippy::too_many_arguments,
clippy::upper_case_acronyms,
clippy::type_complexity,
dead_code,
non_camel_case_types,
)]
pub mod ierc6372 {
#[rustfmt::skip]
const __ABI: &str = "[{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"CLOCK_MODE\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"clock\",\"outputs\":[{\"internalType\":\"uint48\",\"name\":\"\",\"type\":\"uint48\",\"components\":[]}]}]";
pub static IERC6372_ABI: ::ethers_contract::Lazy<::ethers_core::abi::Abi> = ::ethers_contract::Lazy::new(||
::ethers_core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid"));
pub struct IERC6372<M>(::ethers_contract::Contract<M>);
impl<M> ::core::clone::Clone for IERC6372<M> {
fn clone(&self) -> Self {
Self(::core::clone::Clone::clone(&self.0))
}
}
impl<M> ::core::ops::Deref for IERC6372<M> {
type Target = ::ethers_contract::Contract<M>;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<M> ::core::ops::DerefMut for IERC6372<M> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl<M> ::core::fmt::Debug for IERC6372<M> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple(stringify!(IERC6372)).field(&self.address()).finish()
}
}
impl<M: ::ethers_providers::Middleware> IERC6372<M> {
pub fn new<T: Into<::ethers_core::types::Address>>(
address: T,
client: ::std::sync::Arc<M>,
) -> Self {
Self(
::ethers_contract::Contract::new(
address.into(),
IERC6372_ABI.clone(),
client,
),
)
}
pub fn clock_mode(
&self,
) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
self.0
.method_hash([75, 245, 215, 233], ())
.expect("method not found (this should never happen)")
}
pub fn clock(&self) -> ::ethers_contract::builders::ContractCall<M, u64> {
self.0
.method_hash([145, 221, 173, 244], ())
.expect("method not found (this should never happen)")
}
}
impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
for IERC6372<M> {
fn from(contract: ::ethers_contract::Contract<M>) -> Self {
Self::new(contract.address(), contract.client())
}
}
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "CLOCK_MODE", abi = "CLOCK_MODE()")]
pub struct ClockModeCall;
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "clock", abi = "clock()")]
pub struct ClockCall;
#[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
pub enum IERC6372Calls {
ClockMode(ClockModeCall),
Clock(ClockCall),
}
impl ::ethers_core::abi::AbiDecode for IERC6372Calls {
fn decode(
data: impl AsRef<[u8]>,
) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
let data = data.as_ref();
if let Ok(decoded)
= <ClockModeCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::ClockMode(decoded));
}
if let Ok(decoded)
= <ClockCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::Clock(decoded));
}
Err(::ethers_core::abi::Error::InvalidData.into())
}
}
impl ::ethers_core::abi::AbiEncode for IERC6372Calls {
fn encode(self) -> Vec<u8> {
match self {
Self::ClockMode(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::Clock(element) => ::ethers_core::abi::AbiEncode::encode(element),
}
}
}
impl ::core::fmt::Display for IERC6372Calls {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
Self::ClockMode(element) => ::core::fmt::Display::fmt(element, f),
Self::Clock(element) => ::core::fmt::Display::fmt(element, f),
}
}
}
impl ::core::convert::From<ClockModeCall> for IERC6372Calls {
fn from(value: ClockModeCall) -> Self {
Self::ClockMode(value)
}
}
impl ::core::convert::From<ClockCall> for IERC6372Calls {
fn from(value: ClockCall) -> Self {
Self::Clock(value)
}
}
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct ClockModeReturn(pub ::std::string::String);
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct ClockReturn(pub u64);
}