#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style,
clippy::empty_structs_with_brackets
)]
pub mod INewtonPolicy {
use super::*;
use alloy::sol_types as alloy_sol_types;
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct PolicyConfig {
#[allow(missing_docs)]
pub policyParams: alloy::sol_types::private::Bytes,
#[allow(missing_docs)]
pub expireAfter: u32,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Bytes,
alloy::sol_types::sol_data::Uint<32>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Bytes, u32);
#[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<PolicyConfig> for UnderlyingRustTuple<'_> {
fn from(value: PolicyConfig) -> Self {
(value.policyParams, value.expireAfter)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for PolicyConfig {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
policyParams: tuple.0,
expireAfter: tuple.1,
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolValue for PolicyConfig {
type SolType = Self;
}
#[automatically_derived]
impl alloy_sol_types::private::SolTypeValue<Self> for PolicyConfig {
#[inline]
fn stv_to_tokens(&self) -> <Self as alloy_sol_types::SolType>::Token<'_> {
(
<alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
&self.policyParams,
),
<alloy::sol_types::sol_data::Uint<
32,
> as alloy_sol_types::SolType>::tokenize(&self.expireAfter),
)
}
#[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 PolicyConfig {
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 PolicyConfig {
const NAME: &'static str = "PolicyConfig";
#[inline]
fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> {
alloy_sol_types::private::Cow::Borrowed(
"PolicyConfig(bytes policyParams,uint32 expireAfter)",
)
}
#[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::Bytes as alloy_sol_types::SolType>::eip712_data_word(
&self.policyParams,
)
.0,
<alloy::sol_types::sol_data::Uint<
32,
> as alloy_sol_types::SolType>::eip712_data_word(&self.expireAfter)
.0,
]
.concat()
}
}
#[automatically_derived]
impl alloy_sol_types::EventTopic for PolicyConfig {
#[inline]
fn topic_preimage_length(rust: &Self::RustType) -> usize {
0usize
+ <alloy::sol_types::sol_data::Bytes as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.policyParams,
)
+ <alloy::sol_types::sol_data::Uint<
32,
> as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.expireAfter,
)
}
#[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::Bytes as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.policyParams,
out,
);
<alloy::sol_types::sol_data::Uint<
32,
> as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.expireAfter,
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),
)
}
}
};
use alloy::contract as alloy_contract;
#[inline]
pub const fn new<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(
address: alloy_sol_types::private::Address,
__provider: P,
) -> INewtonPolicyInstance<P, N> {
INewtonPolicyInstance::<P, N>::new(address, __provider)
}
#[derive(Clone)]
pub struct INewtonPolicyInstance<P, N = alloy_contract::private::Ethereum> {
address: alloy_sol_types::private::Address,
provider: P,
_network: ::core::marker::PhantomData<N>,
}
#[automatically_derived]
impl<P, N> ::core::fmt::Debug for INewtonPolicyInstance<P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("INewtonPolicyInstance").field(&self.address).finish()
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> INewtonPolicyInstance<P, N> {
#[inline]
pub const fn new(
address: alloy_sol_types::private::Address,
__provider: P,
) -> Self {
Self {
address,
provider: __provider,
_network: ::core::marker::PhantomData,
}
}
#[inline]
pub const fn address(&self) -> &alloy_sol_types::private::Address {
&self.address
}
#[inline]
pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
self.address = address;
}
pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
self.set_address(address);
self
}
#[inline]
pub const fn provider(&self) -> &P {
&self.provider
}
}
impl<P: ::core::clone::Clone, N> INewtonPolicyInstance<&P, N> {
#[inline]
pub fn with_cloned_provider(self) -> INewtonPolicyInstance<P, N> {
INewtonPolicyInstance {
address: self.address,
provider: ::core::clone::Clone::clone(&self.provider),
_network: ::core::marker::PhantomData,
}
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> INewtonPolicyInstance<P, N> {
pub fn call_builder<C: alloy_sol_types::SolCall>(
&self,
call: &C,
) -> alloy_contract::SolCallBuilder<&P, C, N> {
alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> INewtonPolicyInstance<P, N> {
pub fn event_filter<E: alloy_sol_types::SolEvent>(
&self,
) -> alloy_contract::Event<&P, E, N> {
alloy_contract::Event::new_sol(&self.provider, &self.address)
}
}
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style,
clippy::empty_structs_with_brackets
)]
pub mod NewtonPolicyClient {
use super::*;
use alloy::sol_types as alloy_sol_types;
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct IncompatiblePolicyVersion {
#[allow(missing_docs)]
pub actual: alloy::sol_types::private::String,
#[allow(missing_docs)]
pub minimum: alloy::sol_types::private::String,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::String,
alloy::sol_types::sol_data::String,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::String,
alloy::sol_types::private::String,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<IncompatiblePolicyVersion>
for UnderlyingRustTuple<'_> {
fn from(value: IncompatiblePolicyVersion) -> Self {
(value.actual, value.minimum)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for IncompatiblePolicyVersion {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
actual: tuple.0,
minimum: tuple.1,
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for IncompatiblePolicyVersion {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "IncompatiblePolicyVersion(string,string)";
const SELECTOR: [u8; 4] = [247u8, 159u8, 228u8, 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::String as alloy_sol_types::SolType>::tokenize(
&self.actual,
),
<alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(
&self.minimum,
),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct InvalidPolicyID;
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<InvalidPolicyID> for UnderlyingRustTuple<'_> {
fn from(value: InvalidPolicyID) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for InvalidPolicyID {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for InvalidPolicyID {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "InvalidPolicyID()";
const SELECTOR: [u8; 4] = [118u8, 26u8, 240u8, 174u8];
#[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_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct InvalidShortString;
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<InvalidShortString> for UnderlyingRustTuple<'_> {
fn from(value: InvalidShortString) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for InvalidShortString {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for InvalidShortString {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "InvalidShortString()";
const SELECTOR: [u8; 4] = [179u8, 81u8, 43u8, 12u8];
#[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_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct InvalidVersionFormat {
#[allow(missing_docs)]
pub version: alloy::sol_types::private::String,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<InvalidVersionFormat> for UnderlyingRustTuple<'_> {
fn from(value: InvalidVersionFormat) -> Self {
(value.version,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for InvalidVersionFormat {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { version: tuple.0 }
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for InvalidVersionFormat {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "InvalidVersionFormat(string)";
const SELECTOR: [u8; 4] = [104u8, 119u8, 19u8, 140u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(
&self.version,
),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct InvalidVersionNumber {
#[allow(missing_docs)]
pub component: alloy::sol_types::private::String,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<InvalidVersionNumber> for UnderlyingRustTuple<'_> {
fn from(value: InvalidVersionNumber) -> Self {
(value.component,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for InvalidVersionNumber {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { component: tuple.0 }
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for InvalidVersionNumber {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "InvalidVersionNumber(string)";
const SELECTOR: [u8; 4] = [82u8, 164u8, 209u8, 232u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(
&self.component,
),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct OnlyPolicyClientOwner;
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<OnlyPolicyClientOwner> for UnderlyingRustTuple<'_> {
fn from(value: OnlyPolicyClientOwner) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for OnlyPolicyClientOwner {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for OnlyPolicyClientOwner {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "OnlyPolicyClientOwner()";
const SELECTOR: [u8; 4] = [131u8, 0u8, 201u8, 158u8];
#[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_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct PolicyNotSet;
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<PolicyNotSet> for UnderlyingRustTuple<'_> {
fn from(value: PolicyNotSet) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for PolicyNotSet {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for PolicyNotSet {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "PolicyNotSet()";
const SELECTOR: [u8; 4] = [50u8, 213u8, 61u8, 105u8];
#[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_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct StringTooLong {
#[allow(missing_docs)]
pub str: alloy::sol_types::private::String,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<StringTooLong> for UnderlyingRustTuple<'_> {
fn from(value: StringTooLong) -> Self {
(value.str,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for StringTooLong {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { str: tuple.0 }
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for StringTooLong {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "StringTooLong(string)";
const SELECTOR: [u8; 4] = [48u8, 90u8, 39u8, 169u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(
&self.str,
),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getNewtonPolicyTaskManagerCall;
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getNewtonPolicyTaskManagerReturn {
#[allow(missing_docs)]
pub _0: 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;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<getNewtonPolicyTaskManagerCall>
for UnderlyingRustTuple<'_> {
fn from(value: getNewtonPolicyTaskManagerCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getNewtonPolicyTaskManagerCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
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<getNewtonPolicyTaskManagerReturn>
for UnderlyingRustTuple<'_> {
fn from(value: getNewtonPolicyTaskManagerReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getNewtonPolicyTaskManagerReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getNewtonPolicyTaskManagerCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::Address;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getNewtonPolicyTaskManager()";
const SELECTOR: [u8; 4] = [45u8, 137u8, 91u8, 253u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: getNewtonPolicyTaskManagerReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: getNewtonPolicyTaskManagerReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getOwnerCall;
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getOwnerReturn {
#[allow(missing_docs)]
pub _0: 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;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<getOwnerCall> for UnderlyingRustTuple<'_> {
fn from(value: getOwnerCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getOwnerCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
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<getOwnerReturn> for UnderlyingRustTuple<'_> {
fn from(value: getOwnerReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getOwnerReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getOwnerCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::Address;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getOwner()";
const SELECTOR: [u8; 4] = [137u8, 61u8, 32u8, 232u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: getOwnerReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: getOwnerReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getPolicyAddressCall;
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getPolicyAddressReturn {
#[allow(missing_docs)]
pub _0: 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;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<getPolicyAddressCall>
for UnderlyingRustTuple<'_> {
fn from(value: getPolicyAddressCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getPolicyAddressCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
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<getPolicyAddressReturn>
for UnderlyingRustTuple<'_> {
fn from(value: getPolicyAddressReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getPolicyAddressReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getPolicyAddressCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::Address;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getPolicyAddress()";
const SELECTOR: [u8; 4] = [25u8, 46u8, 218u8, 131u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: getPolicyAddressReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: getPolicyAddressReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getPolicyConfigCall;
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getPolicyConfigReturn {
#[allow(missing_docs)]
pub _0: <INewtonPolicy::PolicyConfig 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)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<getPolicyConfigCall> for UnderlyingRustTuple<'_> {
fn from(value: getPolicyConfigCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getPolicyConfigCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (INewtonPolicy::PolicyConfig,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
<INewtonPolicy::PolicyConfig 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<getPolicyConfigReturn>
for UnderlyingRustTuple<'_> {
fn from(value: getPolicyConfigReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getPolicyConfigReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getPolicyConfigCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = <INewtonPolicy::PolicyConfig as alloy::sol_types::SolType>::RustType;
type ReturnTuple<'a> = (INewtonPolicy::PolicyConfig,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getPolicyConfig()";
const SELECTOR: [u8; 4] = [30u8, 54u8, 56u8, 91u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<INewtonPolicy::PolicyConfig as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: getPolicyConfigReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: getPolicyConfigReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getPolicyIdCall;
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getPolicyIdReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::FixedBytes<32>,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<getPolicyIdCall> for UnderlyingRustTuple<'_> {
fn from(value: getPolicyIdCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getPolicyIdCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,);
#[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<getPolicyIdReturn> for UnderlyingRustTuple<'_> {
fn from(value: getPolicyIdReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getPolicyIdReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getPolicyIdCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::FixedBytes<32>;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getPolicyId()";
const SELECTOR: [u8; 4] = [239u8, 123u8, 43u8, 226u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::FixedBytes<
32,
> as alloy_sol_types::SolType>::tokenize(ret),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: getPolicyIdReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: getPolicyIdReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct setPolicyCall {
#[allow(missing_docs)]
pub policyConfig: <INewtonPolicy::PolicyConfig as alloy::sol_types::SolType>::RustType,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct setPolicyReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::FixedBytes<32>,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (INewtonPolicy::PolicyConfig,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
<INewtonPolicy::PolicyConfig 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<setPolicyCall> for UnderlyingRustTuple<'_> {
fn from(value: setPolicyCall) -> Self {
(value.policyConfig,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for setPolicyCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { policyConfig: tuple.0 }
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,);
#[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<setPolicyReturn> for UnderlyingRustTuple<'_> {
fn from(value: setPolicyReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for setPolicyReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for setPolicyCall {
type Parameters<'a> = (INewtonPolicy::PolicyConfig,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::FixedBytes<32>;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "setPolicy((bytes,uint32))";
const SELECTOR: [u8; 4] = [234u8, 72u8, 247u8, 234u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<INewtonPolicy::PolicyConfig as alloy_sol_types::SolType>::tokenize(
&self.policyConfig,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::FixedBytes<
32,
> as alloy_sol_types::SolType>::tokenize(ret),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: setPolicyReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: setPolicyReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct setPolicyAddressCall {
#[allow(missing_docs)]
pub policy: alloy::sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct setPolicyAddressReturn {}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (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<setPolicyAddressCall>
for UnderlyingRustTuple<'_> {
fn from(value: setPolicyAddressCall) -> Self {
(value.policy,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for setPolicyAddressCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { policy: tuple.0 }
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<setPolicyAddressReturn>
for UnderlyingRustTuple<'_> {
fn from(value: setPolicyAddressReturn) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for setPolicyAddressReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
impl setPolicyAddressReturn {
fn _tokenize(
&self,
) -> <setPolicyAddressCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
()
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for setPolicyAddressCall {
type Parameters<'a> = (alloy::sol_types::sol_data::Address,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = setPolicyAddressReturn;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "setPolicyAddress(address)";
const SELECTOR: [u8; 4] = [41u8, 174u8, 117u8, 74u8];
#[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.policy,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
setPolicyAddressReturn::_tokenize(ret)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(Into::into)
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Into::into)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct setPolicyClientOwnerCall {
#[allow(missing_docs)]
pub policyClientOwner: alloy::sol_types::private::Address,
}
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct setPolicyClientOwnerReturn {}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (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<setPolicyClientOwnerCall>
for UnderlyingRustTuple<'_> {
fn from(value: setPolicyClientOwnerCall) -> Self {
(value.policyClientOwner,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for setPolicyClientOwnerCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { policyClientOwner: tuple.0 }
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<setPolicyClientOwnerReturn>
for UnderlyingRustTuple<'_> {
fn from(value: setPolicyClientOwnerReturn) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for setPolicyClientOwnerReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
impl setPolicyClientOwnerReturn {
fn _tokenize(
&self,
) -> <setPolicyClientOwnerCall as alloy_sol_types::SolCall>::ReturnToken<
'_,
> {
()
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for setPolicyClientOwnerCall {
type Parameters<'a> = (alloy::sol_types::sol_data::Address,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = setPolicyClientOwnerReturn;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "setPolicyClientOwner(address)";
const SELECTOR: [u8; 4] = [161u8, 75u8, 227u8, 179u8];
#[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.policyClientOwner,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
setPolicyClientOwnerReturn::_tokenize(ret)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(Into::into)
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Into::into)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct supportsInterfaceCall {
#[allow(missing_docs)]
pub interfaceId: alloy::sol_types::private::FixedBytes<4>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct supportsInterfaceReturn {
#[allow(missing_docs)]
pub _0: bool,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,);
#[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<supportsInterfaceCall>
for UnderlyingRustTuple<'_> {
fn from(value: supportsInterfaceCall) -> Self {
(value.interfaceId,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for supportsInterfaceCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { interfaceId: tuple.0 }
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (bool,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<supportsInterfaceReturn>
for UnderlyingRustTuple<'_> {
fn from(value: supportsInterfaceReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for supportsInterfaceReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for supportsInterfaceCall {
type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = bool;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "supportsInterface(bytes4)";
const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8];
#[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::FixedBytes<
4,
> as alloy_sol_types::SolType>::tokenize(&self.interfaceId),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Bool as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: supportsInterfaceReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: supportsInterfaceReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct versionCall;
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct versionReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::String,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<versionCall> for UnderlyingRustTuple<'_> {
fn from(value: versionCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for versionCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<versionReturn> for UnderlyingRustTuple<'_> {
fn from(value: versionReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for versionReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for versionCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::String;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "version()";
const SELECTOR: [u8; 4] = [84u8, 253u8, 77u8, 80u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: versionReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: versionReturn = r.into();
r._0
})
}
}
};
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive()]
pub enum NewtonPolicyClientCalls {
#[allow(missing_docs)]
getNewtonPolicyTaskManager(getNewtonPolicyTaskManagerCall),
#[allow(missing_docs)]
getOwner(getOwnerCall),
#[allow(missing_docs)]
getPolicyAddress(getPolicyAddressCall),
#[allow(missing_docs)]
getPolicyConfig(getPolicyConfigCall),
#[allow(missing_docs)]
getPolicyId(getPolicyIdCall),
#[allow(missing_docs)]
setPolicy(setPolicyCall),
#[allow(missing_docs)]
setPolicyAddress(setPolicyAddressCall),
#[allow(missing_docs)]
setPolicyClientOwner(setPolicyClientOwnerCall),
#[allow(missing_docs)]
supportsInterface(supportsInterfaceCall),
#[allow(missing_docs)]
version(versionCall),
}
impl NewtonPolicyClientCalls {
pub const SELECTORS: &'static [[u8; 4usize]] = &[
[1u8, 255u8, 201u8, 167u8],
[25u8, 46u8, 218u8, 131u8],
[30u8, 54u8, 56u8, 91u8],
[41u8, 174u8, 117u8, 74u8],
[45u8, 137u8, 91u8, 253u8],
[84u8, 253u8, 77u8, 80u8],
[137u8, 61u8, 32u8, 232u8],
[161u8, 75u8, 227u8, 179u8],
[234u8, 72u8, 247u8, 234u8],
[239u8, 123u8, 43u8, 226u8],
];
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(supportsInterface),
::core::stringify!(getPolicyAddress),
::core::stringify!(getPolicyConfig),
::core::stringify!(setPolicyAddress),
::core::stringify!(getNewtonPolicyTaskManager),
::core::stringify!(version),
::core::stringify!(getOwner),
::core::stringify!(setPolicyClientOwner),
::core::stringify!(setPolicy),
::core::stringify!(getPolicyId),
];
pub const SIGNATURES: &'static [&'static str] = &[
<supportsInterfaceCall as alloy_sol_types::SolCall>::SIGNATURE,
<getPolicyAddressCall as alloy_sol_types::SolCall>::SIGNATURE,
<getPolicyConfigCall as alloy_sol_types::SolCall>::SIGNATURE,
<setPolicyAddressCall as alloy_sol_types::SolCall>::SIGNATURE,
<getNewtonPolicyTaskManagerCall as alloy_sol_types::SolCall>::SIGNATURE,
<versionCall as alloy_sol_types::SolCall>::SIGNATURE,
<getOwnerCall as alloy_sol_types::SolCall>::SIGNATURE,
<setPolicyClientOwnerCall as alloy_sol_types::SolCall>::SIGNATURE,
<setPolicyCall as alloy_sol_types::SolCall>::SIGNATURE,
<getPolicyIdCall as alloy_sol_types::SolCall>::SIGNATURE,
];
#[inline]
pub fn signature_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
#[inline]
pub fn name_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for NewtonPolicyClientCalls {
const NAME: &'static str = "NewtonPolicyClientCalls";
const MIN_DATA_LENGTH: usize = 0usize;
const COUNT: usize = 10usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::getNewtonPolicyTaskManager(_) => {
<getNewtonPolicyTaskManagerCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::getOwner(_) => <getOwnerCall as alloy_sol_types::SolCall>::SELECTOR,
Self::getPolicyAddress(_) => {
<getPolicyAddressCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::getPolicyConfig(_) => {
<getPolicyConfigCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::getPolicyId(_) => {
<getPolicyIdCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::setPolicy(_) => {
<setPolicyCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::setPolicyAddress(_) => {
<setPolicyAddressCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::setPolicyClientOwner(_) => {
<setPolicyClientOwnerCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::supportsInterface(_) => {
<supportsInterfaceCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::version(_) => <versionCall as alloy_sol_types::SolCall>::SELECTOR,
}
}
#[inline]
fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
Self::SELECTORS.get(i).copied()
}
#[inline]
fn valid_selector(selector: [u8; 4]) -> bool {
Self::SELECTORS.binary_search(&selector).is_ok()
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls>] = &[
{
fn supportsInterface(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<supportsInterfaceCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientCalls::supportsInterface)
}
supportsInterface
},
{
fn getPolicyAddress(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getPolicyAddressCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientCalls::getPolicyAddress)
}
getPolicyAddress
},
{
fn getPolicyConfig(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getPolicyConfigCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientCalls::getPolicyConfig)
}
getPolicyConfig
},
{
fn setPolicyAddress(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<setPolicyAddressCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientCalls::setPolicyAddress)
}
setPolicyAddress
},
{
fn getNewtonPolicyTaskManager(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getNewtonPolicyTaskManagerCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientCalls::getNewtonPolicyTaskManager)
}
getNewtonPolicyTaskManager
},
{
fn version(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<versionCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(NewtonPolicyClientCalls::version)
}
version
},
{
fn getOwner(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getOwnerCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(NewtonPolicyClientCalls::getOwner)
}
getOwner
},
{
fn setPolicyClientOwner(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<setPolicyClientOwnerCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientCalls::setPolicyClientOwner)
}
setPolicyClientOwner
},
{
fn setPolicy(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<setPolicyCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(NewtonPolicyClientCalls::setPolicy)
}
setPolicy
},
{
fn getPolicyId(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getPolicyIdCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientCalls::getPolicyId)
}
getPolicyId
},
];
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
return Err(
alloy_sol_types::Error::unknown_selector(
<Self as alloy_sol_types::SolInterface>::NAME,
selector,
),
);
};
DECODE_SHIMS[idx](data)
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw_validate(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_VALIDATE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls>] = &[
{
fn supportsInterface(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<supportsInterfaceCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientCalls::supportsInterface)
}
supportsInterface
},
{
fn getPolicyAddress(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getPolicyAddressCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientCalls::getPolicyAddress)
}
getPolicyAddress
},
{
fn getPolicyConfig(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getPolicyConfigCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientCalls::getPolicyConfig)
}
getPolicyConfig
},
{
fn setPolicyAddress(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<setPolicyAddressCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientCalls::setPolicyAddress)
}
setPolicyAddress
},
{
fn getNewtonPolicyTaskManager(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getNewtonPolicyTaskManagerCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientCalls::getNewtonPolicyTaskManager)
}
getNewtonPolicyTaskManager
},
{
fn version(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<versionCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientCalls::version)
}
version
},
{
fn getOwner(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getOwnerCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientCalls::getOwner)
}
getOwner
},
{
fn setPolicyClientOwner(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<setPolicyClientOwnerCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientCalls::setPolicyClientOwner)
}
setPolicyClientOwner
},
{
fn setPolicy(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<setPolicyCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientCalls::setPolicy)
}
setPolicy
},
{
fn getPolicyId(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getPolicyIdCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientCalls::getPolicyId)
}
getPolicyId
},
];
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
return Err(
alloy_sol_types::Error::unknown_selector(
<Self as alloy_sol_types::SolInterface>::NAME,
selector,
),
);
};
DECODE_VALIDATE_SHIMS[idx](data)
}
#[inline]
fn abi_encoded_size(&self) -> usize {
match self {
Self::getNewtonPolicyTaskManager(inner) => {
<getNewtonPolicyTaskManagerCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::getOwner(inner) => {
<getOwnerCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::getPolicyAddress(inner) => {
<getPolicyAddressCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::getPolicyConfig(inner) => {
<getPolicyConfigCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::getPolicyId(inner) => {
<getPolicyIdCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::setPolicy(inner) => {
<setPolicyCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::setPolicyAddress(inner) => {
<setPolicyAddressCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::setPolicyClientOwner(inner) => {
<setPolicyClientOwnerCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::supportsInterface(inner) => {
<supportsInterfaceCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::version(inner) => {
<versionCall 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::getNewtonPolicyTaskManager(inner) => {
<getNewtonPolicyTaskManagerCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::getOwner(inner) => {
<getOwnerCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::getPolicyAddress(inner) => {
<getPolicyAddressCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::getPolicyConfig(inner) => {
<getPolicyConfigCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::getPolicyId(inner) => {
<getPolicyIdCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::setPolicy(inner) => {
<setPolicyCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::setPolicyAddress(inner) => {
<setPolicyAddressCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::setPolicyClientOwner(inner) => {
<setPolicyClientOwnerCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::supportsInterface(inner) => {
<supportsInterfaceCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::version(inner) => {
<versionCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
}
}
}
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Debug, PartialEq, Eq, Hash)]
pub enum NewtonPolicyClientErrors {
#[allow(missing_docs)]
IncompatiblePolicyVersion(IncompatiblePolicyVersion),
#[allow(missing_docs)]
InvalidPolicyID(InvalidPolicyID),
#[allow(missing_docs)]
InvalidShortString(InvalidShortString),
#[allow(missing_docs)]
InvalidVersionFormat(InvalidVersionFormat),
#[allow(missing_docs)]
InvalidVersionNumber(InvalidVersionNumber),
#[allow(missing_docs)]
OnlyPolicyClientOwner(OnlyPolicyClientOwner),
#[allow(missing_docs)]
PolicyNotSet(PolicyNotSet),
#[allow(missing_docs)]
StringTooLong(StringTooLong),
}
impl NewtonPolicyClientErrors {
pub const SELECTORS: &'static [[u8; 4usize]] = &[
[48u8, 90u8, 39u8, 169u8],
[50u8, 213u8, 61u8, 105u8],
[82u8, 164u8, 209u8, 232u8],
[104u8, 119u8, 19u8, 140u8],
[118u8, 26u8, 240u8, 174u8],
[131u8, 0u8, 201u8, 158u8],
[179u8, 81u8, 43u8, 12u8],
[247u8, 159u8, 228u8, 53u8],
];
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(StringTooLong),
::core::stringify!(PolicyNotSet),
::core::stringify!(InvalidVersionNumber),
::core::stringify!(InvalidVersionFormat),
::core::stringify!(InvalidPolicyID),
::core::stringify!(OnlyPolicyClientOwner),
::core::stringify!(InvalidShortString),
::core::stringify!(IncompatiblePolicyVersion),
];
pub const SIGNATURES: &'static [&'static str] = &[
<StringTooLong as alloy_sol_types::SolError>::SIGNATURE,
<PolicyNotSet as alloy_sol_types::SolError>::SIGNATURE,
<InvalidVersionNumber as alloy_sol_types::SolError>::SIGNATURE,
<InvalidVersionFormat as alloy_sol_types::SolError>::SIGNATURE,
<InvalidPolicyID as alloy_sol_types::SolError>::SIGNATURE,
<OnlyPolicyClientOwner as alloy_sol_types::SolError>::SIGNATURE,
<InvalidShortString as alloy_sol_types::SolError>::SIGNATURE,
<IncompatiblePolicyVersion as alloy_sol_types::SolError>::SIGNATURE,
];
#[inline]
pub fn signature_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
#[inline]
pub fn name_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for NewtonPolicyClientErrors {
const NAME: &'static str = "NewtonPolicyClientErrors";
const MIN_DATA_LENGTH: usize = 0usize;
const COUNT: usize = 8usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::IncompatiblePolicyVersion(_) => {
<IncompatiblePolicyVersion as alloy_sol_types::SolError>::SELECTOR
}
Self::InvalidPolicyID(_) => {
<InvalidPolicyID as alloy_sol_types::SolError>::SELECTOR
}
Self::InvalidShortString(_) => {
<InvalidShortString as alloy_sol_types::SolError>::SELECTOR
}
Self::InvalidVersionFormat(_) => {
<InvalidVersionFormat as alloy_sol_types::SolError>::SELECTOR
}
Self::InvalidVersionNumber(_) => {
<InvalidVersionNumber as alloy_sol_types::SolError>::SELECTOR
}
Self::OnlyPolicyClientOwner(_) => {
<OnlyPolicyClientOwner as alloy_sol_types::SolError>::SELECTOR
}
Self::PolicyNotSet(_) => {
<PolicyNotSet as alloy_sol_types::SolError>::SELECTOR
}
Self::StringTooLong(_) => {
<StringTooLong as alloy_sol_types::SolError>::SELECTOR
}
}
}
#[inline]
fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
Self::SELECTORS.get(i).copied()
}
#[inline]
fn valid_selector(selector: [u8; 4]) -> bool {
Self::SELECTORS.binary_search(&selector).is_ok()
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors>] = &[
{
fn StringTooLong(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<StringTooLong as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientErrors::StringTooLong)
}
StringTooLong
},
{
fn PolicyNotSet(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<PolicyNotSet as alloy_sol_types::SolError>::abi_decode_raw(data)
.map(NewtonPolicyClientErrors::PolicyNotSet)
}
PolicyNotSet
},
{
fn InvalidVersionNumber(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<InvalidVersionNumber as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientErrors::InvalidVersionNumber)
}
InvalidVersionNumber
},
{
fn InvalidVersionFormat(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<InvalidVersionFormat as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientErrors::InvalidVersionFormat)
}
InvalidVersionFormat
},
{
fn InvalidPolicyID(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<InvalidPolicyID as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientErrors::InvalidPolicyID)
}
InvalidPolicyID
},
{
fn OnlyPolicyClientOwner(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<OnlyPolicyClientOwner as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientErrors::OnlyPolicyClientOwner)
}
OnlyPolicyClientOwner
},
{
fn InvalidShortString(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<InvalidShortString as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientErrors::InvalidShortString)
}
InvalidShortString
},
{
fn IncompatiblePolicyVersion(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<IncompatiblePolicyVersion as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(NewtonPolicyClientErrors::IncompatiblePolicyVersion)
}
IncompatiblePolicyVersion
},
];
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
return Err(
alloy_sol_types::Error::unknown_selector(
<Self as alloy_sol_types::SolInterface>::NAME,
selector,
),
);
};
DECODE_SHIMS[idx](data)
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw_validate(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_VALIDATE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors>] = &[
{
fn StringTooLong(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<StringTooLong as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientErrors::StringTooLong)
}
StringTooLong
},
{
fn PolicyNotSet(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<PolicyNotSet as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientErrors::PolicyNotSet)
}
PolicyNotSet
},
{
fn InvalidVersionNumber(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<InvalidVersionNumber as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientErrors::InvalidVersionNumber)
}
InvalidVersionNumber
},
{
fn InvalidVersionFormat(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<InvalidVersionFormat as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientErrors::InvalidVersionFormat)
}
InvalidVersionFormat
},
{
fn InvalidPolicyID(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<InvalidPolicyID as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientErrors::InvalidPolicyID)
}
InvalidPolicyID
},
{
fn OnlyPolicyClientOwner(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<OnlyPolicyClientOwner as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientErrors::OnlyPolicyClientOwner)
}
OnlyPolicyClientOwner
},
{
fn InvalidShortString(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<InvalidShortString as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientErrors::InvalidShortString)
}
InvalidShortString
},
{
fn IncompatiblePolicyVersion(
data: &[u8],
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<IncompatiblePolicyVersion as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(NewtonPolicyClientErrors::IncompatiblePolicyVersion)
}
IncompatiblePolicyVersion
},
];
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
return Err(
alloy_sol_types::Error::unknown_selector(
<Self as alloy_sol_types::SolInterface>::NAME,
selector,
),
);
};
DECODE_VALIDATE_SHIMS[idx](data)
}
#[inline]
fn abi_encoded_size(&self) -> usize {
match self {
Self::IncompatiblePolicyVersion(inner) => {
<IncompatiblePolicyVersion as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::InvalidPolicyID(inner) => {
<InvalidPolicyID as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::InvalidShortString(inner) => {
<InvalidShortString as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::InvalidVersionFormat(inner) => {
<InvalidVersionFormat as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::InvalidVersionNumber(inner) => {
<InvalidVersionNumber as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::OnlyPolicyClientOwner(inner) => {
<OnlyPolicyClientOwner as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::PolicyNotSet(inner) => {
<PolicyNotSet as alloy_sol_types::SolError>::abi_encoded_size(inner)
}
Self::StringTooLong(inner) => {
<StringTooLong as alloy_sol_types::SolError>::abi_encoded_size(inner)
}
}
}
#[inline]
fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
match self {
Self::IncompatiblePolicyVersion(inner) => {
<IncompatiblePolicyVersion as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::InvalidPolicyID(inner) => {
<InvalidPolicyID as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::InvalidShortString(inner) => {
<InvalidShortString as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::InvalidVersionFormat(inner) => {
<InvalidVersionFormat as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::InvalidVersionNumber(inner) => {
<InvalidVersionNumber as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::OnlyPolicyClientOwner(inner) => {
<OnlyPolicyClientOwner as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::PolicyNotSet(inner) => {
<PolicyNotSet as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::StringTooLong(inner) => {
<StringTooLong as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
}
}
}
use alloy::contract as alloy_contract;
#[inline]
pub const fn new<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(
address: alloy_sol_types::private::Address,
__provider: P,
) -> NewtonPolicyClientInstance<P, N> {
NewtonPolicyClientInstance::<P, N>::new(address, __provider)
}
#[inline]
pub fn deploy<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(
__provider: P,
) -> impl ::core::future::Future<
Output = alloy_contract::Result<NewtonPolicyClientInstance<P, N>>,
> {
NewtonPolicyClientInstance::<P, N>::deploy(__provider)
}
#[inline]
pub fn deploy_builder<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
NewtonPolicyClientInstance::<P, N>::deploy_builder(__provider)
}
#[derive(Clone)]
pub struct NewtonPolicyClientInstance<P, N = alloy_contract::private::Ethereum> {
address: alloy_sol_types::private::Address,
provider: P,
_network: ::core::marker::PhantomData<N>,
}
#[automatically_derived]
impl<P, N> ::core::fmt::Debug for NewtonPolicyClientInstance<P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("NewtonPolicyClientInstance").field(&self.address).finish()
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> NewtonPolicyClientInstance<P, N> {
#[inline]
pub const fn new(
address: alloy_sol_types::private::Address,
__provider: P,
) -> Self {
Self {
address,
provider: __provider,
_network: ::core::marker::PhantomData,
}
}
#[inline]
pub async fn deploy(
__provider: P,
) -> alloy_contract::Result<NewtonPolicyClientInstance<P, N>> {
let call_builder = Self::deploy_builder(__provider);
let contract_address = call_builder.deploy().await?;
Ok(Self::new(contract_address, call_builder.provider))
}
#[inline]
pub fn deploy_builder(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
alloy_contract::RawCallBuilder::new_raw_deploy(
__provider,
::core::clone::Clone::clone(&BYTECODE),
)
}
#[inline]
pub const fn address(&self) -> &alloy_sol_types::private::Address {
&self.address
}
#[inline]
pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
self.address = address;
}
pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
self.set_address(address);
self
}
#[inline]
pub const fn provider(&self) -> &P {
&self.provider
}
}
impl<P: ::core::clone::Clone, N> NewtonPolicyClientInstance<&P, N> {
#[inline]
pub fn with_cloned_provider(self) -> NewtonPolicyClientInstance<P, N> {
NewtonPolicyClientInstance {
address: self.address,
provider: ::core::clone::Clone::clone(&self.provider),
_network: ::core::marker::PhantomData,
}
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> NewtonPolicyClientInstance<P, N> {
pub fn call_builder<C: alloy_sol_types::SolCall>(
&self,
call: &C,
) -> alloy_contract::SolCallBuilder<&P, C, N> {
alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
}
pub fn getNewtonPolicyTaskManager(
&self,
) -> alloy_contract::SolCallBuilder<&P, getNewtonPolicyTaskManagerCall, N> {
self.call_builder(&getNewtonPolicyTaskManagerCall)
}
pub fn getOwner(&self) -> alloy_contract::SolCallBuilder<&P, getOwnerCall, N> {
self.call_builder(&getOwnerCall)
}
pub fn getPolicyAddress(
&self,
) -> alloy_contract::SolCallBuilder<&P, getPolicyAddressCall, N> {
self.call_builder(&getPolicyAddressCall)
}
pub fn getPolicyConfig(
&self,
) -> alloy_contract::SolCallBuilder<&P, getPolicyConfigCall, N> {
self.call_builder(&getPolicyConfigCall)
}
pub fn getPolicyId(
&self,
) -> alloy_contract::SolCallBuilder<&P, getPolicyIdCall, N> {
self.call_builder(&getPolicyIdCall)
}
pub fn setPolicy(
&self,
policyConfig: <INewtonPolicy::PolicyConfig as alloy::sol_types::SolType>::RustType,
) -> alloy_contract::SolCallBuilder<&P, setPolicyCall, N> {
self.call_builder(&setPolicyCall { policyConfig })
}
pub fn setPolicyAddress(
&self,
policy: alloy::sol_types::private::Address,
) -> alloy_contract::SolCallBuilder<&P, setPolicyAddressCall, N> {
self.call_builder(&setPolicyAddressCall { policy })
}
pub fn setPolicyClientOwner(
&self,
policyClientOwner: alloy::sol_types::private::Address,
) -> alloy_contract::SolCallBuilder<&P, setPolicyClientOwnerCall, N> {
self.call_builder(
&setPolicyClientOwnerCall {
policyClientOwner,
},
)
}
pub fn supportsInterface(
&self,
interfaceId: alloy::sol_types::private::FixedBytes<4>,
) -> alloy_contract::SolCallBuilder<&P, supportsInterfaceCall, N> {
self.call_builder(
&supportsInterfaceCall {
interfaceId,
},
)
}
pub fn version(&self) -> alloy_contract::SolCallBuilder<&P, versionCall, N> {
self.call_builder(&versionCall)
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> NewtonPolicyClientInstance<P, N> {
pub fn event_filter<E: alloy_sol_types::SolEvent>(
&self,
) -> alloy_contract::Event<&P, E, N> {
alloy_contract::Event::new_sol(&self.provider, &self.address)
}
}
}