#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style,
clippy::empty_structs_with_brackets
)]
pub mod ICreditFacade {
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)]
#[derive(Clone)]
pub struct TtlStatus(u8);
const _: () = {
use ::alloy_sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::private::SolTypeValue<TtlStatus> for u8 {
#[inline]
fn stv_to_tokens(
&self,
) -> <::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::SolType>::Token<'_> {
alloy_sol_types::private::SolTypeValue::<
::alloy_sol_types::sol_data::Uint<8>,
>::stv_to_tokens(self)
}
#[inline]
fn stv_eip712_data_word(&self) -> alloy_sol_types::Word {
<::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::SolType>::tokenize(self)
.0
}
#[inline]
fn stv_abi_encode_packed_to(
&self,
out: &mut alloy_sol_types::private::Vec<u8>,
) {
<::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::SolType>::abi_encode_packed_to(self, out)
}
#[inline]
fn stv_abi_packed_encoded_size(&self) -> usize {
<::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::SolType>::abi_encoded_size(self)
}
}
#[automatically_derived]
impl TtlStatus {
pub const NAME: &'static str = stringify!(@ name);
#[inline]
pub const fn from(value: u8) -> Self {
Self(value)
}
#[inline]
pub const fn into(self) -> u8 {
self.0
}
#[inline]
pub fn abi_encode(&self) -> alloy_sol_types::private::Vec<u8> {
<Self as alloy_sol_types::SolType>::abi_encode(&self.0)
}
#[inline]
pub fn abi_encode_packed(&self) -> alloy_sol_types::private::Vec<u8> {
<Self as alloy_sol_types::SolType>::abi_encode_packed(&self.0)
}
}
#[automatically_derived]
impl alloy_sol_types::SolType for TtlStatus {
type RustType = u8;
type Token<'a> = <::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::SolType>::Token<'a>;
const SOL_NAME: &'static str = Self::NAME;
const ENCODED_SIZE: Option<usize> = <::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::SolType>::ENCODED_SIZE;
const PACKED_ENCODED_SIZE: Option<usize> = <::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE;
#[inline]
fn valid_token(token: &Self::Token<'_>) -> bool {
Self::type_check(token).is_ok()
}
#[inline]
fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> {
<::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::SolType>::type_check(token)
}
#[inline]
fn detokenize(token: Self::Token<'_>) -> Self::RustType {
<::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::SolType>::detokenize(token)
}
}
#[automatically_derived]
impl alloy_sol_types::EventTopic for TtlStatus {
#[inline]
fn topic_preimage_length(rust: &Self::RustType) -> usize {
<::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::EventTopic>::topic_preimage_length(rust)
}
#[inline]
fn encode_topic_preimage(
rust: &Self::RustType,
out: &mut alloy_sol_types::private::Vec<u8>,
) {
<::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out)
}
#[inline]
fn encode_topic(
rust: &Self::RustType,
) -> alloy_sol_types::abi::token::WordToken {
<::alloy_sol_types::sol_data::Uint<
8,
> as alloy_sol_types::EventTopic>::encode_topic(rust)
}
}
};
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct Account {
#[allow(missing_docs)]
pub capacityUsed: u64,
#[allow(missing_docs)]
pub creditFree: ::alloy_sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub creditCommitted: ::alloy_sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub creditSponsor: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub lastDebitEpoch: u64,
#[allow(missing_docs)]
pub approvalsTo: ::alloy_sol_types::private::Vec<
<Approval as ::alloy_sol_types::SolType>::RustType,
>,
#[allow(missing_docs)]
pub approvalsFrom: ::alloy_sol_types::private::Vec<
<Approval as ::alloy_sol_types::SolType>::RustType,
>,
#[allow(missing_docs)]
pub maxTtl: u64,
#[allow(missing_docs)]
pub gasAllowance: ::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)]
type UnderlyingSolTuple<'a> = (
::alloy_sol_types::sol_data::Uint<64>,
::alloy_sol_types::sol_data::Uint<256>,
::alloy_sol_types::sol_data::Uint<256>,
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Uint<64>,
::alloy_sol_types::sol_data::Array<Approval>,
::alloy_sol_types::sol_data::Array<Approval>,
::alloy_sol_types::sol_data::Uint<64>,
::alloy_sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
u64,
::alloy_sol_types::private::primitives::aliases::U256,
::alloy_sol_types::private::primitives::aliases::U256,
::alloy_sol_types::private::Address,
u64,
::alloy_sol_types::private::Vec<
<Approval as ::alloy_sol_types::SolType>::RustType,
>,
::alloy_sol_types::private::Vec<
<Approval as ::alloy_sol_types::SolType>::RustType,
>,
u64,
::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<Account> for UnderlyingRustTuple<'_> {
fn from(value: Account) -> Self {
(
value.capacityUsed,
value.creditFree,
value.creditCommitted,
value.creditSponsor,
value.lastDebitEpoch,
value.approvalsTo,
value.approvalsFrom,
value.maxTtl,
value.gasAllowance,
)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for Account {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
capacityUsed: tuple.0,
creditFree: tuple.1,
creditCommitted: tuple.2,
creditSponsor: tuple.3,
lastDebitEpoch: tuple.4,
approvalsTo: tuple.5,
approvalsFrom: tuple.6,
maxTtl: tuple.7,
gasAllowance: tuple.8,
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolValue for Account {
type SolType = Self;
}
#[automatically_derived]
impl alloy_sol_types::private::SolTypeValue<Self> for Account {
#[inline]
fn stv_to_tokens(&self) -> <Self as alloy_sol_types::SolType>::Token<'_> {
(
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::SolType>::tokenize(&self.capacityUsed),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.creditFree),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.creditCommitted),
<::alloy_sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.creditSponsor,
),
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::SolType>::tokenize(&self.lastDebitEpoch),
<::alloy_sol_types::sol_data::Array<
Approval,
> as alloy_sol_types::SolType>::tokenize(&self.approvalsTo),
<::alloy_sol_types::sol_data::Array<
Approval,
> as alloy_sol_types::SolType>::tokenize(&self.approvalsFrom),
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::SolType>::tokenize(&self.maxTtl),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.gasAllowance),
)
}
#[inline]
fn stv_abi_encoded_size(&self) -> usize {
if let Some(size) = <Self as alloy_sol_types::SolType>::ENCODED_SIZE {
return size;
}
let tuple = <UnderlyingRustTuple<
'_,
> as ::core::convert::From<Self>>::from(self.clone());
<UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::abi_encoded_size(&tuple)
}
#[inline]
fn stv_eip712_data_word(&self) -> alloy_sol_types::Word {
<Self as alloy_sol_types::SolStruct>::eip712_hash_struct(self)
}
#[inline]
fn stv_abi_encode_packed_to(
&self,
out: &mut alloy_sol_types::private::Vec<u8>,
) {
let tuple = <UnderlyingRustTuple<
'_,
> as ::core::convert::From<Self>>::from(self.clone());
<UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out)
}
#[inline]
fn stv_abi_packed_encoded_size(&self) -> usize {
if let Some(size) = <Self as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE {
return size;
}
let tuple = <UnderlyingRustTuple<
'_,
> as ::core::convert::From<Self>>::from(self.clone());
<UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple)
}
}
#[automatically_derived]
impl alloy_sol_types::SolType for Account {
type RustType = Self;
type Token<'a> = <UnderlyingSolTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SOL_NAME: &'static str = <Self as alloy_sol_types::SolStruct>::NAME;
const ENCODED_SIZE: Option<usize> = <UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::ENCODED_SIZE;
const PACKED_ENCODED_SIZE: Option<usize> = <UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE;
#[inline]
fn valid_token(token: &Self::Token<'_>) -> bool {
<UnderlyingSolTuple<'_> as alloy_sol_types::SolType>::valid_token(token)
}
#[inline]
fn detokenize(token: Self::Token<'_>) -> Self::RustType {
let tuple = <UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::detokenize(token);
<Self as ::core::convert::From<UnderlyingRustTuple<'_>>>::from(tuple)
}
}
#[automatically_derived]
impl alloy_sol_types::SolStruct for Account {
const NAME: &'static str = "Account";
#[inline]
fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> {
alloy_sol_types::private::Cow::Borrowed(
"Account(uint64 capacityUsed,uint256 creditFree,uint256 creditCommitted,address creditSponsor,uint64 lastDebitEpoch,Approval[] approvalsTo,Approval[] approvalsFrom,uint64 maxTtl,uint256 gasAllowance)",
)
}
#[inline]
fn eip712_components() -> alloy_sol_types::private::Vec<
alloy_sol_types::private::Cow<'static, str>,
> {
let mut components = alloy_sol_types::private::Vec::with_capacity(2);
components
.push(<Approval as alloy_sol_types::SolStruct>::eip712_root_type());
components
.extend(
<Approval as alloy_sol_types::SolStruct>::eip712_components(),
);
components
.push(<Approval as alloy_sol_types::SolStruct>::eip712_root_type());
components
.extend(
<Approval as alloy_sol_types::SolStruct>::eip712_components(),
);
components
}
#[inline]
fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec<u8> {
[
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::SolType>::eip712_data_word(&self.capacityUsed)
.0,
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::eip712_data_word(&self.creditFree)
.0,
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::eip712_data_word(
&self.creditCommitted,
)
.0,
<::alloy_sol_types::sol_data::Address as alloy_sol_types::SolType>::eip712_data_word(
&self.creditSponsor,
)
.0,
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::SolType>::eip712_data_word(
&self.lastDebitEpoch,
)
.0,
<::alloy_sol_types::sol_data::Array<
Approval,
> as alloy_sol_types::SolType>::eip712_data_word(&self.approvalsTo)
.0,
<::alloy_sol_types::sol_data::Array<
Approval,
> as alloy_sol_types::SolType>::eip712_data_word(&self.approvalsFrom)
.0,
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::SolType>::eip712_data_word(&self.maxTtl)
.0,
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::eip712_data_word(&self.gasAllowance)
.0,
]
.concat()
}
}
#[automatically_derived]
impl alloy_sol_types::EventTopic for Account {
#[inline]
fn topic_preimage_length(rust: &Self::RustType) -> usize {
0usize
+ <::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.capacityUsed,
)
+ <::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.creditFree,
)
+ <::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.creditCommitted,
)
+ <::alloy_sol_types::sol_data::Address as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.creditSponsor,
)
+ <::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.lastDebitEpoch,
)
+ <::alloy_sol_types::sol_data::Array<
Approval,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.approvalsTo,
)
+ <::alloy_sol_types::sol_data::Array<
Approval,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.approvalsFrom,
)
+ <::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.maxTtl,
)
+ <::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.gasAllowance,
)
}
#[inline]
fn encode_topic_preimage(
rust: &Self::RustType,
out: &mut alloy_sol_types::private::Vec<u8>,
) {
out.reserve(
<Self as alloy_sol_types::EventTopic>::topic_preimage_length(rust),
);
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.capacityUsed,
out,
);
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.creditFree,
out,
);
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.creditCommitted,
out,
);
<::alloy_sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.creditSponsor,
out,
);
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.lastDebitEpoch,
out,
);
<::alloy_sol_types::sol_data::Array<
Approval,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.approvalsTo,
out,
);
<::alloy_sol_types::sol_data::Array<
Approval,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.approvalsFrom,
out,
);
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.maxTtl,
out,
);
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.gasAllowance,
out,
);
}
#[inline]
fn encode_topic(
rust: &Self::RustType,
) -> alloy_sol_types::abi::token::WordToken {
let mut out = alloy_sol_types::private::Vec::new();
<Self as alloy_sol_types::EventTopic>::encode_topic_preimage(
rust,
&mut out,
);
alloy_sol_types::abi::token::WordToken(
alloy_sol_types::private::keccak256(out),
)
}
}
};
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct Approval {
#[allow(missing_docs)]
pub addr: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub approval: <CreditApproval as ::alloy_sol_types::SolType>::RustType,
}
#[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)]
type UnderlyingSolTuple<'a> = (
::alloy_sol_types::sol_data::Address,
CreditApproval,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
::alloy_sol_types::private::Address,
<CreditApproval as ::alloy_sol_types::SolType>::RustType,
);
#[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<Approval> for UnderlyingRustTuple<'_> {
fn from(value: Approval) -> Self {
(value.addr, value.approval)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for Approval {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
addr: tuple.0,
approval: tuple.1,
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolValue for Approval {
type SolType = Self;
}
#[automatically_derived]
impl alloy_sol_types::private::SolTypeValue<Self> for Approval {
#[inline]
fn stv_to_tokens(&self) -> <Self as alloy_sol_types::SolType>::Token<'_> {
(
<::alloy_sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.addr,
),
<CreditApproval as alloy_sol_types::SolType>::tokenize(
&self.approval,
),
)
}
#[inline]
fn stv_abi_encoded_size(&self) -> usize {
if let Some(size) = <Self as alloy_sol_types::SolType>::ENCODED_SIZE {
return size;
}
let tuple = <UnderlyingRustTuple<
'_,
> as ::core::convert::From<Self>>::from(self.clone());
<UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::abi_encoded_size(&tuple)
}
#[inline]
fn stv_eip712_data_word(&self) -> alloy_sol_types::Word {
<Self as alloy_sol_types::SolStruct>::eip712_hash_struct(self)
}
#[inline]
fn stv_abi_encode_packed_to(
&self,
out: &mut alloy_sol_types::private::Vec<u8>,
) {
let tuple = <UnderlyingRustTuple<
'_,
> as ::core::convert::From<Self>>::from(self.clone());
<UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out)
}
#[inline]
fn stv_abi_packed_encoded_size(&self) -> usize {
if let Some(size) = <Self as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE {
return size;
}
let tuple = <UnderlyingRustTuple<
'_,
> as ::core::convert::From<Self>>::from(self.clone());
<UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple)
}
}
#[automatically_derived]
impl alloy_sol_types::SolType for Approval {
type RustType = Self;
type Token<'a> = <UnderlyingSolTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SOL_NAME: &'static str = <Self as alloy_sol_types::SolStruct>::NAME;
const ENCODED_SIZE: Option<usize> = <UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::ENCODED_SIZE;
const PACKED_ENCODED_SIZE: Option<usize> = <UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE;
#[inline]
fn valid_token(token: &Self::Token<'_>) -> bool {
<UnderlyingSolTuple<'_> as alloy_sol_types::SolType>::valid_token(token)
}
#[inline]
fn detokenize(token: Self::Token<'_>) -> Self::RustType {
let tuple = <UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::detokenize(token);
<Self as ::core::convert::From<UnderlyingRustTuple<'_>>>::from(tuple)
}
}
#[automatically_derived]
impl alloy_sol_types::SolStruct for Approval {
const NAME: &'static str = "Approval";
#[inline]
fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> {
alloy_sol_types::private::Cow::Borrowed(
"Approval(address addr,CreditApproval approval)",
)
}
#[inline]
fn eip712_components() -> alloy_sol_types::private::Vec<
alloy_sol_types::private::Cow<'static, str>,
> {
let mut components = alloy_sol_types::private::Vec::with_capacity(1);
components
.push(
<CreditApproval as alloy_sol_types::SolStruct>::eip712_root_type(),
);
components
.extend(
<CreditApproval as alloy_sol_types::SolStruct>::eip712_components(),
);
components
}
#[inline]
fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec<u8> {
[
<::alloy_sol_types::sol_data::Address as alloy_sol_types::SolType>::eip712_data_word(
&self.addr,
)
.0,
<CreditApproval as alloy_sol_types::SolType>::eip712_data_word(
&self.approval,
)
.0,
]
.concat()
}
}
#[automatically_derived]
impl alloy_sol_types::EventTopic for Approval {
#[inline]
fn topic_preimage_length(rust: &Self::RustType) -> usize {
0usize
+ <::alloy_sol_types::sol_data::Address as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.addr,
)
+ <CreditApproval as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.approval,
)
}
#[inline]
fn encode_topic_preimage(
rust: &Self::RustType,
out: &mut alloy_sol_types::private::Vec<u8>,
) {
out.reserve(
<Self as alloy_sol_types::EventTopic>::topic_preimage_length(rust),
);
<::alloy_sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.addr,
out,
);
<CreditApproval as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.approval,
out,
);
}
#[inline]
fn encode_topic(
rust: &Self::RustType,
) -> alloy_sol_types::abi::token::WordToken {
let mut out = alloy_sol_types::private::Vec::new();
<Self as alloy_sol_types::EventTopic>::encode_topic_preimage(
rust,
&mut out,
);
alloy_sol_types::abi::token::WordToken(
alloy_sol_types::private::keccak256(out),
)
}
}
};
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct CreditApproval {
#[allow(missing_docs)]
pub creditLimit: ::alloy_sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub gasFeeLimit: ::alloy_sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub expiry: u64,
#[allow(missing_docs)]
pub creditUsed: ::alloy_sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub gasFeeUsed: ::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)]
type UnderlyingSolTuple<'a> = (
::alloy_sol_types::sol_data::Uint<256>,
::alloy_sol_types::sol_data::Uint<256>,
::alloy_sol_types::sol_data::Uint<64>,
::alloy_sol_types::sol_data::Uint<256>,
::alloy_sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
::alloy_sol_types::private::primitives::aliases::U256,
::alloy_sol_types::private::primitives::aliases::U256,
u64,
::alloy_sol_types::private::primitives::aliases::U256,
::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<CreditApproval> for UnderlyingRustTuple<'_> {
fn from(value: CreditApproval) -> Self {
(
value.creditLimit,
value.gasFeeLimit,
value.expiry,
value.creditUsed,
value.gasFeeUsed,
)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for CreditApproval {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
creditLimit: tuple.0,
gasFeeLimit: tuple.1,
expiry: tuple.2,
creditUsed: tuple.3,
gasFeeUsed: tuple.4,
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolValue for CreditApproval {
type SolType = Self;
}
#[automatically_derived]
impl alloy_sol_types::private::SolTypeValue<Self> for CreditApproval {
#[inline]
fn stv_to_tokens(&self) -> <Self as alloy_sol_types::SolType>::Token<'_> {
(
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.creditLimit),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.gasFeeLimit),
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::SolType>::tokenize(&self.expiry),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.creditUsed),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.gasFeeUsed),
)
}
#[inline]
fn stv_abi_encoded_size(&self) -> usize {
if let Some(size) = <Self as alloy_sol_types::SolType>::ENCODED_SIZE {
return size;
}
let tuple = <UnderlyingRustTuple<
'_,
> as ::core::convert::From<Self>>::from(self.clone());
<UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::abi_encoded_size(&tuple)
}
#[inline]
fn stv_eip712_data_word(&self) -> alloy_sol_types::Word {
<Self as alloy_sol_types::SolStruct>::eip712_hash_struct(self)
}
#[inline]
fn stv_abi_encode_packed_to(
&self,
out: &mut alloy_sol_types::private::Vec<u8>,
) {
let tuple = <UnderlyingRustTuple<
'_,
> as ::core::convert::From<Self>>::from(self.clone());
<UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out)
}
#[inline]
fn stv_abi_packed_encoded_size(&self) -> usize {
if let Some(size) = <Self as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE {
return size;
}
let tuple = <UnderlyingRustTuple<
'_,
> as ::core::convert::From<Self>>::from(self.clone());
<UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple)
}
}
#[automatically_derived]
impl alloy_sol_types::SolType for CreditApproval {
type RustType = Self;
type Token<'a> = <UnderlyingSolTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SOL_NAME: &'static str = <Self as alloy_sol_types::SolStruct>::NAME;
const ENCODED_SIZE: Option<usize> = <UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::ENCODED_SIZE;
const PACKED_ENCODED_SIZE: Option<usize> = <UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE;
#[inline]
fn valid_token(token: &Self::Token<'_>) -> bool {
<UnderlyingSolTuple<'_> as alloy_sol_types::SolType>::valid_token(token)
}
#[inline]
fn detokenize(token: Self::Token<'_>) -> Self::RustType {
let tuple = <UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::detokenize(token);
<Self as ::core::convert::From<UnderlyingRustTuple<'_>>>::from(tuple)
}
}
#[automatically_derived]
impl alloy_sol_types::SolStruct for CreditApproval {
const NAME: &'static str = "CreditApproval";
#[inline]
fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> {
alloy_sol_types::private::Cow::Borrowed(
"CreditApproval(uint256 creditLimit,uint256 gasFeeLimit,uint64 expiry,uint256 creditUsed,uint256 gasFeeUsed)",
)
}
#[inline]
fn eip712_components() -> alloy_sol_types::private::Vec<
alloy_sol_types::private::Cow<'static, str>,
> {
alloy_sol_types::private::Vec::new()
}
#[inline]
fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> {
<Self as alloy_sol_types::SolStruct>::eip712_root_type()
}
#[inline]
fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec<u8> {
[
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::eip712_data_word(&self.creditLimit)
.0,
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::eip712_data_word(&self.gasFeeLimit)
.0,
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::SolType>::eip712_data_word(&self.expiry)
.0,
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::eip712_data_word(&self.creditUsed)
.0,
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::eip712_data_word(&self.gasFeeUsed)
.0,
]
.concat()
}
}
#[automatically_derived]
impl alloy_sol_types::EventTopic for CreditApproval {
#[inline]
fn topic_preimage_length(rust: &Self::RustType) -> usize {
0usize
+ <::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.creditLimit,
)
+ <::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.gasFeeLimit,
)
+ <::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.expiry,
)
+ <::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.creditUsed,
)
+ <::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.gasFeeUsed,
)
}
#[inline]
fn encode_topic_preimage(
rust: &Self::RustType,
out: &mut alloy_sol_types::private::Vec<u8>,
) {
out.reserve(
<Self as alloy_sol_types::EventTopic>::topic_preimage_length(rust),
);
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.creditLimit,
out,
);
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.gasFeeLimit,
out,
);
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.expiry,
out,
);
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.creditUsed,
out,
);
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.gasFeeUsed,
out,
);
}
#[inline]
fn encode_topic(
rust: &Self::RustType,
) -> alloy_sol_types::abi::token::WordToken {
let mut out = alloy_sol_types::private::Vec::new();
<Self as alloy_sol_types::EventTopic>::encode_topic_preimage(
rust,
&mut out,
);
alloy_sol_types::abi::token::WordToken(
alloy_sol_types::private::keccak256(out),
)
}
}
};
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct CreditApproved {
#[allow(missing_docs)]
pub from: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub to: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub creditLimit: ::alloy_sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub gasFeeLimit: ::alloy_sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub expiry: ::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;
#[automatically_derived]
impl alloy_sol_types::SolEvent for CreditApproved {
type DataTuple<'a> = (
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Uint<256>,
::alloy_sol_types::sol_data::Uint<256>,
::alloy_sol_types::sol_data::Uint<256>,
);
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 = "CreditApproved(address,address,uint256,uint256,uint256)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
198u8,
151u8,
9u8,
230u8,
247u8,
103u8,
218u8,
215u8,
204u8,
177u8,
156u8,
96u8,
92u8,
60u8,
96u8,
43u8,
244u8,
130u8,
236u8,
180u8,
38u8,
5u8,
157u8,
124u8,
219u8,
94u8,
87u8,
55u8,
208u8,
91u8,
34u8,
248u8,
]);
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 {
from: data.0,
to: data.1,
creditLimit: data.2,
gasFeeLimit: data.3,
expiry: data.4,
}
}
#[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.from,
),
<::alloy_sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.to,
),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.creditLimit),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.gasFeeLimit),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.expiry),
)
}
#[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 CreditApproved {
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<&CreditApproved> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &CreditApproved) -> 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 CreditDebited {
#[allow(missing_docs)]
pub amount: ::alloy_sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub numAccounts: ::alloy_sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub moreAccounts: bool,
}
#[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 CreditDebited {
type DataTuple<'a> = (
::alloy_sol_types::sol_data::Uint<256>,
::alloy_sol_types::sol_data::Uint<256>,
::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 = "CreditDebited(uint256,uint256,bool)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
92u8,
193u8,
181u8,
40u8,
97u8,
67u8,
201u8,
209u8,
248u8,
225u8,
192u8,
144u8,
181u8,
215u8,
48u8,
35u8,
136u8,
171u8,
148u8,
251u8,
69u8,
177u8,
225u8,
142u8,
99u8,
216u8,
176u8,
142u8,
248u8,
192u8,
247u8,
195u8,
]);
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 {
amount: data.0,
numAccounts: data.1,
moreAccounts: data.2,
}
}
#[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<
256,
> as alloy_sol_types::SolType>::tokenize(&self.amount),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.numAccounts),
<::alloy_sol_types::sol_data::Bool as alloy_sol_types::SolType>::tokenize(
&self.moreAccounts,
),
)
}
#[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 CreditDebited {
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<&CreditDebited> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &CreditDebited) -> 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 CreditPurchased {
#[allow(missing_docs)]
pub from: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub amount: ::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;
#[automatically_derived]
impl alloy_sol_types::SolEvent for CreditPurchased {
type DataTuple<'a> = (
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Uint<256>,
);
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 = "CreditPurchased(address,uint256)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
172u8,
242u8,
189u8,
201u8,
150u8,
150u8,
218u8,
53u8,
203u8,
254u8,
48u8,
14u8,
139u8,
125u8,
61u8,
51u8,
127u8,
252u8,
153u8,
24u8,
216u8,
84u8,
124u8,
88u8,
239u8,
139u8,
88u8,
162u8,
14u8,
192u8,
117u8,
223u8,
]);
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 {
from: data.0,
amount: data.1,
}
}
#[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.from,
),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.amount),
)
}
#[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 CreditPurchased {
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<&CreditPurchased> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &CreditPurchased) -> 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 CreditRevoked {
#[allow(missing_docs)]
pub from: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub to: ::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 CreditRevoked {
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 = "CreditRevoked(address,address)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
230u8,
61u8,
26u8,
144u8,
92u8,
12u8,
188u8,
127u8,
37u8,
200u8,
247u8,
26u8,
245u8,
236u8,
183u8,
68u8,
183u8,
113u8,
178u8,
15u8,
149u8,
79u8,
57u8,
225u8,
101u8,
77u8,
77u8,
131u8,
143u8,
147u8,
184u8,
158u8,
]);
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 { from: data.0, to: data.1 }
}
#[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.from,
),
<::alloy_sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.to,
),
)
}
#[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 CreditRevoked {
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<&CreditRevoked> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &CreditRevoked) -> 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)]
#[derive(Clone)]
pub struct approveCredit_0Call {
#[allow(missing_docs)]
pub to: ::alloy_sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct approveCredit_0Return {}
#[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)]
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<approveCredit_0Call> for UnderlyingRustTuple<'_> {
fn from(value: approveCredit_0Call) -> Self {
(value.to,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for approveCredit_0Call {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { to: 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<approveCredit_0Return>
for UnderlyingRustTuple<'_> {
fn from(value: approveCredit_0Return) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for approveCredit_0Return {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for approveCredit_0Call {
type Parameters<'a> = (::alloy_sol_types::sol_data::Address,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = approveCredit_0Return;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "approveCredit(address)";
const SELECTOR: [u8; 4] = [1u8, 233u8, 139u8, 250u8];
#[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.to,
),
)
}
#[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(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct approveCredit_1Call {
#[allow(missing_docs)]
pub to: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub caller: ::alloy_sol_types::private::Vec<::alloy_sol_types::private::Address>,
#[allow(missing_docs)]
pub creditLimit: ::alloy_sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub gasFeeLimit: ::alloy_sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub ttl: u64,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct approveCredit_1Return {}
#[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)]
type UnderlyingSolTuple<'a> = (
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Array<::alloy_sol_types::sol_data::Address>,
::alloy_sol_types::sol_data::Uint<256>,
::alloy_sol_types::sol_data::Uint<256>,
::alloy_sol_types::sol_data::Uint<64>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
::alloy_sol_types::private::Address,
::alloy_sol_types::private::Vec<::alloy_sol_types::private::Address>,
::alloy_sol_types::private::primitives::aliases::U256,
::alloy_sol_types::private::primitives::aliases::U256,
u64,
);
#[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<approveCredit_1Call> for UnderlyingRustTuple<'_> {
fn from(value: approveCredit_1Call) -> Self {
(
value.to,
value.caller,
value.creditLimit,
value.gasFeeLimit,
value.ttl,
)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for approveCredit_1Call {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
to: tuple.0,
caller: tuple.1,
creditLimit: tuple.2,
gasFeeLimit: tuple.3,
ttl: tuple.4,
}
}
}
}
{
#[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<approveCredit_1Return>
for UnderlyingRustTuple<'_> {
fn from(value: approveCredit_1Return) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for approveCredit_1Return {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for approveCredit_1Call {
type Parameters<'a> = (
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Array<::alloy_sol_types::sol_data::Address>,
::alloy_sol_types::sol_data::Uint<256>,
::alloy_sol_types::sol_data::Uint<256>,
::alloy_sol_types::sol_data::Uint<64>,
);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = approveCredit_1Return;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "approveCredit(address,address[],uint256,uint256,uint64)";
const SELECTOR: [u8; 4] = [17u8, 43u8, 101u8, 23u8];
#[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.to,
),
<::alloy_sol_types::sol_data::Array<
::alloy_sol_types::sol_data::Address,
> as alloy_sol_types::SolType>::tokenize(&self.caller),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.creditLimit),
<::alloy_sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.gasFeeLimit),
<::alloy_sol_types::sol_data::Uint<
64,
> as alloy_sol_types::SolType>::tokenize(&self.ttl),
)
}
#[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(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct approveCredit_2Call {
#[allow(missing_docs)]
pub to: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub caller: ::alloy_sol_types::private::Vec<::alloy_sol_types::private::Address>,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct approveCredit_2Return {}
#[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)]
type UnderlyingSolTuple<'a> = (
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Array<::alloy_sol_types::sol_data::Address>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
::alloy_sol_types::private::Address,
::alloy_sol_types::private::Vec<::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<approveCredit_2Call> for UnderlyingRustTuple<'_> {
fn from(value: approveCredit_2Call) -> Self {
(value.to, value.caller)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for approveCredit_2Call {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
to: tuple.0,
caller: tuple.1,
}
}
}
}
{
#[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<approveCredit_2Return>
for UnderlyingRustTuple<'_> {
fn from(value: approveCredit_2Return) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for approveCredit_2Return {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for approveCredit_2Call {
type Parameters<'a> = (
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Array<::alloy_sol_types::sol_data::Address>,
);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = approveCredit_2Return;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "approveCredit(address,address[])";
const SELECTOR: [u8; 4] = [160u8, 170u8, 43u8, 101u8];
#[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.to,
),
<::alloy_sol_types::sol_data::Array<
::alloy_sol_types::sol_data::Address,
> as alloy_sol_types::SolType>::tokenize(&self.caller),
)
}
#[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(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct buyCredit_0Call {}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct buyCredit_0Return {}
#[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)]
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<buyCredit_0Call> for UnderlyingRustTuple<'_> {
fn from(value: buyCredit_0Call) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for buyCredit_0Call {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
{
#[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<buyCredit_0Return> for UnderlyingRustTuple<'_> {
fn from(value: buyCredit_0Return) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for buyCredit_0Return {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for buyCredit_0Call {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = buyCredit_0Return;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "buyCredit()";
const SELECTOR: [u8; 4] = [142u8, 78u8, 111u8, 6u8];
#[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(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct buyCredit_1Call {
#[allow(missing_docs)]
pub recipient: ::alloy_sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct buyCredit_1Return {}
#[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)]
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<buyCredit_1Call> for UnderlyingRustTuple<'_> {
fn from(value: buyCredit_1Call) -> Self {
(value.recipient,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for buyCredit_1Call {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { recipient: 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<buyCredit_1Return> for UnderlyingRustTuple<'_> {
fn from(value: buyCredit_1Return) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for buyCredit_1Return {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for buyCredit_1Call {
type Parameters<'a> = (::alloy_sol_types::sol_data::Address,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = buyCredit_1Return;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "buyCredit(address)";
const SELECTOR: [u8; 4] = [163u8, 142u8, 174u8, 159u8];
#[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.recipient,
),
)
}
#[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(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getAccountCall {
#[allow(missing_docs)]
pub addr: ::alloy_sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getAccountReturn {
#[allow(missing_docs)]
pub account: <Account as ::alloy_sol_types::SolType>::RustType,
}
#[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)]
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<getAccountCall> for UnderlyingRustTuple<'_> {
fn from(value: getAccountCall) -> Self {
(value.addr,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getAccountCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { addr: tuple.0 }
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (Account,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
<Account as ::alloy_sol_types::SolType>::RustType,
);
#[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<getAccountReturn> for UnderlyingRustTuple<'_> {
fn from(value: getAccountReturn) -> Self {
(value.account,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getAccountReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { account: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getAccountCall {
type Parameters<'a> = (::alloy_sol_types::sol_data::Address,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = getAccountReturn;
type ReturnTuple<'a> = (Account,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getAccount(address)";
const SELECTOR: [u8; 4] = [251u8, 203u8, 192u8, 241u8];
#[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.addr,
),
)
}
#[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(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getCreditApprovalCall {
#[allow(missing_docs)]
pub from: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub to: ::alloy_sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getCreditApprovalReturn {
#[allow(missing_docs)]
pub approval: <CreditApproval as ::alloy_sol_types::SolType>::RustType,
}
#[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)]
type UnderlyingSolTuple<'a> = (
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Address,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
::alloy_sol_types::private::Address,
::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<getCreditApprovalCall>
for UnderlyingRustTuple<'_> {
fn from(value: getCreditApprovalCall) -> Self {
(value.from, value.to)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getCreditApprovalCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { from: tuple.0, to: tuple.1 }
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (CreditApproval,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
<CreditApproval as ::alloy_sol_types::SolType>::RustType,
);
#[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<getCreditApprovalReturn>
for UnderlyingRustTuple<'_> {
fn from(value: getCreditApprovalReturn) -> Self {
(value.approval,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getCreditApprovalReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { approval: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getCreditApprovalCall {
type Parameters<'a> = (
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Address,
);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = getCreditApprovalReturn;
type ReturnTuple<'a> = (CreditApproval,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getCreditApproval(address,address)";
const SELECTOR: [u8; 4] = [205u8, 155u8, 232u8, 15u8];
#[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.from,
),
<::alloy_sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.to,
),
)
}
#[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(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct revokeCredit_0Call {
#[allow(missing_docs)]
pub to: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub caller: ::alloy_sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct revokeCredit_0Return {}
#[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)]
type UnderlyingSolTuple<'a> = (
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Address,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
::alloy_sol_types::private::Address,
::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<revokeCredit_0Call> for UnderlyingRustTuple<'_> {
fn from(value: revokeCredit_0Call) -> Self {
(value.to, value.caller)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for revokeCredit_0Call {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
to: tuple.0,
caller: tuple.1,
}
}
}
}
{
#[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<revokeCredit_0Return>
for UnderlyingRustTuple<'_> {
fn from(value: revokeCredit_0Return) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for revokeCredit_0Return {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for revokeCredit_0Call {
type Parameters<'a> = (
::alloy_sol_types::sol_data::Address,
::alloy_sol_types::sol_data::Address,
);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = revokeCredit_0Return;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "revokeCredit(address,address)";
const SELECTOR: [u8; 4] = [168u8, 74u8, 21u8, 53u8];
#[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.to,
),
<::alloy_sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.caller,
),
)
}
#[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(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct revokeCredit_1Call {
#[allow(missing_docs)]
pub to: ::alloy_sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct revokeCredit_1Return {}
#[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)]
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<revokeCredit_1Call> for UnderlyingRustTuple<'_> {
fn from(value: revokeCredit_1Call) -> Self {
(value.to,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for revokeCredit_1Call {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { to: 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<revokeCredit_1Return>
for UnderlyingRustTuple<'_> {
fn from(value: revokeCredit_1Return) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for revokeCredit_1Return {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for revokeCredit_1Call {
type Parameters<'a> = (::alloy_sol_types::sol_data::Address,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = revokeCredit_1Return;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "revokeCredit(address)";
const SELECTOR: [u8; 4] = [168u8, 239u8, 140u8, 175u8];
#[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.to,
),
)
}
#[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(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct setAccountSponsorCall {
#[allow(missing_docs)]
pub sponsor: ::alloy_sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct setAccountSponsorReturn {}
#[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)]
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<setAccountSponsorCall>
for UnderlyingRustTuple<'_> {
fn from(value: setAccountSponsorCall) -> Self {
(value.sponsor,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for setAccountSponsorCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { sponsor: 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<setAccountSponsorReturn>
for UnderlyingRustTuple<'_> {
fn from(value: setAccountSponsorReturn) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for setAccountSponsorReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for setAccountSponsorCall {
type Parameters<'a> = (::alloy_sol_types::sol_data::Address,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = setAccountSponsorReturn;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "setAccountSponsor(address)";
const SELECTOR: [u8; 4] = [142u8, 9u8, 72u8, 182u8];
#[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.sponsor,
),
)
}
#[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(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct setAccountStatusCall {
#[allow(missing_docs)]
pub subscriber: ::alloy_sol_types::private::Address,
#[allow(missing_docs)]
pub ttlStatus: <TtlStatus as ::alloy_sol_types::SolType>::RustType,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct setAccountStatusReturn {}
#[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)]
type UnderlyingSolTuple<'a> = (
::alloy_sol_types::sol_data::Address,
TtlStatus,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
::alloy_sol_types::private::Address,
<TtlStatus as ::alloy_sol_types::SolType>::RustType,
);
#[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<setAccountStatusCall>
for UnderlyingRustTuple<'_> {
fn from(value: setAccountStatusCall) -> Self {
(value.subscriber, value.ttlStatus)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for setAccountStatusCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
subscriber: tuple.0,
ttlStatus: tuple.1,
}
}
}
}
{
#[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<setAccountStatusReturn>
for UnderlyingRustTuple<'_> {
fn from(value: setAccountStatusReturn) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for setAccountStatusReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for setAccountStatusCall {
type Parameters<'a> = (::alloy_sol_types::sol_data::Address, TtlStatus);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = setAccountStatusReturn;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "setAccountStatus(address,uint8)";
const SELECTOR: [u8; 4] = [10u8, 210u8, 176u8, 161u8];
#[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.subscriber,
),
<TtlStatus as alloy_sol_types::SolType>::tokenize(&self.ttlStatus),
)
}
#[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 ICreditFacadeCalls {
#[allow(missing_docs)]
approveCredit_0(approveCredit_0Call),
#[allow(missing_docs)]
approveCredit_1(approveCredit_1Call),
#[allow(missing_docs)]
approveCredit_2(approveCredit_2Call),
#[allow(missing_docs)]
buyCredit_0(buyCredit_0Call),
#[allow(missing_docs)]
buyCredit_1(buyCredit_1Call),
#[allow(missing_docs)]
getAccount(getAccountCall),
#[allow(missing_docs)]
getCreditApproval(getCreditApprovalCall),
#[allow(missing_docs)]
revokeCredit_0(revokeCredit_0Call),
#[allow(missing_docs)]
revokeCredit_1(revokeCredit_1Call),
#[allow(missing_docs)]
setAccountSponsor(setAccountSponsorCall),
#[allow(missing_docs)]
setAccountStatus(setAccountStatusCall),
}
#[automatically_derived]
impl ICreditFacadeCalls {
pub const SELECTORS: &'static [[u8; 4usize]] = &[
[1u8, 233u8, 139u8, 250u8],
[10u8, 210u8, 176u8, 161u8],
[17u8, 43u8, 101u8, 23u8],
[142u8, 9u8, 72u8, 182u8],
[142u8, 78u8, 111u8, 6u8],
[160u8, 170u8, 43u8, 101u8],
[163u8, 142u8, 174u8, 159u8],
[168u8, 74u8, 21u8, 53u8],
[168u8, 239u8, 140u8, 175u8],
[205u8, 155u8, 232u8, 15u8],
[251u8, 203u8, 192u8, 241u8],
];
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for ICreditFacadeCalls {
const NAME: &'static str = "ICreditFacadeCalls";
const MIN_DATA_LENGTH: usize = 0usize;
const COUNT: usize = 11usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::approveCredit_0(_) => {
<approveCredit_0Call as alloy_sol_types::SolCall>::SELECTOR
}
Self::approveCredit_1(_) => {
<approveCredit_1Call as alloy_sol_types::SolCall>::SELECTOR
}
Self::approveCredit_2(_) => {
<approveCredit_2Call as alloy_sol_types::SolCall>::SELECTOR
}
Self::buyCredit_0(_) => {
<buyCredit_0Call as alloy_sol_types::SolCall>::SELECTOR
}
Self::buyCredit_1(_) => {
<buyCredit_1Call as alloy_sol_types::SolCall>::SELECTOR
}
Self::getAccount(_) => {
<getAccountCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::getCreditApproval(_) => {
<getCreditApprovalCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::revokeCredit_0(_) => {
<revokeCredit_0Call as alloy_sol_types::SolCall>::SELECTOR
}
Self::revokeCredit_1(_) => {
<revokeCredit_1Call as alloy_sol_types::SolCall>::SELECTOR
}
Self::setAccountSponsor(_) => {
<setAccountSponsorCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::setAccountStatus(_) => {
<setAccountStatusCall 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],
validate: bool,
) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(
&[u8],
bool,
) -> alloy_sol_types::Result<ICreditFacadeCalls>] = &[
{
fn approveCredit_0(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<ICreditFacadeCalls> {
<approveCredit_0Call as alloy_sol_types::SolCall>::abi_decode_raw(
data,
validate,
)
.map(ICreditFacadeCalls::approveCredit_0)
}
approveCredit_0
},
{
fn setAccountStatus(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<ICreditFacadeCalls> {
<setAccountStatusCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
validate,
)
.map(ICreditFacadeCalls::setAccountStatus)
}
setAccountStatus
},
{
fn approveCredit_1(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<ICreditFacadeCalls> {
<approveCredit_1Call as alloy_sol_types::SolCall>::abi_decode_raw(
data,
validate,
)
.map(ICreditFacadeCalls::approveCredit_1)
}
approveCredit_1
},
{
fn setAccountSponsor(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<ICreditFacadeCalls> {
<setAccountSponsorCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
validate,
)
.map(ICreditFacadeCalls::setAccountSponsor)
}
setAccountSponsor
},
{
fn buyCredit_0(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<ICreditFacadeCalls> {
<buyCredit_0Call as alloy_sol_types::SolCall>::abi_decode_raw(
data,
validate,
)
.map(ICreditFacadeCalls::buyCredit_0)
}
buyCredit_0
},
{
fn approveCredit_2(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<ICreditFacadeCalls> {
<approveCredit_2Call as alloy_sol_types::SolCall>::abi_decode_raw(
data,
validate,
)
.map(ICreditFacadeCalls::approveCredit_2)
}
approveCredit_2
},
{
fn buyCredit_1(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<ICreditFacadeCalls> {
<buyCredit_1Call as alloy_sol_types::SolCall>::abi_decode_raw(
data,
validate,
)
.map(ICreditFacadeCalls::buyCredit_1)
}
buyCredit_1
},
{
fn revokeCredit_0(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<ICreditFacadeCalls> {
<revokeCredit_0Call as alloy_sol_types::SolCall>::abi_decode_raw(
data,
validate,
)
.map(ICreditFacadeCalls::revokeCredit_0)
}
revokeCredit_0
},
{
fn revokeCredit_1(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<ICreditFacadeCalls> {
<revokeCredit_1Call as alloy_sol_types::SolCall>::abi_decode_raw(
data,
validate,
)
.map(ICreditFacadeCalls::revokeCredit_1)
}
revokeCredit_1
},
{
fn getCreditApproval(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<ICreditFacadeCalls> {
<getCreditApprovalCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
validate,
)
.map(ICreditFacadeCalls::getCreditApproval)
}
getCreditApproval
},
{
fn getAccount(
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<ICreditFacadeCalls> {
<getAccountCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
validate,
)
.map(ICreditFacadeCalls::getAccount)
}
getAccount
},
];
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, validate)
}
#[inline]
fn abi_encoded_size(&self) -> usize {
match self {
Self::approveCredit_0(inner) => {
<approveCredit_0Call as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::approveCredit_1(inner) => {
<approveCredit_1Call as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::approveCredit_2(inner) => {
<approveCredit_2Call as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::buyCredit_0(inner) => {
<buyCredit_0Call as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::buyCredit_1(inner) => {
<buyCredit_1Call as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::getAccount(inner) => {
<getAccountCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::getCreditApproval(inner) => {
<getCreditApprovalCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::revokeCredit_0(inner) => {
<revokeCredit_0Call as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::revokeCredit_1(inner) => {
<revokeCredit_1Call as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::setAccountSponsor(inner) => {
<setAccountSponsorCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::setAccountStatus(inner) => {
<setAccountStatusCall 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::approveCredit_0(inner) => {
<approveCredit_0Call as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::approveCredit_1(inner) => {
<approveCredit_1Call as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::approveCredit_2(inner) => {
<approveCredit_2Call as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::buyCredit_0(inner) => {
<buyCredit_0Call as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::buyCredit_1(inner) => {
<buyCredit_1Call as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::getAccount(inner) => {
<getAccountCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::getCreditApproval(inner) => {
<getCreditApprovalCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::revokeCredit_0(inner) => {
<revokeCredit_0Call as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::revokeCredit_1(inner) => {
<revokeCredit_1Call as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::setAccountSponsor(inner) => {
<setAccountSponsorCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::setAccountStatus(inner) => {
<setAccountStatusCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
}
}
}
pub enum ICreditFacadeEvents {
#[allow(missing_docs)]
CreditApproved(CreditApproved),
#[allow(missing_docs)]
CreditDebited(CreditDebited),
#[allow(missing_docs)]
CreditPurchased(CreditPurchased),
#[allow(missing_docs)]
CreditRevoked(CreditRevoked),
}
#[automatically_derived]
impl ICreditFacadeEvents {
pub const SELECTORS: &'static [[u8; 32usize]] = &[
[
92u8,
193u8,
181u8,
40u8,
97u8,
67u8,
201u8,
209u8,
248u8,
225u8,
192u8,
144u8,
181u8,
215u8,
48u8,
35u8,
136u8,
171u8,
148u8,
251u8,
69u8,
177u8,
225u8,
142u8,
99u8,
216u8,
176u8,
142u8,
248u8,
192u8,
247u8,
195u8,
],
[
172u8,
242u8,
189u8,
201u8,
150u8,
150u8,
218u8,
53u8,
203u8,
254u8,
48u8,
14u8,
139u8,
125u8,
61u8,
51u8,
127u8,
252u8,
153u8,
24u8,
216u8,
84u8,
124u8,
88u8,
239u8,
139u8,
88u8,
162u8,
14u8,
192u8,
117u8,
223u8,
],
[
198u8,
151u8,
9u8,
230u8,
247u8,
103u8,
218u8,
215u8,
204u8,
177u8,
156u8,
96u8,
92u8,
60u8,
96u8,
43u8,
244u8,
130u8,
236u8,
180u8,
38u8,
5u8,
157u8,
124u8,
219u8,
94u8,
87u8,
55u8,
208u8,
91u8,
34u8,
248u8,
],
[
230u8,
61u8,
26u8,
144u8,
92u8,
12u8,
188u8,
127u8,
37u8,
200u8,
247u8,
26u8,
245u8,
236u8,
183u8,
68u8,
183u8,
113u8,
178u8,
15u8,
149u8,
79u8,
57u8,
225u8,
101u8,
77u8,
77u8,
131u8,
143u8,
147u8,
184u8,
158u8,
],
];
}
#[automatically_derived]
impl alloy_sol_types::SolEventInterface for ICreditFacadeEvents {
const NAME: &'static str = "ICreditFacadeEvents";
const COUNT: usize = 4usize;
fn decode_raw_log(
topics: &[alloy_sol_types::Word],
data: &[u8],
validate: bool,
) -> alloy_sol_types::Result<Self> {
match topics.first().copied() {
Some(<CreditApproved as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<CreditApproved as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
validate,
)
.map(Self::CreditApproved)
}
Some(<CreditDebited as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<CreditDebited as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
validate,
)
.map(Self::CreditDebited)
}
Some(<CreditPurchased as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<CreditPurchased as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
validate,
)
.map(Self::CreditPurchased)
}
Some(<CreditRevoked as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<CreditRevoked as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
validate,
)
.map(Self::CreditRevoked)
}
_ => {
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 ICreditFacadeEvents {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::CreditApproved(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::CreditDebited(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::CreditPurchased(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::CreditRevoked(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::CreditApproved(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::CreditDebited(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::CreditPurchased(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::CreditRevoked(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
}