#[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 INewtonPolicyClient {
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 PolicySpec {
#[allow(missing_docs)]
pub policy: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub config: <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> = (
alloy::sol_types::sol_data::Address,
INewtonPolicy::PolicyConfig,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
<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<PolicySpec> for UnderlyingRustTuple<'_> {
fn from(value: PolicySpec) -> Self {
(value.policy, value.config)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for PolicySpec {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
policy: tuple.0,
config: tuple.1,
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolValue for PolicySpec {
type SolType = Self;
}
#[automatically_derived]
impl alloy_sol_types::private::SolTypeValue<Self> for PolicySpec {
#[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.policy,
),
<INewtonPolicy::PolicyConfig as alloy_sol_types::SolType>::tokenize(
&self.config,
),
)
}
#[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 PolicySpec {
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 PolicySpec {
const NAME: &'static str = "PolicySpec";
#[inline]
fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> {
alloy_sol_types::private::Cow::Borrowed(
"PolicySpec(address policy,PolicyConfig config)",
)
}
#[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(
<INewtonPolicy::PolicyConfig as alloy_sol_types::SolStruct>::eip712_root_type(),
);
components
.extend(
<INewtonPolicy::PolicyConfig 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.policy,
)
.0,
<INewtonPolicy::PolicyConfig as alloy_sol_types::SolType>::eip712_data_word(
&self.config,
)
.0,
]
.concat()
}
}
#[automatically_derived]
impl alloy_sol_types::EventTopic for PolicySpec {
#[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.policy,
)
+ <INewtonPolicy::PolicyConfig as alloy_sol_types::EventTopic>::topic_preimage_length(
&rust.config,
)
}
#[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.policy,
out,
);
<INewtonPolicy::PolicyConfig as alloy_sol_types::EventTopic>::encode_topic_preimage(
&rust.config,
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,
) -> INewtonPolicyClientInstance<P, N> {
INewtonPolicyClientInstance::<P, N>::new(address, __provider)
}
#[derive(Clone)]
pub struct INewtonPolicyClientInstance<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 INewtonPolicyClientInstance<P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("INewtonPolicyClientInstance").field(&self.address).finish()
}
}
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> INewtonPolicyClientInstance<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> INewtonPolicyClientInstance<&P, N> {
#[inline]
pub fn with_cloned_provider(self) -> INewtonPolicyClientInstance<P, N> {
INewtonPolicyClientInstance {
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,
> INewtonPolicyClientInstance<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,
> INewtonPolicyClientInstance<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 EmptyPolicySet;
#[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<EmptyPolicySet> for UnderlyingRustTuple<'_> {
fn from(value: EmptyPolicySet) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for EmptyPolicySet {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for EmptyPolicySet {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "EmptyPolicySet()";
const SELECTOR: [u8; 4] = [88u8, 160u8, 208u8, 239u8];
#[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::abi_decode_raw_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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::abi_decode_raw_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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::abi_decode_raw_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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::abi_decode_raw_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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 PolicyFactoryNotSet;
#[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<PolicyFactoryNotSet> for UnderlyingRustTuple<'_> {
fn from(value: PolicyFactoryNotSet) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for PolicyFactoryNotSet {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for PolicyFactoryNotSet {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "PolicyFactoryNotSet()";
const SELECTOR: [u8; 4] = [197u8, 243u8, 33u8, 38u8];
#[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::abi_decode_raw_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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 PolicyNotRegistered {
#[allow(missing_docs)]
pub policy: 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> = (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<PolicyNotRegistered> for UnderlyingRustTuple<'_> {
fn from(value: PolicyNotRegistered) -> Self {
(value.policy,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for PolicyNotRegistered {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { policy: tuple.0 }
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for PolicyNotRegistered {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "PolicyNotRegistered(address)";
const SELECTOR: [u8; 4] = [233u8, 194u8, 66u8, 245u8];
#[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 abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
Self::abi_decode_raw_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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 PolicyParamsTooLarge {
#[allow(missing_docs)]
pub index: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub size: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
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,
);
#[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<PolicyParamsTooLarge> for UnderlyingRustTuple<'_> {
fn from(value: PolicyParamsTooLarge) -> Self {
(value.index, value.size)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for PolicyParamsTooLarge {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
index: tuple.0,
size: tuple.1,
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for PolicyParamsTooLarge {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "PolicyParamsTooLarge(uint256,uint256)";
const SELECTOR: [u8; 4] = [222u8, 63u8, 112u8, 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::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.index),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.size),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
Self::abi_decode_raw_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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::abi_decode_raw_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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 TooManyPolicies {
#[allow(missing_docs)]
pub given: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub max: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
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,
);
#[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<TooManyPolicies> for UnderlyingRustTuple<'_> {
fn from(value: TooManyPolicies) -> Self {
(value.given, value.max)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for TooManyPolicies {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
given: tuple.0,
max: tuple.1,
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for TooManyPolicies {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "TooManyPolicies(uint256,uint256)";
const SELECTOR: [u8; 4] = [217u8, 154u8, 107u8, 237u8];
#[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::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.given),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.max),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
Self::abi_decode_raw_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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 ZeroExpireAfter {
#[allow(missing_docs)]
pub index: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
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<ZeroExpireAfter> for UnderlyingRustTuple<'_> {
fn from(value: ZeroExpireAfter) -> Self {
(value.index,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for ZeroExpireAfter {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { index: tuple.0 }
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for ZeroExpireAfter {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "ZeroExpireAfter(uint256)";
const SELECTOR: [u8; 4] = [187u8, 59u8, 168u8, 116u8];
#[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::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.index),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
Self::abi_decode_raw_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct PoliciesUpdated {
#[allow(missing_docs)]
pub previousPolicyId: alloy::sol_types::private::FixedBytes<32>,
#[allow(missing_docs)]
pub newPolicyId: alloy::sol_types::private::FixedBytes<32>,
#[allow(missing_docs)]
pub revision: u64,
#[allow(missing_docs)]
pub policies: alloy::sol_types::private::Vec<
<INewtonPolicyClient::PolicySpec 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;
#[automatically_derived]
impl alloy_sol_types::SolEvent for PoliciesUpdated {
type DataTuple<'a> = (
alloy::sol_types::sol_data::Uint<64>,
alloy::sol_types::sol_data::Array<INewtonPolicyClient::PolicySpec>,
);
type DataToken<'a> = <Self::DataTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (
alloy_sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::FixedBytes<32>,
);
const SIGNATURE: &'static str = "PoliciesUpdated(bytes32,bytes32,uint64,(address,(bytes,uint32))[])";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
130u8, 120u8, 238u8, 238u8, 170u8, 26u8, 84u8, 25u8, 209u8, 170u8, 127u8,
22u8, 233u8, 191u8, 85u8, 57u8, 247u8, 131u8, 190u8, 154u8, 220u8, 87u8,
103u8, 232u8, 214u8, 231u8, 237u8, 43u8, 29u8, 16u8, 201u8, 148u8,
]);
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 {
previousPolicyId: topics.1,
newPolicyId: topics.2,
revision: data.0,
policies: 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::Uint<
64,
> as alloy_sol_types::SolType>::tokenize(&self.revision),
<alloy::sol_types::sol_data::Array<
INewtonPolicyClient::PolicySpec,
> as alloy_sol_types::SolType>::tokenize(&self.policies),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(
Self::SIGNATURE_HASH.into(),
self.previousPolicyId.clone(),
self.newPolicyId.clone(),
)
}
#[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,
);
out[1usize] = <alloy::sol_types::sol_data::FixedBytes<
32,
> as alloy_sol_types::EventTopic>::encode_topic(&self.previousPolicyId);
out[2usize] = <alloy::sol_types::sol_data::FixedBytes<
32,
> as alloy_sol_types::EventTopic>::encode_topic(&self.newPolicyId);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for PoliciesUpdated {
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<&PoliciesUpdated> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &PoliciesUpdated) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct PolicyClientInitialized {
#[allow(missing_docs)]
pub taskManager: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub owner: 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 PolicyClientInitialized {
type DataTuple<'a> = ();
type DataToken<'a> = <Self::DataTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (
alloy_sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
);
const SIGNATURE: &'static str = "PolicyClientInitialized(address,address)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
21u8, 86u8, 49u8, 248u8, 148u8, 167u8, 137u8, 21u8, 202u8, 103u8, 243u8,
68u8, 8u8, 158u8, 203u8, 39u8, 141u8, 237u8, 243u8, 253u8, 181u8, 31u8,
119u8, 46u8, 130u8, 187u8, 10u8, 90u8, 190u8, 18u8, 54u8, 67u8,
]);
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 {
taskManager: topics.1,
owner: topics.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<'_> {
()
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(
Self::SIGNATURE_HASH.into(),
self.taskManager.clone(),
self.owner.clone(),
)
}
#[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,
);
out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.taskManager,
);
out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.owner,
);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for PolicyClientInitialized {
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<&PolicyClientInitialized> for alloy_sol_types::private::LogData {
#[inline]
fn from(
this: &PolicyClientInitialized,
) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct PolicyClientOwnerUpdated {
#[allow(missing_docs)]
pub previousOwner: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub newOwner: 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 PolicyClientOwnerUpdated {
type DataTuple<'a> = ();
type DataToken<'a> = <Self::DataTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (
alloy_sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
);
const SIGNATURE: &'static str = "PolicyClientOwnerUpdated(address,address)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
251u8, 2u8, 113u8, 25u8, 50u8, 222u8, 79u8, 9u8, 25u8, 166u8, 246u8,
49u8, 154u8, 5u8, 169u8, 150u8, 209u8, 178u8, 14u8, 114u8, 71u8, 79u8,
193u8, 238u8, 59u8, 248u8, 193u8, 149u8, 121u8, 52u8, 11u8, 125u8,
]);
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 {
previousOwner: topics.1,
newOwner: topics.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<'_> {
()
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(
Self::SIGNATURE_HASH.into(),
self.previousOwner.clone(),
self.newOwner.clone(),
)
}
#[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,
);
out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.previousOwner,
);
out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.newOwner,
);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for PolicyClientOwnerUpdated {
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<&PolicyClientOwnerUpdated> for alloy_sol_types::private::LogData {
#[inline]
fn from(
this: &PolicyClientOwnerUpdated,
) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct 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_with_config(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_with_config(
data,
config,
)
.map(|r| {
let r: getNewtonPolicyTaskManagerReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
Self::abi_decode_returns_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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_with_config(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_with_config(
data,
config,
)
.map(|r| {
let r: getOwnerReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
Self::abi_decode_returns_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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 getPoliciesCall;
#[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 getPoliciesReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::Vec<
<INewtonPolicyClient::PolicySpec 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<getPoliciesCall> for UnderlyingRustTuple<'_> {
fn from(value: getPoliciesCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getPoliciesCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Array<INewtonPolicyClient::PolicySpec>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Vec<
<INewtonPolicyClient::PolicySpec 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<getPoliciesReturn> for UnderlyingRustTuple<'_> {
fn from(value: getPoliciesReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getPoliciesReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getPoliciesCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::Vec<
<INewtonPolicyClient::PolicySpec as alloy::sol_types::SolType>::RustType,
>;
type ReturnTuple<'a> = (
alloy::sol_types::sol_data::Array<INewtonPolicyClient::PolicySpec>,
);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getPolicies()";
const SELECTOR: [u8; 4] = [59u8, 4u8, 246u8, 241u8];
#[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::Array<
INewtonPolicyClient::PolicySpec,
> 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: getPoliciesReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_with_config(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_with_config(
data,
config,
)
.map(|r| {
let r: getPoliciesReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
Self::abi_decode_returns_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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_with_config(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_with_config(
data,
config,
)
.map(|r| {
let r: getPolicyIdReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
Self::abi_decode_returns_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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 getPolicySetSnapshotCall;
#[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 getPolicySetSnapshotReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::FixedBytes<32>,
#[allow(missing_docs)]
pub _1: u64,
#[allow(missing_docs)]
pub _2: alloy::sol_types::private::Vec<
<INewtonPolicyClient::PolicySpec 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<getPolicySetSnapshotCall>
for UnderlyingRustTuple<'_> {
fn from(value: getPolicySetSnapshotCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getPolicySetSnapshotCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Uint<64>,
alloy::sol_types::sol_data::Array<INewtonPolicyClient::PolicySpec>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::FixedBytes<32>,
u64,
alloy::sol_types::private::Vec<
<INewtonPolicyClient::PolicySpec 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<getPolicySetSnapshotReturn>
for UnderlyingRustTuple<'_> {
fn from(value: getPolicySetSnapshotReturn) -> Self {
(value._0, value._1, value._2)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getPolicySetSnapshotReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
_0: tuple.0,
_1: tuple.1,
_2: tuple.2,
}
}
}
}
impl getPolicySetSnapshotReturn {
fn _tokenize(
&self,
) -> <getPolicySetSnapshotCall as alloy_sol_types::SolCall>::ReturnToken<
'_,
> {
(
<alloy::sol_types::sol_data::FixedBytes<
32,
> as alloy_sol_types::SolType>::tokenize(&self._0),
<alloy::sol_types::sol_data::Uint<
64,
> as alloy_sol_types::SolType>::tokenize(&self._1),
<alloy::sol_types::sol_data::Array<
INewtonPolicyClient::PolicySpec,
> as alloy_sol_types::SolType>::tokenize(&self._2),
)
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getPolicySetSnapshotCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = getPolicySetSnapshotReturn;
type ReturnTuple<'a> = (
alloy::sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Uint<64>,
alloy::sol_types::sol_data::Array<INewtonPolicyClient::PolicySpec>,
);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getPolicySetSnapshot()";
const SELECTOR: [u8; 4] = [201u8, 111u8, 137u8, 54u8];
#[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<'_> {
getPolicySetSnapshotReturn::_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_with_config(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_with_config(
data,
config,
)
.map(Into::into)
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
Self::abi_decode_returns_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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 policyRevisionCall;
#[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 policyRevisionReturn {
#[allow(missing_docs)]
pub _0: u64,
}
#[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<policyRevisionCall> for UnderlyingRustTuple<'_> {
fn from(value: policyRevisionCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for policyRevisionCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<64>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (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<policyRevisionReturn>
for UnderlyingRustTuple<'_> {
fn from(value: policyRevisionReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for policyRevisionReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for policyRevisionCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = u64;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<64>,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "policyRevision()";
const SELECTOR: [u8; 4] = [38u8, 167u8, 216u8, 5u8];
#[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::Uint<
64,
> 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: policyRevisionReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_with_config(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_with_config(
data,
config,
)
.map(|r| {
let r: policyRevisionReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
Self::abi_decode_returns_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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 setPoliciesCall {
#[allow(missing_docs)]
pub policies: alloy::sol_types::private::Vec<
<INewtonPolicyClient::PolicySpec 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 setPoliciesReturn {
#[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> = (
alloy::sol_types::sol_data::Array<INewtonPolicyClient::PolicySpec>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Vec<
<INewtonPolicyClient::PolicySpec 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<setPoliciesCall> for UnderlyingRustTuple<'_> {
fn from(value: setPoliciesCall) -> Self {
(value.policies,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for setPoliciesCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { policies: 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<setPoliciesReturn> for UnderlyingRustTuple<'_> {
fn from(value: setPoliciesReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for setPoliciesReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for setPoliciesCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Array<INewtonPolicyClient::PolicySpec>,
);
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 = "setPolicies((address,(bytes,uint32))[])";
const SELECTOR: [u8; 4] = [105u8, 125u8, 227u8, 227u8];
#[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::Array<
INewtonPolicyClient::PolicySpec,
> as alloy_sol_types::SolType>::tokenize(&self.policies),
)
}
#[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: setPoliciesReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_with_config(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_with_config(
data,
config,
)
.map(|r| {
let r: setPoliciesReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
Self::abi_decode_returns_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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_with_config(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_with_config(
data,
config,
)
.map(Into::into)
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
Self::abi_decode_returns_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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_with_config(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_with_config(
data,
config,
)
.map(|r| {
let r: supportsInterfaceReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
Self::abi_decode_returns_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[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_with_config(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_with_config(
data,
config,
)
.map(|r| {
let r: versionReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
Self::abi_decode_returns_with_config(
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
}
};
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Debug, PartialEq, Eq, Hash)]
pub enum NewtonPolicyClientCalls {
#[allow(missing_docs)]
getNewtonPolicyTaskManager(getNewtonPolicyTaskManagerCall),
#[allow(missing_docs)]
getOwner(getOwnerCall),
#[allow(missing_docs)]
getPolicies(getPoliciesCall),
#[allow(missing_docs)]
getPolicyId(getPolicyIdCall),
#[allow(missing_docs)]
getPolicySetSnapshot(getPolicySetSnapshotCall),
#[allow(missing_docs)]
policyRevision(policyRevisionCall),
#[allow(missing_docs)]
setPolicies(setPoliciesCall),
#[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],
[38u8, 167u8, 216u8, 5u8],
[45u8, 137u8, 91u8, 253u8],
[59u8, 4u8, 246u8, 241u8],
[84u8, 253u8, 77u8, 80u8],
[105u8, 125u8, 227u8, 227u8],
[137u8, 61u8, 32u8, 232u8],
[161u8, 75u8, 227u8, 179u8],
[201u8, 111u8, 137u8, 54u8],
[239u8, 123u8, 43u8, 226u8],
];
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(supportsInterface),
::core::stringify!(policyRevision),
::core::stringify!(getNewtonPolicyTaskManager),
::core::stringify!(getPolicies),
::core::stringify!(version),
::core::stringify!(setPolicies),
::core::stringify!(getOwner),
::core::stringify!(setPolicyClientOwner),
::core::stringify!(getPolicySetSnapshot),
::core::stringify!(getPolicyId),
];
pub const SIGNATURES: &'static [&'static str] = &[
<supportsInterfaceCall as alloy_sol_types::SolCall>::SIGNATURE,
<policyRevisionCall as alloy_sol_types::SolCall>::SIGNATURE,
<getNewtonPolicyTaskManagerCall as alloy_sol_types::SolCall>::SIGNATURE,
<getPoliciesCall as alloy_sol_types::SolCall>::SIGNATURE,
<versionCall as alloy_sol_types::SolCall>::SIGNATURE,
<setPoliciesCall as alloy_sol_types::SolCall>::SIGNATURE,
<getOwnerCall as alloy_sol_types::SolCall>::SIGNATURE,
<setPolicyClientOwnerCall as alloy_sol_types::SolCall>::SIGNATURE,
<getPolicySetSnapshotCall 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::getPolicies(_) => {
<getPoliciesCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::getPolicyId(_) => {
<getPolicyIdCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::getPolicySetSnapshot(_) => {
<getPolicySetSnapshotCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::policyRevision(_) => {
<policyRevisionCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::setPolicies(_) => {
<setPoliciesCall 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> {
Self::abi_decode_raw_with_config(
selector,
data,
alloy_sol_types::abi::AbiDecoderConfig::default(),
)
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw_with_config(
selector: [u8; 4],
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(
&[u8],
alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientCalls>] = &[
{
fn supportsInterface(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<supportsInterfaceCall as alloy_sol_types::SolCall>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientCalls::supportsInterface)
}
supportsInterface
},
{
fn policyRevision(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<policyRevisionCall as alloy_sol_types::SolCall>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientCalls::policyRevision)
}
policyRevision
},
{
fn getNewtonPolicyTaskManager(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getNewtonPolicyTaskManagerCall as alloy_sol_types::SolCall>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientCalls::getNewtonPolicyTaskManager)
}
getNewtonPolicyTaskManager
},
{
fn getPolicies(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getPoliciesCall as alloy_sol_types::SolCall>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientCalls::getPolicies)
}
getPolicies
},
{
fn version(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<versionCall as alloy_sol_types::SolCall>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientCalls::version)
}
version
},
{
fn setPolicies(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<setPoliciesCall as alloy_sol_types::SolCall>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientCalls::setPolicies)
}
setPolicies
},
{
fn getOwner(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getOwnerCall as alloy_sol_types::SolCall>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientCalls::getOwner)
}
getOwner
},
{
fn setPolicyClientOwner(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<setPolicyClientOwnerCall as alloy_sol_types::SolCall>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientCalls::setPolicyClientOwner)
}
setPolicyClientOwner
},
{
fn getPolicySetSnapshot(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getPolicySetSnapshotCall as alloy_sol_types::SolCall>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientCalls::getPolicySetSnapshot)
}
getPolicySetSnapshot
},
{
fn getPolicyId(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientCalls> {
<getPolicyIdCall as alloy_sol_types::SolCall>::abi_decode_raw_with_config(
data,
config,
)
.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, config)
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw_validate(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
Self::abi_decode_raw_with_config(
selector,
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
#[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::getPolicies(inner) => {
<getPoliciesCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::getPolicyId(inner) => {
<getPolicyIdCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::getPolicySetSnapshot(inner) => {
<getPolicySetSnapshotCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::policyRevision(inner) => {
<policyRevisionCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::setPolicies(inner) => {
<setPoliciesCall 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::getPolicies(inner) => {
<getPoliciesCall 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::getPolicySetSnapshot(inner) => {
<getPolicySetSnapshotCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::policyRevision(inner) => {
<policyRevisionCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::setPolicies(inner) => {
<setPoliciesCall 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)]
EmptyPolicySet(EmptyPolicySet),
#[allow(missing_docs)]
InvalidPolicyID(InvalidPolicyID),
#[allow(missing_docs)]
InvalidShortString(InvalidShortString),
#[allow(missing_docs)]
OnlyPolicyClientOwner(OnlyPolicyClientOwner),
#[allow(missing_docs)]
PolicyFactoryNotSet(PolicyFactoryNotSet),
#[allow(missing_docs)]
PolicyNotRegistered(PolicyNotRegistered),
#[allow(missing_docs)]
PolicyParamsTooLarge(PolicyParamsTooLarge),
#[allow(missing_docs)]
StringTooLong(StringTooLong),
#[allow(missing_docs)]
TooManyPolicies(TooManyPolicies),
#[allow(missing_docs)]
ZeroExpireAfter(ZeroExpireAfter),
}
impl NewtonPolicyClientErrors {
pub const SELECTORS: &'static [[u8; 4usize]] = &[
[48u8, 90u8, 39u8, 169u8],
[88u8, 160u8, 208u8, 239u8],
[118u8, 26u8, 240u8, 174u8],
[131u8, 0u8, 201u8, 158u8],
[179u8, 81u8, 43u8, 12u8],
[187u8, 59u8, 168u8, 116u8],
[197u8, 243u8, 33u8, 38u8],
[217u8, 154u8, 107u8, 237u8],
[222u8, 63u8, 112u8, 74u8],
[233u8, 194u8, 66u8, 245u8],
];
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(StringTooLong),
::core::stringify!(EmptyPolicySet),
::core::stringify!(InvalidPolicyID),
::core::stringify!(OnlyPolicyClientOwner),
::core::stringify!(InvalidShortString),
::core::stringify!(ZeroExpireAfter),
::core::stringify!(PolicyFactoryNotSet),
::core::stringify!(TooManyPolicies),
::core::stringify!(PolicyParamsTooLarge),
::core::stringify!(PolicyNotRegistered),
];
pub const SIGNATURES: &'static [&'static str] = &[
<StringTooLong as alloy_sol_types::SolError>::SIGNATURE,
<EmptyPolicySet 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,
<ZeroExpireAfter as alloy_sol_types::SolError>::SIGNATURE,
<PolicyFactoryNotSet as alloy_sol_types::SolError>::SIGNATURE,
<TooManyPolicies as alloy_sol_types::SolError>::SIGNATURE,
<PolicyParamsTooLarge as alloy_sol_types::SolError>::SIGNATURE,
<PolicyNotRegistered 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 = 10usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::EmptyPolicySet(_) => {
<EmptyPolicySet 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::OnlyPolicyClientOwner(_) => {
<OnlyPolicyClientOwner as alloy_sol_types::SolError>::SELECTOR
}
Self::PolicyFactoryNotSet(_) => {
<PolicyFactoryNotSet as alloy_sol_types::SolError>::SELECTOR
}
Self::PolicyNotRegistered(_) => {
<PolicyNotRegistered as alloy_sol_types::SolError>::SELECTOR
}
Self::PolicyParamsTooLarge(_) => {
<PolicyParamsTooLarge as alloy_sol_types::SolError>::SELECTOR
}
Self::StringTooLong(_) => {
<StringTooLong as alloy_sol_types::SolError>::SELECTOR
}
Self::TooManyPolicies(_) => {
<TooManyPolicies as alloy_sol_types::SolError>::SELECTOR
}
Self::ZeroExpireAfter(_) => {
<ZeroExpireAfter 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> {
Self::abi_decode_raw_with_config(
selector,
data,
alloy_sol_types::abi::AbiDecoderConfig::default(),
)
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw_with_config(
selector: [u8; 4],
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(
&[u8],
alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientErrors>] = &[
{
fn StringTooLong(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<StringTooLong as alloy_sol_types::SolError>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientErrors::StringTooLong)
}
StringTooLong
},
{
fn EmptyPolicySet(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<EmptyPolicySet as alloy_sol_types::SolError>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientErrors::EmptyPolicySet)
}
EmptyPolicySet
},
{
fn InvalidPolicyID(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<InvalidPolicyID as alloy_sol_types::SolError>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientErrors::InvalidPolicyID)
}
InvalidPolicyID
},
{
fn OnlyPolicyClientOwner(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<OnlyPolicyClientOwner as alloy_sol_types::SolError>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientErrors::OnlyPolicyClientOwner)
}
OnlyPolicyClientOwner
},
{
fn InvalidShortString(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<InvalidShortString as alloy_sol_types::SolError>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientErrors::InvalidShortString)
}
InvalidShortString
},
{
fn ZeroExpireAfter(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<ZeroExpireAfter as alloy_sol_types::SolError>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientErrors::ZeroExpireAfter)
}
ZeroExpireAfter
},
{
fn PolicyFactoryNotSet(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<PolicyFactoryNotSet as alloy_sol_types::SolError>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientErrors::PolicyFactoryNotSet)
}
PolicyFactoryNotSet
},
{
fn TooManyPolicies(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<TooManyPolicies as alloy_sol_types::SolError>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientErrors::TooManyPolicies)
}
TooManyPolicies
},
{
fn PolicyParamsTooLarge(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<PolicyParamsTooLarge as alloy_sol_types::SolError>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientErrors::PolicyParamsTooLarge)
}
PolicyParamsTooLarge
},
{
fn PolicyNotRegistered(
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<NewtonPolicyClientErrors> {
<PolicyNotRegistered as alloy_sol_types::SolError>::abi_decode_raw_with_config(
data,
config,
)
.map(NewtonPolicyClientErrors::PolicyNotRegistered)
}
PolicyNotRegistered
},
];
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, config)
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw_validate(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
Self::abi_decode_raw_with_config(
selector,
data,
alloy_sol_types::abi::AbiDecoderConfig::new().validate(true),
)
}
#[inline]
fn abi_encoded_size(&self) -> usize {
match self {
Self::EmptyPolicySet(inner) => {
<EmptyPolicySet 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::OnlyPolicyClientOwner(inner) => {
<OnlyPolicyClientOwner as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::PolicyFactoryNotSet(inner) => {
<PolicyFactoryNotSet as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::PolicyNotRegistered(inner) => {
<PolicyNotRegistered as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::PolicyParamsTooLarge(inner) => {
<PolicyParamsTooLarge as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::StringTooLong(inner) => {
<StringTooLong as alloy_sol_types::SolError>::abi_encoded_size(inner)
}
Self::TooManyPolicies(inner) => {
<TooManyPolicies as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::ZeroExpireAfter(inner) => {
<ZeroExpireAfter 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::EmptyPolicySet(inner) => {
<EmptyPolicySet 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::OnlyPolicyClientOwner(inner) => {
<OnlyPolicyClientOwner as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::PolicyFactoryNotSet(inner) => {
<PolicyFactoryNotSet as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::PolicyNotRegistered(inner) => {
<PolicyNotRegistered as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::PolicyParamsTooLarge(inner) => {
<PolicyParamsTooLarge as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::StringTooLong(inner) => {
<StringTooLong as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::TooManyPolicies(inner) => {
<TooManyPolicies as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::ZeroExpireAfter(inner) => {
<ZeroExpireAfter as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
}
}
}
#[automatically_derived]
impl NewtonPolicyClientErrors {
#[inline]
pub fn empty_policy_set() -> Self {
Self::EmptyPolicySet(EmptyPolicySet)
}
#[inline]
pub fn invalid_policy_id() -> Self {
Self::InvalidPolicyID(InvalidPolicyID)
}
#[inline]
pub fn invalid_short_string() -> Self {
Self::InvalidShortString(InvalidShortString)
}
#[inline]
pub fn only_policy_client_owner() -> Self {
Self::OnlyPolicyClientOwner(OnlyPolicyClientOwner)
}
#[inline]
pub fn policy_factory_not_set() -> Self {
Self::PolicyFactoryNotSet(PolicyFactoryNotSet)
}
#[inline]
pub fn policy_not_registered(
policy: alloy::sol_types::private::Address,
) -> Self {
Self::PolicyNotRegistered(PolicyNotRegistered {
policy: policy,
})
}
#[inline]
pub fn policy_params_too_large(
index: alloy::sol_types::private::primitives::aliases::U256,
size: alloy::sol_types::private::primitives::aliases::U256,
) -> Self {
Self::PolicyParamsTooLarge(PolicyParamsTooLarge {
index: index,
size: size,
})
}
#[inline]
pub fn string_too_long(str: alloy::sol_types::private::String) -> Self {
Self::StringTooLong(StringTooLong { str: str })
}
#[inline]
pub fn too_many_policies(
given: alloy::sol_types::private::primitives::aliases::U256,
max: alloy::sol_types::private::primitives::aliases::U256,
) -> Self {
Self::TooManyPolicies(TooManyPolicies {
given: given,
max: max,
})
}
#[inline]
pub fn zero_expire_after(
index: alloy::sol_types::private::primitives::aliases::U256,
) -> Self {
Self::ZeroExpireAfter(ZeroExpireAfter { index: index })
}
}
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Debug, PartialEq, Eq, Hash)]
pub enum NewtonPolicyClientEvents {
#[allow(missing_docs)]
PoliciesUpdated(PoliciesUpdated),
#[allow(missing_docs)]
PolicyClientInitialized(PolicyClientInitialized),
#[allow(missing_docs)]
PolicyClientOwnerUpdated(PolicyClientOwnerUpdated),
}
impl NewtonPolicyClientEvents {
pub const SELECTORS: &'static [[u8; 32usize]] = &[
[
21u8, 86u8, 49u8, 248u8, 148u8, 167u8, 137u8, 21u8, 202u8, 103u8, 243u8,
68u8, 8u8, 158u8, 203u8, 39u8, 141u8, 237u8, 243u8, 253u8, 181u8, 31u8,
119u8, 46u8, 130u8, 187u8, 10u8, 90u8, 190u8, 18u8, 54u8, 67u8,
],
[
130u8, 120u8, 238u8, 238u8, 170u8, 26u8, 84u8, 25u8, 209u8, 170u8, 127u8,
22u8, 233u8, 191u8, 85u8, 57u8, 247u8, 131u8, 190u8, 154u8, 220u8, 87u8,
103u8, 232u8, 214u8, 231u8, 237u8, 43u8, 29u8, 16u8, 201u8, 148u8,
],
[
251u8, 2u8, 113u8, 25u8, 50u8, 222u8, 79u8, 9u8, 25u8, 166u8, 246u8,
49u8, 154u8, 5u8, 169u8, 150u8, 209u8, 178u8, 14u8, 114u8, 71u8, 79u8,
193u8, 238u8, 59u8, 248u8, 193u8, 149u8, 121u8, 52u8, 11u8, 125u8,
],
];
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(PolicyClientInitialized),
::core::stringify!(PoliciesUpdated),
::core::stringify!(PolicyClientOwnerUpdated),
];
pub const SIGNATURES: &'static [&'static str] = &[
<PolicyClientInitialized as alloy_sol_types::SolEvent>::SIGNATURE,
<PoliciesUpdated as alloy_sol_types::SolEvent>::SIGNATURE,
<PolicyClientOwnerUpdated as alloy_sol_types::SolEvent>::SIGNATURE,
];
#[inline]
pub fn signature_by_selector(
selector: [u8; 32usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
#[inline]
pub fn name_by_selector(
selector: [u8; 32usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolEventInterface for NewtonPolicyClientEvents {
const NAME: &'static str = "NewtonPolicyClientEvents";
const COUNT: usize = 3usize;
fn decode_raw_log(
topics: &[alloy_sol_types::Word],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
<Self as alloy_sol_types::SolEventInterface>::decode_raw_log_with_config(
topics,
data,
alloy_sol_types::abi::AbiDecoderConfig::default(),
)
}
fn decode_raw_log_with_config(
topics: &[alloy_sol_types::Word],
data: &[u8],
config: alloy_sol_types::abi::AbiDecoderConfig,
) -> alloy_sol_types::Result<Self> {
match topics.first().copied() {
Some(<PoliciesUpdated as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<PoliciesUpdated as alloy_sol_types::SolEvent>::decode_raw_log_with_config(
topics,
data,
config,
)
.map(Self::PoliciesUpdated)
}
Some(
<PolicyClientInitialized as alloy_sol_types::SolEvent>::SIGNATURE_HASH,
) => {
<PolicyClientInitialized as alloy_sol_types::SolEvent>::decode_raw_log_with_config(
topics,
data,
config,
)
.map(Self::PolicyClientInitialized)
}
Some(
<PolicyClientOwnerUpdated as alloy_sol_types::SolEvent>::SIGNATURE_HASH,
) => {
<PolicyClientOwnerUpdated as alloy_sol_types::SolEvent>::decode_raw_log_with_config(
topics,
data,
config,
)
.map(Self::PolicyClientOwnerUpdated)
}
_ => {
if topics
.len()
.checked_mul(alloy_sol_types::Word::len_bytes())
.and_then(|len| len.checked_add(data.len()))
.is_none_or(|len| len > config.get_memory_limit())
{
return alloy_sol_types::private::Err(
alloy_sol_types::Error::MemoryLimitExceeded(
config.get_memory_limit(),
),
);
}
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 NewtonPolicyClientEvents {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::PoliciesUpdated(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::PolicyClientInitialized(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::PolicyClientOwnerUpdated(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::PoliciesUpdated(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::PolicyClientInitialized(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::PolicyClientOwnerUpdated(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
#[automatically_derived]
impl NewtonPolicyClientEvents {
#[inline]
pub fn policies_updated(
previous_policy_id: alloy::sol_types::private::FixedBytes<32>,
new_policy_id: alloy::sol_types::private::FixedBytes<32>,
revision: u64,
policies: alloy::sol_types::private::Vec<
<INewtonPolicyClient::PolicySpec as alloy::sol_types::SolType>::RustType,
>,
) -> Self {
Self::PoliciesUpdated(PoliciesUpdated {
previousPolicyId: previous_policy_id,
newPolicyId: new_policy_id,
revision: revision,
policies: policies,
})
}
#[inline]
pub fn policy_client_initialized(
task_manager: alloy::sol_types::private::Address,
owner: alloy::sol_types::private::Address,
) -> Self {
Self::PolicyClientInitialized(PolicyClientInitialized {
taskManager: task_manager,
owner: owner,
})
}
#[inline]
pub fn policy_client_owner_updated(
previous_owner: alloy::sol_types::private::Address,
new_owner: alloy::sol_types::private::Address,
) -> Self {
Self::PolicyClientOwnerUpdated(PolicyClientOwnerUpdated {
previousOwner: previous_owner,
newOwner: new_owner,
})
}
}
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 getPolicies(
&self,
) -> alloy_contract::SolCallBuilder<&P, getPoliciesCall, N> {
self.call_builder(&getPoliciesCall)
}
pub fn getPolicyId(
&self,
) -> alloy_contract::SolCallBuilder<&P, getPolicyIdCall, N> {
self.call_builder(&getPolicyIdCall)
}
pub fn getPolicySetSnapshot(
&self,
) -> alloy_contract::SolCallBuilder<&P, getPolicySetSnapshotCall, N> {
self.call_builder(&getPolicySetSnapshotCall)
}
pub fn policyRevision(
&self,
) -> alloy_contract::SolCallBuilder<&P, policyRevisionCall, N> {
self.call_builder(&policyRevisionCall)
}
pub fn setPolicies(
&self,
policies: alloy::sol_types::private::Vec<
<INewtonPolicyClient::PolicySpec as alloy::sol_types::SolType>::RustType,
>,
) -> alloy_contract::SolCallBuilder<&P, setPoliciesCall, N> {
self.call_builder(&setPoliciesCall { policies })
}
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)
}
pub fn PoliciesUpdated_filter(
&self,
) -> alloy_contract::Event<&P, PoliciesUpdated, N> {
self.event_filter::<PoliciesUpdated>()
}
pub fn PolicyClientInitialized_filter(
&self,
) -> alloy_contract::Event<&P, PolicyClientInitialized, N> {
self.event_filter::<PolicyClientInitialized>()
}
pub fn PolicyClientOwnerUpdated_filter(
&self,
) -> alloy_contract::Event<&P, PolicyClientOwnerUpdated, N> {
self.event_filter::<PolicyClientOwnerUpdated>()
}
}
}