From d8b05b6fca5233ae66c5c047a9d55004299ece35 Mon Sep 17 00:00:00 2001 From: Aregnaz Harutyunyan <> Date: Wed, 18 Feb 2026 20:48:45 +0400 Subject: [PATCH] [EAN-Issue-2528] Updated supra-contract bindings to meat registry state viewer requirements --- crates/supra-extension/build.rs | 32 +- .../supra_contracts_bindings.rs | 2712 ++++++++++------- .../src/transactions/automated_transaction.rs | 4 +- .../src/AutomationController.sol | 12 +- solidity/supra_contracts/src/CommonUtils.sol | 10 + .../supra_contracts/src/LibController.sol | 17 +- .../src/SupraContractsBindings.sol | 7 +- 7 files changed, 1619 insertions(+), 1175 deletions(-) diff --git a/crates/supra-extension/build.rs b/crates/supra-extension/build.rs index 978e60d299..4abdd6a418 100644 --- a/crates/supra-extension/build.rs +++ b/crates/supra-extension/build.rs @@ -29,30 +29,30 @@ fn rebuild_rust_bindings() { // - uncomment forge library reference in top level Cargo.toml file // - build the project - //// Determine the output directory for the generated bindings - //use clap::Parser; - //use forge::cmd::bind::BindArgs; - //let contracts_relative_path = PathBuf::from("../../solidity/supra_contracts"); - //let contracts_build_config = + // // Determine the output directory for the generated bindings + // use clap::Parser; + // use forge::cmd::bind::BindArgs; + // let contracts_relative_path = PathBuf::from("../../solidity/supra_contracts"); + // let contracts_build_config = // cargo_dir.join(contracts_relative_path.join(PathBuf::from("foundry.toml"))); - //let contract_names = "SupraContracts"; - - //let bindings_path = cargo_dir + // let contract_names = "SupraContracts"; + // + // let bindings_path = cargo_dir // .join(PathBuf::from("src")) // .join(PathBuf::from("supra_contract_bindings")); - - //// Ensure the output directory exists - //std::fs::create_dir_all(bindings_path.as_path()).expect("Failed to create bindings directory"); - //let command_inputs = format!( + // + // // Ensure the output directory exists + // std::fs::create_dir_all(bindings_path.as_path()).expect("Failed to create bindings directory"); + // let command_inputs = format!( // "bind --bindings-path {} --overwrite --module --select {} --alloy --config-path {}", // bindings_path.display(), // contract_names, // contracts_build_config.display() - //); - //let parsed_inputs = shlex::split(&command_inputs).expect("Failed to parse command string"); - //let bind_cmd: BindArgs = + // ); + // let parsed_inputs = shlex::split(&command_inputs).expect("Failed to parse command string"); + // let bind_cmd: BindArgs = // BindArgs::try_parse_from(parsed_inputs).expect("Failed to parse command arguments"); - //bind_cmd.run().expect("Failed to execute bind command"); + // bind_cmd.run().expect("Failed to execute bind command"); } #[derive(Serialize, Deserialize, Debug)] diff --git a/crates/supra-extension/src/supra_contract_bindings/supra_contracts_bindings.rs b/crates/supra-extension/src/supra_contract_bindings/supra_contracts_bindings.rs index 58ecb64fb5..8a17943a27 100644 --- a/crates/supra-extension/src/supra_contract_bindings/supra_contracts_bindings.rs +++ b/crates/supra-extension/src/supra_contract_bindings/supra_contracts_bindings.rs @@ -5,7 +5,9 @@ library CommonUtils { type CycleState is uint8; type TaskState is uint8; - struct TaskDetails { uint128 maxGasAmount; uint128 gasPriceCap; uint128 automationFeeCapForCycle; uint128 lockedFeeForNextCycle; bytes32 txHash; uint64 taskIndex; uint64 registrationTime; uint64 expiryTime; address owner; TaskState state; bytes payloadTx; bytes[] auxData; } + type TaskType is uint8; + struct CycleDetails { uint64 index; uint64 startTime; uint64 durationSecs; CycleState state; uint64 nextTaskIndexPosition; uint64[] expectedTasksToBeProcessed; } + struct TaskDetails { uint128 maxGasAmount; uint128 gasPriceCap; uint128 automationFeeCapForCycle; uint128 depositFee; bytes32 txHash; uint64 taskIndex; uint64 registrationTime; uint64 expiryTime; uint64 priority; TaskType taskType; TaskState state; address owner; bytes payloadTx; bytes[] auxData; } } ```*/ #[allow( @@ -18,7 +20,8 @@ library CommonUtils { pub mod CommonUtils { use super::*; use alloy::sol_types as alloy_sol_types; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] + #[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 CycleState(u8); @@ -29,27 +32,34 @@ pub mod CommonUtils { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> - { + ) -> as alloy_sol_types::SolType>::Token<'_> { alloy_sol_types::private::SolTypeValue::< alloy::sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self).0 + as alloy_sol_types::SolType>::tokenize(self) + .0 } #[inline] - fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size( - self, - ) + as alloy_sol_types::SolType>::abi_encoded_size(self) } } impl CycleState { @@ -93,11 +103,13 @@ pub mod CommonUtils { #[automatically_derived] impl alloy_sol_types::SolType for CycleState { type RustType = u8; - type Token<'a> = - as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = - as alloy_sol_types::SolType>::ENCODED_SIZE; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; @@ -107,11 +119,15 @@ pub mod CommonUtils { } #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -132,14 +148,17 @@ pub mod CommonUtils { > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } #[inline] - fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic( - rust, - ) + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic(rust) } } }; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] + #[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 TaskState(u8); @@ -150,27 +169,34 @@ pub mod CommonUtils { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> - { + ) -> as alloy_sol_types::SolType>::Token<'_> { alloy_sol_types::private::SolTypeValue::< alloy::sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self).0 + as alloy_sol_types::SolType>::tokenize(self) + .0 } #[inline] - fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size( - self, - ) + as alloy_sol_types::SolType>::abi_encoded_size(self) } } impl TaskState { @@ -214,11 +240,13 @@ pub mod CommonUtils { #[automatically_derived] impl alloy_sol_types::SolType for TaskState { type RustType = u8; - type Token<'a> = - as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = - as alloy_sol_types::SolType>::ENCODED_SIZE; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; @@ -228,11 +256,15 @@ pub mod CommonUtils { } #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -253,44 +285,172 @@ pub mod CommonUtils { > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } #[inline] - fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic( - rust, - ) + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic(rust) + } + } + }; + #[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 TaskType(u8); + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for u8 { + #[inline] + fn stv_to_tokens( + &self, + ) -> as alloy_sol_types::SolType>::Token<'_> { + alloy_sol_types::private::SolTypeValue::< + alloy::sol_types::sol_data::Uint<8>, + >::stv_to_tokens(self) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + as alloy_sol_types::SolType>::tokenize(self) + .0 + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + as alloy_sol_types::SolType>::abi_encoded_size(self) + } + } + impl TaskType { + /// The Solidity type name. + pub const NAME: &'static str = stringify!(@ name); + /// Convert from the underlying value type. + #[inline] + pub const fn from_underlying(value: u8) -> Self { + Self(value) + } + /// Return the underlying value. + #[inline] + pub const fn into_underlying(self) -> u8 { + self.0 + } + /// Return the single encoding of this value, delegating to the + /// underlying type. + #[inline] + pub fn abi_encode(&self) -> alloy_sol_types::private::Vec { + ::abi_encode(&self.0) + } + /// Return the packed encoding of this value, delegating to the + /// underlying type. + #[inline] + pub fn abi_encode_packed(&self) -> alloy_sol_types::private::Vec { + ::abi_encode_packed(&self.0) + } + } + #[automatically_derived] + impl From for TaskType { + fn from(value: u8) -> Self { + Self::from_underlying(value) + } + } + #[automatically_derived] + impl From for u8 { + fn from(value: TaskType) -> Self { + value.into_underlying() + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for TaskType { + type RustType = u8; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = Self::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + Self::type_check(token).is_ok() + } + #[inline] + fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { + as alloy_sol_types::SolType>::type_check(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + as alloy_sol_types::SolType>::detokenize(token) + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for TaskType { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + as alloy_sol_types::EventTopic>::topic_preimage_length(rust) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic(rust) } } }; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity - struct TaskDetails { uint128 maxGasAmount; uint128 gasPriceCap; uint128 automationFeeCapForCycle; uint128 lockedFeeForNextCycle; bytes32 txHash; uint64 taskIndex; uint64 registrationTime; uint64 expiryTime; address owner; TaskState state; bytes payloadTx; bytes[] auxData; } - ```*/ +struct CycleDetails { uint64 index; uint64 startTime; uint64 durationSecs; CycleState state; uint64 nextTaskIndexPosition; uint64[] expectedTasksToBeProcessed; } +```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] - pub struct TaskDetails { - #[allow(missing_docs)] - pub maxGasAmount: u128, + pub struct CycleDetails { #[allow(missing_docs)] - pub gasPriceCap: u128, - #[allow(missing_docs)] - pub automationFeeCapForCycle: u128, - #[allow(missing_docs)] - pub lockedFeeForNextCycle: u128, - #[allow(missing_docs)] - pub txHash: alloy::sol_types::private::FixedBytes<32>, - #[allow(missing_docs)] - pub taskIndex: u64, + pub index: u64, #[allow(missing_docs)] - pub registrationTime: u64, - #[allow(missing_docs)] - pub expiryTime: u64, + pub startTime: u64, #[allow(missing_docs)] - pub owner: alloy::sol_types::private::Address, + pub durationSecs: u64, #[allow(missing_docs)] - pub state: ::RustType, + pub state: ::RustType, #[allow(missing_docs)] - pub payloadTx: alloy::sol_types::private::Bytes, + pub nextTaskIndexPosition: u64, #[allow(missing_docs)] - pub auxData: alloy::sol_types::private::Vec, + pub expectedTasksToBeProcessed: alloy::sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -303,37 +463,27 @@ pub mod CommonUtils { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Uint<128>, - alloy::sol_types::sol_data::Uint<128>, - alloy::sol_types::sol_data::Uint<128>, - alloy::sol_types::sol_data::Uint<128>, - alloy::sol_types::sol_data::FixedBytes<32>, alloy::sol_types::sol_data::Uint<64>, alloy::sol_types::sol_data::Uint<64>, alloy::sol_types::sol_data::Uint<64>, - alloy::sol_types::sol_data::Address, - TaskState, - alloy::sol_types::sol_data::Bytes, - alloy::sol_types::sol_data::Array, + CycleState, + alloy::sol_types::sol_data::Uint<64>, + alloy::sol_types::sol_data::Array>, ); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - u128, - u128, - u128, - u128, - alloy::sol_types::private::FixedBytes<32>, u64, u64, u64, - alloy::sol_types::private::Address, - ::RustType, - alloy::sol_types::private::Bytes, - alloy::sol_types::private::Vec, + ::RustType, + u64, + alloy::sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -342,91 +492,61 @@ pub mod CommonUtils { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: TaskDetails) -> Self { + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: CycleDetails) -> Self { ( - value.maxGasAmount, - value.gasPriceCap, - value.automationFeeCapForCycle, - value.lockedFeeForNextCycle, - value.txHash, - value.taskIndex, - value.registrationTime, - value.expiryTime, - value.owner, + value.index, + value.startTime, + value.durationSecs, value.state, - value.payloadTx, - value.auxData, + value.nextTaskIndexPosition, + value.expectedTasksToBeProcessed, ) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> for TaskDetails { + impl ::core::convert::From> for CycleDetails { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { - maxGasAmount: tuple.0, - gasPriceCap: tuple.1, - automationFeeCapForCycle: tuple.2, - lockedFeeForNextCycle: tuple.3, - txHash: tuple.4, - taskIndex: tuple.5, - registrationTime: tuple.6, - expiryTime: tuple.7, - owner: tuple.8, - state: tuple.9, - payloadTx: tuple.10, - auxData: tuple.11, + index: tuple.0, + startTime: tuple.1, + durationSecs: tuple.2, + state: tuple.3, + nextTaskIndexPosition: tuple.4, + expectedTasksToBeProcessed: tuple.5, } } } #[automatically_derived] - impl alloy_sol_types::SolValue for TaskDetails { + impl alloy_sol_types::SolValue for CycleDetails { type SolType = Self; } #[automatically_derived] - impl alloy_sol_types::private::SolTypeValue for TaskDetails { + impl alloy_sol_types::private::SolTypeValue for CycleDetails { #[inline] fn stv_to_tokens(&self) -> ::Token<'_> { ( as alloy_sol_types::SolType>::tokenize(&self.maxGasAmount), - as alloy_sol_types::SolType>::tokenize(&self.gasPriceCap), - as alloy_sol_types::SolType>::tokenize( - &self.automationFeeCapForCycle, - ), - as alloy_sol_types::SolType>::tokenize( - &self.lockedFeeForNextCycle, - ), - as alloy_sol_types::SolType>::tokenize(&self.txHash), + 64, + > as alloy_sol_types::SolType>::tokenize(&self.index), as alloy_sol_types::SolType>::tokenize(&self.taskIndex), + > as alloy_sol_types::SolType>::tokenize(&self.startTime), as alloy_sol_types::SolType>::tokenize(&self.registrationTime), + > as alloy_sol_types::SolType>::tokenize(&self.durationSecs), + ::tokenize(&self.state), as alloy_sol_types::SolType>::tokenize(&self.expiryTime), - ::tokenize( - &self.owner, - ), - ::tokenize(&self.state), - ::tokenize( - &self.payloadTx, + > as alloy_sol_types::SolType>::tokenize( + &self.nextTaskIndexPosition, ), as alloy_sol_types::SolType>::tokenize(&self.auxData), + alloy::sol_types::sol_data::Uint<64>, + > as alloy_sol_types::SolType>::tokenize( + &self.expectedTasksToBeProcessed, + ), ) } #[inline] @@ -434,50 +554,460 @@ pub mod CommonUtils { if let Some(size) = ::ENCODED_SIZE { return size; } - let tuple = - as ::core::convert::From>::from(self.clone()); - as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) } #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { ::eip712_hash_struct(self) } #[inline] - fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { - let tuple = - as ::core::convert::From>::from(self.clone()); - as alloy_sol_types::SolType>::abi_encode_packed_to( - &tuple, out, - ) + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) } #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { if let Some(size) = ::PACKED_ENCODED_SIZE { return size; } - let tuple = - as ::core::convert::From>::from(self.clone()); - as alloy_sol_types::SolType>::abi_packed_encoded_size( - &tuple, - ) + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) } } #[automatically_derived] - impl alloy_sol_types::SolType for TaskDetails { + impl alloy_sol_types::SolType for CycleDetails { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; const SOL_NAME: &'static str = ::NAME; - const ENCODED_SIZE: Option = - as alloy_sol_types::SolType>::ENCODED_SIZE; - const PACKED_ENCODED_SIZE: Option = - as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for CycleDetails { + const NAME: &'static str = "CycleDetails"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "CycleDetails(uint64 index,uint64 startTime,uint64 durationSecs,uint8 state,uint64 nextTaskIndexPosition,uint64[] expectedTasksToBeProcessed)", + ) + } + #[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> { + ::eip712_root_type() + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + as alloy_sol_types::SolType>::eip712_data_word(&self.index) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.startTime) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.durationSecs) + .0, + ::eip712_data_word( + &self.state, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word( + &self.nextTaskIndexPosition, + ) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word( + &self.expectedTasksToBeProcessed, + ) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for CycleDetails { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.index) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.startTime, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.durationSecs, + ) + + ::topic_preimage_length( + &rust.state, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.nextTaskIndexPosition, + ) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.expectedTasksToBeProcessed, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.index, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.startTime, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.durationSecs, + out, + ); + ::encode_topic_preimage( + &rust.state, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.nextTaskIndexPosition, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.expectedTasksToBeProcessed, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**```solidity +struct TaskDetails { uint128 maxGasAmount; uint128 gasPriceCap; uint128 automationFeeCapForCycle; uint128 depositFee; bytes32 txHash; uint64 taskIndex; uint64 registrationTime; uint64 expiryTime; uint64 priority; TaskType taskType; TaskState state; address owner; bytes payloadTx; bytes[] auxData; } +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct TaskDetails { + #[allow(missing_docs)] + pub maxGasAmount: u128, + #[allow(missing_docs)] + pub gasPriceCap: u128, + #[allow(missing_docs)] + pub automationFeeCapForCycle: u128, + #[allow(missing_docs)] + pub depositFee: u128, + #[allow(missing_docs)] + pub txHash: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub taskIndex: u64, + #[allow(missing_docs)] + pub registrationTime: u64, + #[allow(missing_docs)] + pub expiryTime: u64, + #[allow(missing_docs)] + pub priority: u64, + #[allow(missing_docs)] + pub taskType: ::RustType, + #[allow(missing_docs)] + pub state: ::RustType, + #[allow(missing_docs)] + pub owner: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub payloadTx: alloy::sol_types::private::Bytes, + #[allow(missing_docs)] + pub auxData: alloy::sol_types::private::Vec, + } + #[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<128>, + alloy::sol_types::sol_data::Uint<128>, + alloy::sol_types::sol_data::Uint<128>, + alloy::sol_types::sol_data::Uint<128>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<64>, + alloy::sol_types::sol_data::Uint<64>, + alloy::sol_types::sol_data::Uint<64>, + alloy::sol_types::sol_data::Uint<64>, + TaskType, + TaskState, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Bytes, + alloy::sol_types::sol_data::Array, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + u128, + u128, + u128, + u128, + alloy::sol_types::private::FixedBytes<32>, + u64, + u64, + u64, + u64, + ::RustType, + ::RustType, + alloy::sol_types::private::Address, + alloy::sol_types::private::Bytes, + alloy::sol_types::private::Vec, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: TaskDetails) -> Self { + ( + value.maxGasAmount, + value.gasPriceCap, + value.automationFeeCapForCycle, + value.depositFee, + value.txHash, + value.taskIndex, + value.registrationTime, + value.expiryTime, + value.priority, + value.taskType, + value.state, + value.owner, + value.payloadTx, + value.auxData, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for TaskDetails { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + maxGasAmount: tuple.0, + gasPriceCap: tuple.1, + automationFeeCapForCycle: tuple.2, + depositFee: tuple.3, + txHash: tuple.4, + taskIndex: tuple.5, + registrationTime: tuple.6, + expiryTime: tuple.7, + priority: tuple.8, + taskType: tuple.9, + state: tuple.10, + owner: tuple.11, + payloadTx: tuple.12, + auxData: tuple.13, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for TaskDetails { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for TaskDetails { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.maxGasAmount), + as alloy_sol_types::SolType>::tokenize(&self.gasPriceCap), + as alloy_sol_types::SolType>::tokenize( + &self.automationFeeCapForCycle, + ), + as alloy_sol_types::SolType>::tokenize(&self.depositFee), + as alloy_sol_types::SolType>::tokenize(&self.txHash), + as alloy_sol_types::SolType>::tokenize(&self.taskIndex), + as alloy_sol_types::SolType>::tokenize(&self.registrationTime), + as alloy_sol_types::SolType>::tokenize(&self.expiryTime), + as alloy_sol_types::SolType>::tokenize(&self.priority), + ::tokenize(&self.taskType), + ::tokenize(&self.state), + ::tokenize( + &self.owner, + ), + ::tokenize( + &self.payloadTx, + ), + as alloy_sol_types::SolType>::tokenize(&self.auxData), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for TaskDetails { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { as alloy_sol_types::SolType>::valid_token(token) } #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - let tuple = as alloy_sol_types::SolType>::detokenize(token); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } @@ -487,13 +1017,13 @@ pub mod CommonUtils { #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "TaskDetails(uint128 maxGasAmount,uint128 gasPriceCap,uint128 automationFeeCapForCycle,uint128 lockedFeeForNextCycle,bytes32 txHash,uint64 taskIndex,uint64 registrationTime,uint64 expiryTime,address owner,uint8 state,bytes payloadTx,bytes[] auxData)", + "TaskDetails(uint128 maxGasAmount,uint128 gasPriceCap,uint128 automationFeeCapForCycle,uint128 depositFee,bytes32 txHash,uint64 taskIndex,uint64 registrationTime,uint64 expiryTime,uint64 priority,uint8 taskType,uint8 state,address owner,bytes payloadTx,bytes[] auxData)", ) } #[inline] - fn eip712_components( - ) -> alloy_sol_types::private::Vec> - { + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { alloy_sol_types::private::Vec::new() } #[inline] @@ -519,9 +1049,7 @@ pub mod CommonUtils { .0, as alloy_sol_types::SolType>::eip712_data_word( - &self.lockedFeeForNextCycle, - ) + > as alloy_sol_types::SolType>::eip712_data_word(&self.depositFee) .0, as alloy_sol_types::SolType>::eip712_data_word(&self.expiryTime) .0, - ::eip712_data_word( - &self.owner, + as alloy_sol_types::SolType>::eip712_data_word(&self.priority) + .0, + ::eip712_data_word( + &self.taskType, ) .0, ::eip712_data_word( &self.state, ) .0, + ::eip712_data_word( + &self.owner, + ) + .0, ::eip712_data_word( &self.payloadTx, ) @@ -584,7 +1120,7 @@ pub mod CommonUtils { + as alloy_sol_types::EventTopic>::topic_preimage_length( - &rust.lockedFeeForNextCycle, + &rust.depositFee, ) + as alloy_sol_types::EventTopic>::topic_preimage_length( &rust.expiryTime, ) - + ::topic_preimage_length( - &rust.owner, + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.priority, + ) + + ::topic_preimage_length( + &rust.taskType, ) + ::topic_preimage_length( &rust.state, ) + + ::topic_preimage_length( + &rust.owner, + ) + ::topic_preimage_length( &rust.payloadTx, ) @@ -626,7 +1170,9 @@ pub mod CommonUtils { rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve(::topic_preimage_length(rust)); + out.reserve( + ::topic_preimage_length(rust), + ); as alloy_sol_types::EventTopic>::encode_topic_preimage( @@ -648,7 +1194,7 @@ pub mod CommonUtils { as alloy_sol_types::EventTopic>::encode_topic_preimage( - &rust.lockedFeeForNextCycle, + &rust.depositFee, out, ); as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.priority, + out, + ); + ::encode_topic_preimage( + &rust.taskType, + out, + ); + ::encode_topic_preimage( + &rust.state, + out, + ); ::encode_topic_preimage( &rust.owner, out, ); - ::encode_topic_preimage(&rust.state, out); ::encode_topic_preimage( &rust.payloadTx, out, @@ -692,17 +1251,24 @@ pub mod CommonUtils { ); } #[inline] - fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { let mut out = alloy_sol_types::private::Vec::new(); - ::encode_topic_preimage(rust, &mut out); - alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) } } }; use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`CommonUtils`](self) contract instance. - See the [wrapper's documentation](`CommonUtilsInstance`) for more details.*/ +See the [wrapper's documentation](`CommonUtilsInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -715,15 +1281,15 @@ pub mod CommonUtils { } /**A [`CommonUtils`](self) instance. - Contains type-safe methods for interacting with an on-chain instance of the - [`CommonUtils`](self) contract located at a given `address`, using a given - provider `P`. +Contains type-safe methods for interacting with an on-chain instance of the +[`CommonUtils`](self) contract located at a given `address`, using a given +provider `P`. - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. - See the [module-level documentation](self) for all the available methods.*/ +See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct CommonUtilsInstance { address: alloy_sol_types::private::Address, @@ -734,20 +1300,22 @@ pub mod CommonUtils { impl ::core::fmt::Debug for CommonUtilsInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("CommonUtilsInstance") - .field(&self.address) - .finish() + f.debug_tuple("CommonUtilsInstance").field(&self.address).finish() } } /// Instantiation and getters/setters. - impl, N: alloy_contract::private::Network> - CommonUtilsInstance - { + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > CommonUtilsInstance { /**Creates a new wrapper around an on-chain [`CommonUtils`](self) contract instance. - See the [wrapper's documentation](`CommonUtilsInstance`) for more details.*/ +See the [wrapper's documentation](`CommonUtilsInstance`) for more details.*/ #[inline] - pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { + pub const fn new( + address: alloy_sol_types::private::Address, + __provider: P, + ) -> Self { Self { address, provider: __provider, @@ -787,9 +1355,10 @@ pub mod CommonUtils { } } /// Function calls. - impl, N: alloy_contract::private::Network> - CommonUtilsInstance - { + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > CommonUtilsInstance { /// Creates a new call builder using this contract instance's provider and address. /// /// Note that the call can be any function call, not just those defined in this @@ -802,9 +1371,10 @@ pub mod CommonUtils { } } /// Event filters. - impl, N: alloy_contract::private::Network> - CommonUtilsInstance - { + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > CommonUtilsInstance { /// Creates a new event filter using this contract instance's provider and address. /// /// Note that the type can be any event, not just those defined in this contract. @@ -823,17 +1393,28 @@ Generated by the following Solidity interface... library CommonUtils { type CycleState is uint8; type TaskState is uint8; + type TaskType is uint8; + struct CycleDetails { + uint64 index; + uint64 startTime; + uint64 durationSecs; + CycleState state; + uint64 nextTaskIndexPosition; + uint64[] expectedTasksToBeProcessed; + } struct TaskDetails { uint128 maxGasAmount; uint128 gasPriceCap; uint128 automationFeeCapForCycle; - uint128 lockedFeeForNextCycle; + uint128 depositFee; bytes32 txHash; uint64 taskIndex; uint64 registrationTime; uint64 expiryTime; - address owner; + uint64 priority; + TaskType taskType; TaskState state; + address owner; bytes payloadTx; bytes[] auxData; } @@ -842,12 +1423,10 @@ library CommonUtils { interface SupraContractsBindings { function blockPrologue() external; function getAllActiveTaskIds() external view returns (uint256[] memory); - function getCycleInfo() external view returns (uint64, uint64, uint64, CommonUtils.CycleState); + function getCycleStateDetails() external view returns (CommonUtils.CycleDetails memory details); function getTaskDetails(uint64 _taskIndex) external view returns (CommonUtils.TaskDetails memory); function getTaskDetailsBulk(uint64[] memory _taskIndexes) external view returns (CommonUtils.TaskDetails[] memory); function getTaskIdList() external view returns (uint256[] memory); - function getTransitionInfo() external view returns (uint64, uint128); - function ifTaskExists(uint64 _taskIndex) external view returns (bool); function isAutomationEnabled() external view returns (bool); function processTasks(uint64 _cycleIndex, uint64[] memory _taskIndexes) external; } @@ -878,28 +1457,45 @@ interface SupraContractsBindings { }, { "type": "function", - "name": "getCycleInfo", + "name": "getCycleStateDetails", "inputs": [], "outputs": [ { - "name": "", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "", - "type": "uint8", - "internalType": "enum CommonUtils.CycleState" + "name": "details", + "type": "tuple", + "internalType": "struct CommonUtils.CycleDetails", + "components": [ + { + "name": "index", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "startTime", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "durationSecs", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "state", + "type": "uint8", + "internalType": "enum CommonUtils.CycleState" + }, + { + "name": "nextTaskIndexPosition", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "expectedTasksToBeProcessed", + "type": "uint64[]", + "internalType": "uint64[]" + } + ] } ], "stateMutability": "view" @@ -936,7 +1532,7 @@ interface SupraContractsBindings { "internalType": "uint128" }, { - "name": "lockedFeeForNextCycle", + "name": "depositFee", "type": "uint128", "internalType": "uint128" }, @@ -961,15 +1557,25 @@ interface SupraContractsBindings { "internalType": "uint64" }, { - "name": "owner", - "type": "address", - "internalType": "address" + "name": "priority", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "taskType", + "type": "uint8", + "internalType": "enum CommonUtils.TaskType" }, { "name": "state", "type": "uint8", "internalType": "enum CommonUtils.TaskState" }, + { + "name": "owner", + "type": "address", + "internalType": "address" + }, { "name": "payloadTx", "type": "bytes", @@ -1017,7 +1623,7 @@ interface SupraContractsBindings { "internalType": "uint128" }, { - "name": "lockedFeeForNextCycle", + "name": "depositFee", "type": "uint128", "internalType": "uint128" }, @@ -1042,15 +1648,25 @@ interface SupraContractsBindings { "internalType": "uint64" }, { - "name": "owner", - "type": "address", - "internalType": "address" + "name": "priority", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "taskType", + "type": "uint8", + "internalType": "enum CommonUtils.TaskType" }, { "name": "state", "type": "uint8", "internalType": "enum CommonUtils.TaskState" }, + { + "name": "owner", + "type": "address", + "internalType": "address" + }, { "name": "payloadTx", "type": "bytes", @@ -1068,50 +1684,13 @@ interface SupraContractsBindings { }, { "type": "function", - "name": "getTaskIdList", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTransitionInfo", + "name": "getTaskIdList", "inputs": [], "outputs": [ { "name": "", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "ifTaskExists", - "inputs": [ - { - "name": "_taskIndex", - "type": "uint64", - "internalType": "uint64" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" + "type": "uint256[]", + "internalType": "uint256[]" } ], "stateMutability": "view" @@ -1179,11 +1758,12 @@ pub mod SupraContractsBindings { pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `blockPrologue()` and selector `0x7ded091b`. - ```solidity - function blockPrologue() external; - ```*/ +```solidity +function blockPrologue() external; +```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct blockPrologueCall; @@ -1207,7 +1787,9 @@ pub mod SupraContractsBindings { type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1237,7 +1819,9 @@ pub mod SupraContractsBindings { type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1259,324 +1843,26 @@ pub mod SupraContractsBindings { } } } - impl blockPrologueReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { - () - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for blockPrologueCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = blockPrologueReturn; - type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "blockPrologue()"; - const SELECTOR: [u8; 4] = [125u8, 237u8, 9u8, 27u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - blockPrologueReturn::_tokenize(ret) - } - #[inline] - fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(Into::into) - } - #[inline] - fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence_validate( - data, - ) - .map(Into::into) - } - } - }; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] - /**Function with signature `getAllActiveTaskIds()` and selector `0xc5dcf6ac`. - ```solidity - function getAllActiveTaskIds() external view returns (uint256[] memory); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] - #[derive(Clone)] - pub struct getAllActiveTaskIdsCall; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getAllActiveTaskIds()`](getAllActiveTaskIdsCall) function. - #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] - #[derive(Clone)] - pub struct getAllActiveTaskIdsReturn { - #[allow(missing_docs)] - pub _0: - alloy::sol_types::private::Vec, - } - #[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) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getAllActiveTaskIdsCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getAllActiveTaskIdsCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self - } - } - } - { - #[doc(hidden)] - #[allow(dead_code)] - type UnderlyingSolTuple<'a> = - (alloy::sol_types::sol_data::Array>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Vec< - alloy::sol_types::private::primitives::aliases::U256, - >, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getAllActiveTaskIdsReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getAllActiveTaskIdsReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for getAllActiveTaskIdsCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = alloy::sol_types::private::Vec< - alloy::sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = - (alloy::sol_types::sol_data::Array>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getAllActiveTaskIds()"; - const SELECTOR: [u8; 4] = [197u8, 220u8, 246u8, 172u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - () - } - #[inline] - fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - (, - > as alloy_sol_types::SolType>::tokenize(ret),) - } - #[inline] - fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data).map( - |r| { - let r: getAllActiveTaskIdsReturn = r.into(); - r._0 - }, - ) - } - #[inline] - fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence_validate( - data, - ) - .map(|r| { - let r: getAllActiveTaskIdsReturn = r.into(); - r._0 - }) - } - } - }; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] - /**Function with signature `getCycleInfo()` and selector `0x873dc71d`. - ```solidity - function getCycleInfo() external view returns (uint64, uint64, uint64, CommonUtils.CycleState); - ```*/ - #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] - #[derive(Clone)] - pub struct getCycleInfoCall; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getCycleInfo()`](getCycleInfoCall) function. - #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] - #[derive(Clone)] - pub struct getCycleInfoReturn { - #[allow(missing_docs)] - pub _0: u64, - #[allow(missing_docs)] - pub _1: u64, - #[allow(missing_docs)] - pub _2: u64, - #[allow(missing_docs)] - pub _3: ::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) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getCycleInfoCall) -> Self { - () - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getCycleInfoCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self - } - } - } - { - #[doc(hidden)] - #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Uint<64>, - alloy::sol_types::sol_data::Uint<64>, - alloy::sol_types::sol_data::Uint<64>, - CommonUtils::CycleState, - ); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - u64, - u64, - u64, - ::RustType, - ); - #[cfg(test)] - #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { - match _t { - alloy_sol_types::private::AssertTypeEq::< - ::RustType, - >(_) => {} - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getCycleInfoReturn) -> Self { - (value._0, value._1, value._2, value._3) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getCycleInfoReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _0: tuple.0, - _1: tuple.1, - _2: tuple.2, - _3: tuple.3, - } - } - } - } - impl getCycleInfoReturn { - fn _tokenize(&self) -> ::ReturnToken<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._0, - ), - as alloy_sol_types::SolType>::tokenize( - &self._1, - ), - as alloy_sol_types::SolType>::tokenize( - &self._2, - ), - ::tokenize(&self._3), - ) + impl blockPrologueReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () } } #[automatically_derived] - impl alloy_sol_types::SolCall for getCycleInfoCall { + impl alloy_sol_types::SolCall for blockPrologueCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = getCycleInfoReturn; - type ReturnTuple<'a> = ( - alloy::sol_types::sol_data::Uint<64>, - alloy::sol_types::sol_data::Uint<64>, - alloy::sol_types::sol_data::Uint<64>, - CommonUtils::CycleState, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getCycleInfo()"; - const SELECTOR: [u8; 4] = [135u8, 61u8, 199u8, 29u8]; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = blockPrologueReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "blockPrologue()"; + const SELECTOR: [u8; 4] = [125u8, 237u8, 9u8, 27u8]; #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, @@ -1589,40 +1875,45 @@ pub mod SupraContractsBindings { } #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - getCycleInfoReturn::_tokenize(ret) + blockPrologueReturn::_tokenize(ret) } #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + as alloy_sol_types::SolType>::abi_decode_sequence(data) .map(Into::into) } #[inline] - fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence_validate( - data, - ) - .map(Into::into) + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) } } }; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] - /**Function with signature `getTaskDetails(uint64)` and selector `0xb2ef6896`. - ```solidity - function getTaskDetails(uint64 _taskIndex) external view returns (CommonUtils.TaskDetails memory); - ```*/ + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `getAllActiveTaskIds()` and selector `0xc5dcf6ac`. +```solidity +function getAllActiveTaskIds() external view returns (uint256[] memory); +```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] - pub struct getTaskDetailsCall { - #[allow(missing_docs)] - pub _taskIndex: u64, - } + pub struct getAllActiveTaskIdsCall; #[derive(serde::Serialize, serde::Deserialize)] - ///Container type for the return parameters of the [`getTaskDetails(uint64)`](getTaskDetailsCall) function. + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`getAllActiveTaskIds()`](getAllActiveTaskIdsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] - pub struct getTaskDetailsReturn { + pub struct getAllActiveTaskIdsReturn { #[allow(missing_docs)] - pub _0: ::RustType, + pub _0: alloy::sol_types::private::Vec< + alloy::sol_types::private::primitives::aliases::U256, + >, } #[allow( non_camel_case_types, @@ -1635,12 +1926,14 @@ pub mod SupraContractsBindings { { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<64>,); + type UnderlyingSolTuple<'a> = (); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (u64,); + type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1649,31 +1942,38 @@ pub mod SupraContractsBindings { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getTaskDetailsCall) -> Self { - (value._taskIndex,) + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: getAllActiveTaskIdsCall) -> Self { + () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> for getTaskDetailsCall { + impl ::core::convert::From> + for getAllActiveTaskIdsCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _taskIndex: tuple.0, - } + Self } } } { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = (CommonUtils::TaskDetails,); + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Array>, + ); #[doc(hidden)] - type UnderlyingRustTuple<'a> = - (::RustType,); + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Vec< + alloy::sol_types::private::primitives::aliases::U256, + >, + ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1682,28 +1982,38 @@ pub mod SupraContractsBindings { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getTaskDetailsReturn) -> Self { + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: getAllActiveTaskIdsReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> for getTaskDetailsReturn { + impl ::core::convert::From> + for getAllActiveTaskIdsReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } } } #[automatically_derived] - impl alloy_sol_types::SolCall for getTaskDetailsCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<64>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = ::RustType; - type ReturnTuple<'a> = (CommonUtils::TaskDetails,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getTaskDetails(uint64)"; - const SELECTOR: [u8; 4] = [178u8, 239u8, 104u8, 150u8]; + impl alloy_sol_types::SolCall for getAllActiveTaskIdsCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::Vec< + alloy::sol_types::private::primitives::aliases::U256, + >; + type ReturnTuple<'a> = ( + alloy::sol_types::sol_data::Array>, + ); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "getAllActiveTaskIds()"; + const SELECTOR: [u8; 4] = [197u8, 220u8, 246u8, 172u8]; #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, @@ -1712,57 +2022,57 @@ pub mod SupraContractsBindings { } #[inline] fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._taskIndex, - ), - ) + () } #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - (::tokenize(ret),) + ( + , + > as alloy_sol_types::SolType>::tokenize(ret), + ) } #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data).map( - |r| { - let r: getTaskDetailsReturn = r.into(); + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: getAllActiveTaskIdsReturn = r.into(); r._0 - }, - ) + }) } #[inline] - fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence_validate( - data, - ) - .map(|r| { - let r: getTaskDetailsReturn = r.into(); - r._0 - }) + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: getAllActiveTaskIdsReturn = r.into(); + r._0 + }) } } }; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] - /**Function with signature `getTaskDetailsBulk(uint64[])` and selector `0x12f72cf4`. - ```solidity - function getTaskDetailsBulk(uint64[] memory _taskIndexes) external view returns (CommonUtils.TaskDetails[] memory); - ```*/ + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `getCycleStateDetails()` and selector `0x6b5d8c56`. +```solidity +function getCycleStateDetails() external view returns (CommonUtils.CycleDetails memory details); +```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] - pub struct getTaskDetailsBulkCall { - #[allow(missing_docs)] - pub _taskIndexes: alloy::sol_types::private::Vec, - } + pub struct getCycleStateDetailsCall; #[derive(serde::Serialize, serde::Deserialize)] - ///Container type for the return parameters of the [`getTaskDetailsBulk(uint64[])`](getTaskDetailsBulkCall) function. + #[derive()] + ///Container type for the return parameters of the [`getCycleStateDetails()`](getCycleStateDetailsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] - pub struct getTaskDetailsBulkReturn { + pub struct getCycleStateDetailsReturn { #[allow(missing_docs)] - pub _0: alloy::sol_types::private::Vec< - ::RustType, - >, + pub details: ::RustType, } #[allow( non_camel_case_types, @@ -1775,13 +2085,14 @@ pub mod SupraContractsBindings { { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = - (alloy::sol_types::sol_data::Array>,); + type UnderlyingSolTuple<'a> = (); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Vec,); + type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1790,35 +2101,34 @@ pub mod SupraContractsBindings { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getTaskDetailsBulkCall) -> Self { - (value._taskIndexes,) + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: getCycleStateDetailsCall) -> Self { + () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> for getTaskDetailsBulkCall { + impl ::core::convert::From> + for getCycleStateDetailsCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _taskIndexes: tuple.0, - } + Self } } } { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = - (alloy::sol_types::sol_data::Array,); + type UnderlyingSolTuple<'a> = (CommonUtils::CycleDetails,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Vec< - ::RustType, - >, + ::RustType, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1827,31 +2137,34 @@ pub mod SupraContractsBindings { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getTaskDetailsBulkReturn) -> Self { - (value._0,) + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: getCycleStateDetailsReturn) -> Self { + (value.details,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> for getTaskDetailsBulkReturn { + impl ::core::convert::From> + for getCycleStateDetailsReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } + Self { details: tuple.0 } } } } #[automatically_derived] - impl alloy_sol_types::SolCall for getTaskDetailsBulkCall { - type Parameters<'a> = - (alloy::sol_types::sol_data::Array>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = alloy::sol_types::private::Vec< - ::RustType, - >; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Array,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getTaskDetailsBulk(uint64[])"; - const SELECTOR: [u8; 4] = [18u8, 247u8, 44u8, 244u8]; + impl alloy_sol_types::SolCall for getCycleStateDetailsCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = ::RustType; + type ReturnTuple<'a> = (CommonUtils::CycleDetails,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "getCycleStateDetails()"; + const SELECTOR: [u8; 4] = [107u8, 93u8, 140u8, 86u8]; #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, @@ -1860,57 +2173,56 @@ pub mod SupraContractsBindings { } #[inline] fn tokenize(&self) -> Self::Token<'_> { - (, - > as alloy_sol_types::SolType>::tokenize( - &self._taskIndexes - ),) + () } #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - as alloy_sol_types::SolType>::tokenize(ret), - ) + (::tokenize(ret),) } #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data).map( - |r| { - let r: getTaskDetailsBulkReturn = r.into(); - r._0 - }, - ) - } - #[inline] - fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence_validate( - data, - ) - .map(|r| { - let r: getTaskDetailsBulkReturn = r.into(); - r._0 - }) + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: getCycleStateDetailsReturn = r.into(); + r.details + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: getCycleStateDetailsReturn = r.into(); + r.details + }) } } }; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] - /**Function with signature `getTaskIdList()` and selector `0xec82b429`. - ```solidity - function getTaskIdList() external view returns (uint256[] memory); - ```*/ + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `getTaskDetails(uint64)` and selector `0xb2ef6896`. +```solidity +function getTaskDetails(uint64 _taskIndex) external view returns (CommonUtils.TaskDetails memory); +```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] - pub struct getTaskIdListCall; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getTaskIdList()`](getTaskIdListCall) function. + pub struct getTaskDetailsCall { + #[allow(missing_docs)] + pub _taskIndex: u64, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive()] + ///Container type for the return parameters of the [`getTaskDetails(uint64)`](getTaskDetailsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] - pub struct getTaskIdListReturn { + pub struct getTaskDetailsReturn { #[allow(missing_docs)] - pub _0: - alloy::sol_types::private::Vec, + pub _0: ::RustType, } #[allow( non_camel_case_types, @@ -1923,12 +2235,14 @@ pub mod SupraContractsBindings { { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = (); + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<64>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); + type UnderlyingRustTuple<'a> = (u64,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1937,33 +2251,32 @@ pub mod SupraContractsBindings { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getTaskIdListCall) -> Self { - () + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getTaskDetailsCall) -> Self { + (value._taskIndex,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> for getTaskIdListCall { + impl ::core::convert::From> for getTaskDetailsCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self + Self { _taskIndex: tuple.0 } } } } { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = - (alloy::sol_types::sol_data::Array>,); + type UnderlyingSolTuple<'a> = (CommonUtils::TaskDetails,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::Vec< - alloy::sol_types::private::primitives::aliases::U256, - >, + ::RustType, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1972,31 +2285,34 @@ pub mod SupraContractsBindings { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getTaskIdListReturn) -> Self { + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: getTaskDetailsReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> for getTaskIdListReturn { + impl ::core::convert::From> + for getTaskDetailsReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } } } #[automatically_derived] - impl alloy_sol_types::SolCall for getTaskIdListCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = alloy::sol_types::private::Vec< - alloy::sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = - (alloy::sol_types::sol_data::Array>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getTaskIdList()"; - const SELECTOR: [u8; 4] = [236u8, 130u8, 180u8, 41u8]; + impl alloy_sol_types::SolCall for getTaskDetailsCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<64>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = ::RustType; + type ReturnTuple<'a> = (CommonUtils::TaskDetails,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "getTaskDetails(uint64)"; + const SELECTOR: [u8; 4] = [178u8, 239u8, 104u8, 150u8]; #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, @@ -2005,52 +2321,62 @@ pub mod SupraContractsBindings { } #[inline] fn tokenize(&self) -> Self::Token<'_> { - () + ( + as alloy_sol_types::SolType>::tokenize(&self._taskIndex), + ) } #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - (, - > as alloy_sol_types::SolType>::tokenize(ret),) + (::tokenize(ret),) } #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data).map( - |r| { - let r: getTaskIdListReturn = r.into(); + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: getTaskDetailsReturn = r.into(); r._0 - }, - ) + }) } #[inline] - fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence_validate( - data, - ) - .map(|r| { - let r: getTaskIdListReturn = r.into(); - r._0 - }) + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: getTaskDetailsReturn = r.into(); + r._0 + }) } } }; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] - /**Function with signature `getTransitionInfo()` and selector `0xf5c1249f`. - ```solidity - function getTransitionInfo() external view returns (uint64, uint128); - ```*/ + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `getTaskDetailsBulk(uint64[])` and selector `0x12f72cf4`. +```solidity +function getTaskDetailsBulk(uint64[] memory _taskIndexes) external view returns (CommonUtils.TaskDetails[] memory); +```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] - pub struct getTransitionInfoCall; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getTransitionInfo()`](getTransitionInfoCall) function. + pub struct getTaskDetailsBulkCall { + #[allow(missing_docs)] + pub _taskIndexes: alloy::sol_types::private::Vec, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive()] + ///Container type for the return parameters of the [`getTaskDetailsBulk(uint64[])`](getTaskDetailsBulkCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] - pub struct getTransitionInfoReturn { - #[allow(missing_docs)] - pub _0: u64, + pub struct getTaskDetailsBulkReturn { #[allow(missing_docs)] - pub _1: u128, + pub _0: alloy::sol_types::private::Vec< + ::RustType, + >, } #[allow( non_camel_case_types, @@ -2063,12 +2389,16 @@ pub mod SupraContractsBindings { { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = (); + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Array>, + ); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (); + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Vec,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2077,16 +2407,18 @@ pub mod SupraContractsBindings { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getTransitionInfoCall) -> Self { - () + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: getTaskDetailsBulkCall) -> Self { + (value._taskIndexes,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> for getTransitionInfoCall { + impl ::core::convert::From> + for getTaskDetailsBulkCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self + Self { _taskIndexes: tuple.0 } } } } @@ -2094,14 +2426,19 @@ pub mod SupraContractsBindings { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( - alloy::sol_types::sol_data::Uint<64>, - alloy::sol_types::sol_data::Uint<128>, + alloy::sol_types::sol_data::Array, ); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (u64, u128); + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Vec< + ::RustType, + >, + ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2110,48 +2447,40 @@ pub mod SupraContractsBindings { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: getTransitionInfoReturn) -> Self { - (value._0, value._1) + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: getTaskDetailsBulkReturn) -> Self { + (value._0,) } } #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for getTransitionInfoReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _0: tuple.0, - _1: tuple.1, - } - } - } - } - impl getTransitionInfoReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._0, - ), - as alloy_sol_types::SolType>::tokenize( - &self._1, - ), - ) + #[doc(hidden)] + impl ::core::convert::From> + for getTaskDetailsBulkReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } } } #[automatically_derived] - impl alloy_sol_types::SolCall for getTransitionInfoCall { - type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = getTransitionInfoReturn; + impl alloy_sol_types::SolCall for getTaskDetailsBulkCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Array>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::Vec< + ::RustType, + >; type ReturnTuple<'a> = ( - alloy::sol_types::sol_data::Uint<64>, - alloy::sol_types::sol_data::Uint<128>, + alloy::sol_types::sol_data::Array, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getTransitionInfo()"; - const SELECTOR: [u8; 4] = [245u8, 193u8, 36u8, 159u8]; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "getTaskDetailsBulk(uint64[])"; + const SELECTOR: [u8; 4] = [18u8, 247u8, 44u8, 244u8]; #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, @@ -2160,44 +2489,63 @@ pub mod SupraContractsBindings { } #[inline] fn tokenize(&self) -> Self::Token<'_> { - () + ( + , + > as alloy_sol_types::SolType>::tokenize(&self._taskIndexes), + ) } #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - getTransitionInfoReturn::_tokenize(ret) + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) } #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: getTaskDetailsBulkReturn = r.into(); + r._0 + }) } #[inline] - fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence_validate( - data, - ) - .map(Into::into) + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: getTaskDetailsBulkReturn = r.into(); + r._0 + }) } } }; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] - /**Function with signature `ifTaskExists(uint64)` and selector `0x8aaa404e`. - ```solidity - function ifTaskExists(uint64 _taskIndex) external view returns (bool); - ```*/ + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `getTaskIdList()` and selector `0xec82b429`. +```solidity +function getTaskIdList() external view returns (uint256[] memory); +```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] - pub struct ifTaskExistsCall { - #[allow(missing_docs)] - pub _taskIndex: u64, - } - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`ifTaskExists(uint64)`](ifTaskExistsCall) function. + pub struct getTaskIdListCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`getTaskIdList()`](getTaskIdListCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] - pub struct ifTaskExistsReturn { + pub struct getTaskIdListReturn { #[allow(missing_docs)] - pub _0: bool, + pub _0: alloy::sol_types::private::Vec< + alloy::sol_types::private::primitives::aliases::U256, + >, } #[allow( non_camel_case_types, @@ -2210,12 +2558,14 @@ pub mod SupraContractsBindings { { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<64>,); + type UnderlyingSolTuple<'a> = (); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (u64,); + type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2224,30 +2574,36 @@ pub mod SupraContractsBindings { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ifTaskExistsCall) -> Self { - (value._taskIndex,) + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getTaskIdListCall) -> Self { + () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> for ifTaskExistsCall { + impl ::core::convert::From> for getTaskIdListCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { - _taskIndex: tuple.0, - } + Self } } } { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Array>, + ); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (bool,); + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Vec< + alloy::sol_types::private::primitives::aliases::U256, + >, + ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2256,28 +2612,36 @@ pub mod SupraContractsBindings { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { - fn from(value: ifTaskExistsReturn) -> Self { + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getTaskIdListReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> for ifTaskExistsReturn { + impl ::core::convert::From> for getTaskIdListReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } } } #[automatically_derived] - impl alloy_sol_types::SolCall for ifTaskExistsCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<64>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = bool; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ifTaskExists(uint64)"; - const SELECTOR: [u8; 4] = [138u8, 170u8, 64u8, 78u8]; + impl alloy_sol_types::SolCall for getTaskIdListCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::Vec< + alloy::sol_types::private::primitives::aliases::U256, + >; + type ReturnTuple<'a> = ( + alloy::sol_types::sol_data::Array>, + ); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "getTaskIdList()"; + const SELECTOR: [u8; 4] = [236u8, 130u8, 180u8, 41u8]; #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, @@ -2286,46 +2650,51 @@ pub mod SupraContractsBindings { } #[inline] fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize( - &self._taskIndex, - ), - ) + () } #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - (::tokenize(ret),) + ( + , + > as alloy_sol_types::SolType>::tokenize(ret), + ) } #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data).map( - |r| { - let r: ifTaskExistsReturn = r.into(); + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: getTaskIdListReturn = r.into(); r._0 - }, - ) + }) } #[inline] - fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence_validate( - data, - ) - .map(|r| { - let r: ifTaskExistsReturn = r.into(); - r._0 - }) + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: getTaskIdListReturn = r.into(); + r._0 + }) } } }; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isAutomationEnabled()` and selector `0xe48e0e98`. - ```solidity - function isAutomationEnabled() external view returns (bool); - ```*/ +```solidity +function isAutomationEnabled() external view returns (bool); +```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isAutomationEnabledCall; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] ///Container type for the return parameters of the [`isAutomationEnabled()`](isAutomationEnabledCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] @@ -2349,7 +2718,9 @@ pub mod SupraContractsBindings { type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2358,14 +2729,16 @@ pub mod SupraContractsBindings { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { + impl ::core::convert::From + for UnderlyingRustTuple<'_> { fn from(value: isAutomationEnabledCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> for isAutomationEnabledCall { + impl ::core::convert::From> + for isAutomationEnabledCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -2379,7 +2752,9 @@ pub mod SupraContractsBindings { type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2388,14 +2763,16 @@ pub mod SupraContractsBindings { } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From for UnderlyingRustTuple<'_> { + impl ::core::convert::From + for UnderlyingRustTuple<'_> { fn from(value: isAutomationEnabledReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> for isAutomationEnabledReturn { + impl ::core::convert::From> + for isAutomationEnabledReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2404,10 +2781,14 @@ pub mod SupraContractsBindings { #[automatically_derived] impl alloy_sol_types::SolCall for isAutomationEnabledCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = bool; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "isAutomationEnabled()"; const SELECTOR: [u8; 4] = [228u8, 142u8, 14u8, 152u8]; #[inline] @@ -2422,34 +2803,42 @@ pub mod SupraContractsBindings { } #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - (::tokenize(ret),) + ( + ::tokenize( + ret, + ), + ) } #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data).map( - |r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { let r: isAutomationEnabledReturn = r.into(); r._0 - }, - ) + }) } #[inline] - fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence_validate( - data, - ) - .map(|r| { - let r: isAutomationEnabledReturn = r.into(); - r._0 - }) + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: isAutomationEnabledReturn = r.into(); + r._0 + }) } } }; - #[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)] + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `processTasks(uint64,uint64[])` and selector `0x7f69c35c`. - ```solidity - function processTasks(uint64 _cycleIndex, uint64[] memory _taskIndexes) external; - ```*/ +```solidity +function processTasks(uint64 _cycleIndex, uint64[] memory _taskIndexes) external; +```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct processTasksCall { @@ -2481,7 +2870,9 @@ pub mod SupraContractsBindings { type UnderlyingRustTuple<'a> = (u64, alloy::sol_types::private::Vec); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2514,7 +2905,9 @@ pub mod SupraContractsBindings { type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2537,7 +2930,9 @@ pub mod SupraContractsBindings { } } impl processTasksReturn { - fn _tokenize(&self) -> ::ReturnToken<'_> { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { () } } @@ -2547,10 +2942,14 @@ pub mod SupraContractsBindings { alloy::sol_types::sol_data::Uint<64>, alloy::sol_types::sol_data::Array>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = processTasksReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "processTasks(uint64,uint64[])"; const SELECTOR: [u8; 4] = [127u8, 105u8, 195u8, 92u8]; #[inline] @@ -2576,27 +2975,33 @@ pub mod SupraContractsBindings { } #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + as alloy_sol_types::SolType>::abi_decode_sequence(data) .map(Into::into) } #[inline] - fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence_validate( - data, - ) - .map(Into::into) + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) } } }; ///Container for all the [`SupraContractsBindings`](self) function calls. - #[derive(Clone, serde::Serialize, serde::Deserialize)] + #[derive(Clone)] + #[derive(serde::Serialize, serde::Deserialize)] + #[derive()] pub enum SupraContractsBindingsCalls { #[allow(missing_docs)] blockPrologue(blockPrologueCall), #[allow(missing_docs)] getAllActiveTaskIds(getAllActiveTaskIdsCall), #[allow(missing_docs)] - getCycleInfo(getCycleInfoCall), + getCycleStateDetails(getCycleStateDetailsCall), #[allow(missing_docs)] getTaskDetails(getTaskDetailsCall), #[allow(missing_docs)] @@ -2604,10 +3009,6 @@ pub mod SupraContractsBindings { #[allow(missing_docs)] getTaskIdList(getTaskIdListCall), #[allow(missing_docs)] - getTransitionInfo(getTransitionInfoCall), - #[allow(missing_docs)] - ifTaskExists(ifTaskExistsCall), - #[allow(missing_docs)] isAutomationEnabled(isAutomationEnabledCall), #[allow(missing_docs)] processTasks(processTasksCall), @@ -2621,41 +3022,35 @@ pub mod SupraContractsBindings { /// Prefer using `SolInterface` methods instead. pub const SELECTORS: &'static [[u8; 4usize]] = &[ [18u8, 247u8, 44u8, 244u8], + [107u8, 93u8, 140u8, 86u8], [125u8, 237u8, 9u8, 27u8], [127u8, 105u8, 195u8, 92u8], - [135u8, 61u8, 199u8, 29u8], - [138u8, 170u8, 64u8, 78u8], [178u8, 239u8, 104u8, 150u8], [197u8, 220u8, 246u8, 172u8], [228u8, 142u8, 14u8, 152u8], [236u8, 130u8, 180u8, 41u8], - [245u8, 193u8, 36u8, 159u8], ]; /// The names of the variants in the same order as `SELECTORS`. pub const VARIANT_NAMES: &'static [&'static str] = &[ ::core::stringify!(getTaskDetailsBulk), + ::core::stringify!(getCycleStateDetails), ::core::stringify!(blockPrologue), ::core::stringify!(processTasks), - ::core::stringify!(getCycleInfo), - ::core::stringify!(ifTaskExists), ::core::stringify!(getTaskDetails), ::core::stringify!(getAllActiveTaskIds), ::core::stringify!(isAutomationEnabled), ::core::stringify!(getTaskIdList), - ::core::stringify!(getTransitionInfo), ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, + ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, - ::SIGNATURE, - ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, - ::SIGNATURE, ]; /// Returns the signature for the given selector, if known. #[inline] @@ -2671,7 +3066,9 @@ pub mod SupraContractsBindings { } /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { + 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) } @@ -2680,30 +3077,34 @@ pub mod SupraContractsBindings { impl alloy_sol_types::SolInterface for SupraContractsBindingsCalls { const NAME: &'static str = "SupraContractsBindingsCalls"; const MIN_DATA_LENGTH: usize = 0usize; - const COUNT: usize = 10usize; + const COUNT: usize = 8usize; #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::blockPrologue(_) => ::SELECTOR, + Self::blockPrologue(_) => { + ::SELECTOR + } Self::getAllActiveTaskIds(_) => { ::SELECTOR } - Self::getCycleInfo(_) => ::SELECTOR, + Self::getCycleStateDetails(_) => { + ::SELECTOR + } Self::getTaskDetails(_) => { ::SELECTOR } Self::getTaskDetailsBulk(_) => { ::SELECTOR } - Self::getTaskIdList(_) => ::SELECTOR, - Self::getTransitionInfo(_) => { - ::SELECTOR + Self::getTaskIdList(_) => { + ::SELECTOR } - Self::ifTaskExists(_) => ::SELECTOR, Self::isAutomationEnabled(_) => { ::SELECTOR } - Self::processTasks(_) => ::SELECTOR, + Self::processTasks(_) => { + ::SELECTOR + } } } #[inline] @@ -2716,25 +3117,42 @@ pub mod SupraContractsBindings { } #[inline] #[allow(non_snake_case)] - fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) - -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result] = &[ { fn getTaskDetailsBulk( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) + ::abi_decode_raw( + data, + ) .map(SupraContractsBindingsCalls::getTaskDetailsBulk) } getTaskDetailsBulk }, + { + fn getCycleStateDetails( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(SupraContractsBindingsCalls::getCycleStateDetails) + } + getCycleStateDetails + }, { fn blockPrologue( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) + ::abi_decode_raw( + data, + ) .map(SupraContractsBindingsCalls::blockPrologue) } blockPrologue @@ -2743,34 +3161,20 @@ pub mod SupraContractsBindings { fn processTasks( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) + ::abi_decode_raw( + data, + ) .map(SupraContractsBindingsCalls::processTasks) } processTasks }, - { - fn getCycleInfo( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(SupraContractsBindingsCalls::getCycleInfo) - } - getCycleInfo - }, - { - fn ifTaskExists( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(SupraContractsBindingsCalls::ifTaskExists) - } - ifTaskExists - }, { fn getTaskDetails( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) + ::abi_decode_raw( + data, + ) .map(SupraContractsBindingsCalls::getTaskDetails) } getTaskDetails @@ -2779,7 +3183,9 @@ pub mod SupraContractsBindings { fn getAllActiveTaskIds( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) + ::abi_decode_raw( + data, + ) .map(SupraContractsBindingsCalls::getAllActiveTaskIds) } getAllActiveTaskIds @@ -2788,7 +3194,9 @@ pub mod SupraContractsBindings { fn isAutomationEnabled( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) + ::abi_decode_raw( + data, + ) .map(SupraContractsBindingsCalls::isAutomationEnabled) } isAutomationEnabled @@ -2797,26 +3205,21 @@ pub mod SupraContractsBindings { fn getTaskIdList( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) + ::abi_decode_raw( + data, + ) .map(SupraContractsBindingsCalls::getTaskIdList) } getTaskIdList }, - { - fn getTransitionInfo( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(SupraContractsBindingsCalls::getTransitionInfo) - } - getTransitionInfo - }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); }; DECODE_SHIMS[idx](data) } @@ -2828,9 +3231,7 @@ pub mod SupraContractsBindings { ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result< - SupraContractsBindingsCalls, - >] = &[ + ) -> alloy_sol_types::Result] = &[ { fn getTaskDetailsBulk( data: &[u8], @@ -2842,14 +3243,25 @@ pub mod SupraContractsBindings { } getTaskDetailsBulk }, + { + fn getCycleStateDetails( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(SupraContractsBindingsCalls::getCycleStateDetails) + } + getCycleStateDetails + }, { fn blockPrologue( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(SupraContractsBindingsCalls::blockPrologue) + data, + ) + .map(SupraContractsBindingsCalls::blockPrologue) } blockPrologue }, @@ -2858,42 +3270,20 @@ pub mod SupraContractsBindings { data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(SupraContractsBindingsCalls::processTasks) + data, + ) + .map(SupraContractsBindingsCalls::processTasks) } processTasks }, - { - fn getCycleInfo( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(SupraContractsBindingsCalls::getCycleInfo) - } - getCycleInfo - }, - { - fn ifTaskExists( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(SupraContractsBindingsCalls::ifTaskExists) - } - ifTaskExists - }, { fn getTaskDetails( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(SupraContractsBindingsCalls::getTaskDetails) + data, + ) + .map(SupraContractsBindingsCalls::getTaskDetails) } getTaskDetails }, @@ -2924,29 +3314,20 @@ pub mod SupraContractsBindings { data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(SupraContractsBindingsCalls::getTaskIdList) - } - getTaskIdList - }, - { - fn getTransitionInfo( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( data, ) - .map(SupraContractsBindingsCalls::getTransitionInfo) + .map(SupraContractsBindingsCalls::getTaskIdList) } - getTransitionInfo + getTaskIdList }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err(alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - )); + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); }; DECODE_VALIDATE_SHIMS[idx](data) } @@ -2954,34 +3335,44 @@ pub mod SupraContractsBindings { fn abi_encoded_size(&self) -> usize { match self { Self::blockPrologue(inner) => { - ::abi_encoded_size(inner) + ::abi_encoded_size( + inner, + ) } Self::getAllActiveTaskIds(inner) => { - ::abi_encoded_size(inner) + ::abi_encoded_size( + inner, + ) } - Self::getCycleInfo(inner) => { - ::abi_encoded_size(inner) + Self::getCycleStateDetails(inner) => { + ::abi_encoded_size( + inner, + ) } Self::getTaskDetails(inner) => { - ::abi_encoded_size(inner) + ::abi_encoded_size( + inner, + ) } Self::getTaskDetailsBulk(inner) => { - ::abi_encoded_size(inner) + ::abi_encoded_size( + inner, + ) } Self::getTaskIdList(inner) => { - ::abi_encoded_size(inner) - } - Self::getTransitionInfo(inner) => { - ::abi_encoded_size(inner) - } - Self::ifTaskExists(inner) => { - ::abi_encoded_size(inner) + ::abi_encoded_size( + inner, + ) } Self::isAutomationEnabled(inner) => { - ::abi_encoded_size(inner) + ::abi_encoded_size( + inner, + ) } Self::processTasks(inner) => { - ::abi_encoded_size(inner) + ::abi_encoded_size( + inner, + ) } } } @@ -2989,38 +3380,52 @@ pub mod SupraContractsBindings { fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::blockPrologue(inner) => { - ::abi_encode_raw(inner, out) + ::abi_encode_raw( + inner, + out, + ) } Self::getAllActiveTaskIds(inner) => { ::abi_encode_raw( - inner, out, + inner, + out, ) } - Self::getCycleInfo(inner) => { - ::abi_encode_raw(inner, out) + Self::getCycleStateDetails(inner) => { + ::abi_encode_raw( + inner, + out, + ) } Self::getTaskDetails(inner) => { - ::abi_encode_raw(inner, out) + ::abi_encode_raw( + inner, + out, + ) } Self::getTaskDetailsBulk(inner) => { - ::abi_encode_raw(inner, out) + ::abi_encode_raw( + inner, + out, + ) } Self::getTaskIdList(inner) => { - ::abi_encode_raw(inner, out) - } - Self::getTransitionInfo(inner) => { - ::abi_encode_raw(inner, out) - } - Self::ifTaskExists(inner) => { - ::abi_encode_raw(inner, out) + ::abi_encode_raw( + inner, + out, + ) } Self::isAutomationEnabled(inner) => { ::abi_encode_raw( - inner, out, + inner, + out, ) } Self::processTasks(inner) => { - ::abi_encode_raw(inner, out) + ::abi_encode_raw( + inner, + out, + ) } } } @@ -3028,7 +3433,7 @@ pub mod SupraContractsBindings { use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`SupraContractsBindings`](self) contract instance. - See the [wrapper's documentation](`SupraContractsBindingsInstance`) for more details.*/ +See the [wrapper's documentation](`SupraContractsBindingsInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -3041,41 +3446,43 @@ pub mod SupraContractsBindings { } /**Deploys this contract using the given `provider` and constructor arguments, if any. - Returns a new instance of the contract, if the deployment was successful. +Returns a new instance of the contract, if the deployment was successful. - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub fn deploy, N: alloy_contract::private::Network>( + pub fn deploy< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( __provider: P, - ) -> impl ::core::future::Future>> - { + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { SupraContractsBindingsInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. +and constructor arguments, if any. - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ #[inline] pub fn deploy_builder< P: alloy_contract::private::Provider, N: alloy_contract::private::Network, - >( - __provider: P, - ) -> alloy_contract::RawCallBuilder { + >(__provider: P) -> alloy_contract::RawCallBuilder { SupraContractsBindingsInstance::::deploy_builder(__provider) } /**A [`SupraContractsBindings`](self) instance. - Contains type-safe methods for interacting with an on-chain instance of the - [`SupraContractsBindings`](self) contract located at a given `address`, using a given - provider `P`. +Contains type-safe methods for interacting with an on-chain instance of the +[`SupraContractsBindings`](self) contract located at a given `address`, using a given +provider `P`. - If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) - documentation on how to provide it), the `deploy` and `deploy_builder` methods can - be used to deploy a new instance of the contract. +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. - See the [module-level documentation](self) for all the available methods.*/ +See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct SupraContractsBindingsInstance { address: alloy_sol_types::private::Address, @@ -3086,20 +3493,22 @@ pub mod SupraContractsBindings { impl ::core::fmt::Debug for SupraContractsBindingsInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("SupraContractsBindingsInstance") - .field(&self.address) - .finish() + f.debug_tuple("SupraContractsBindingsInstance").field(&self.address).finish() } } /// Instantiation and getters/setters. - impl, N: alloy_contract::private::Network> - SupraContractsBindingsInstance - { + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > SupraContractsBindingsInstance { /**Creates a new wrapper around an on-chain [`SupraContractsBindings`](self) contract instance. - See the [wrapper's documentation](`SupraContractsBindingsInstance`) for more details.*/ +See the [wrapper's documentation](`SupraContractsBindingsInstance`) for more details.*/ #[inline] - pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { + pub const fn new( + address: alloy_sol_types::private::Address, + __provider: P, + ) -> Self { Self { address, provider: __provider, @@ -3108,9 +3517,9 @@ pub mod SupraContractsBindings { } /**Deploys this contract using the given `provider` and constructor arguments, if any. - Returns a new instance of the contract, if the deployment was successful. +Returns a new instance of the contract, if the deployment was successful. - For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -3120,10 +3529,10 @@ pub mod SupraContractsBindings { Ok(Self::new(contract_address, call_builder.provider)) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` - and constructor arguments, if any. +and constructor arguments, if any. - This is a simple wrapper around creating a `RawCallBuilder` with the data set to - the bytecode concatenated with the constructor's ABI-encoded arguments.*/ +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ #[inline] pub fn deploy_builder(__provider: P) -> alloy_contract::RawCallBuilder { alloy_contract::RawCallBuilder::new_raw_deploy( @@ -3164,9 +3573,10 @@ pub mod SupraContractsBindings { } } /// Function calls. - impl, N: alloy_contract::private::Network> - SupraContractsBindingsInstance - { + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > SupraContractsBindingsInstance { /// Creates a new call builder using this contract instance's provider and address. /// /// Note that the call can be any function call, not just those defined in this @@ -3178,7 +3588,9 @@ pub mod SupraContractsBindings { alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) } ///Creates a new call builder for the [`blockPrologue`] function. - pub fn blockPrologue(&self) -> alloy_contract::SolCallBuilder<&P, blockPrologueCall, N> { + pub fn blockPrologue( + &self, + ) -> alloy_contract::SolCallBuilder<&P, blockPrologueCall, N> { self.call_builder(&blockPrologueCall) } ///Creates a new call builder for the [`getAllActiveTaskIds`] function. @@ -3187,9 +3599,11 @@ pub mod SupraContractsBindings { ) -> alloy_contract::SolCallBuilder<&P, getAllActiveTaskIdsCall, N> { self.call_builder(&getAllActiveTaskIdsCall) } - ///Creates a new call builder for the [`getCycleInfo`] function. - pub fn getCycleInfo(&self) -> alloy_contract::SolCallBuilder<&P, getCycleInfoCall, N> { - self.call_builder(&getCycleInfoCall) + ///Creates a new call builder for the [`getCycleStateDetails`] function. + pub fn getCycleStateDetails( + &self, + ) -> alloy_contract::SolCallBuilder<&P, getCycleStateDetailsCall, N> { + self.call_builder(&getCycleStateDetailsCall) } ///Creates a new call builder for the [`getTaskDetails`] function. pub fn getTaskDetails( @@ -3203,24 +3617,17 @@ pub mod SupraContractsBindings { &self, _taskIndexes: alloy::sol_types::private::Vec, ) -> alloy_contract::SolCallBuilder<&P, getTaskDetailsBulkCall, N> { - self.call_builder(&getTaskDetailsBulkCall { _taskIndexes }) + self.call_builder( + &getTaskDetailsBulkCall { + _taskIndexes, + }, + ) } ///Creates a new call builder for the [`getTaskIdList`] function. - pub fn getTaskIdList(&self) -> alloy_contract::SolCallBuilder<&P, getTaskIdListCall, N> { - self.call_builder(&getTaskIdListCall) - } - ///Creates a new call builder for the [`getTransitionInfo`] function. - pub fn getTransitionInfo( + pub fn getTaskIdList( &self, - ) -> alloy_contract::SolCallBuilder<&P, getTransitionInfoCall, N> { - self.call_builder(&getTransitionInfoCall) - } - ///Creates a new call builder for the [`ifTaskExists`] function. - pub fn ifTaskExists( - &self, - _taskIndex: u64, - ) -> alloy_contract::SolCallBuilder<&P, ifTaskExistsCall, N> { - self.call_builder(&ifTaskExistsCall { _taskIndex }) + ) -> alloy_contract::SolCallBuilder<&P, getTaskIdListCall, N> { + self.call_builder(&getTaskIdListCall) } ///Creates a new call builder for the [`isAutomationEnabled`] function. pub fn isAutomationEnabled( @@ -3234,16 +3641,19 @@ pub mod SupraContractsBindings { _cycleIndex: u64, _taskIndexes: alloy::sol_types::private::Vec, ) -> alloy_contract::SolCallBuilder<&P, processTasksCall, N> { - self.call_builder(&processTasksCall { - _cycleIndex, - _taskIndexes, - }) + self.call_builder( + &processTasksCall { + _cycleIndex, + _taskIndexes, + }, + ) } } /// Event filters. - impl, N: alloy_contract::private::Network> - SupraContractsBindingsInstance - { + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > SupraContractsBindingsInstance { /// Creates a new event filter using this contract instance's provider and address. /// /// Note that the type can be any event, not just those defined in this contract. diff --git a/crates/supra-extension/src/transactions/automated_transaction.rs b/crates/supra-extension/src/transactions/automated_transaction.rs index 8e9615699c..4b3934f7e8 100644 --- a/crates/supra-extension/src/transactions/automated_transaction.rs +++ b/crates/supra-extension/src/transactions/automated_transaction.rs @@ -441,11 +441,13 @@ impl TryFrom for AutomatedTransactionBuilder { maxGasAmount, gasPriceCap, automationFeeCapForCycle: _, - lockedFeeForNextCycle: _, + depositFee: _, txHash, taskIndex, registrationTime: _, expiryTime, + priority, + taskType, owner, state, payloadTx, diff --git a/solidity/supra_contracts/src/AutomationController.sol b/solidity/supra_contracts/src/AutomationController.sol index e2f5ba6914..02a0ac67c7 100644 --- a/solidity/supra_contracts/src/AutomationController.sol +++ b/solidity/supra_contracts/src/AutomationController.sol @@ -732,7 +732,17 @@ contract AutomationController is IAutomationController, Ownable2StepUpgradeable, return (cycleInfo.index(), cycleInfo.startTime(), cycleInfo.durationSecs(), cycleInfo.state()); } - /// @notice Returns the duration of the current cycle. + /// @notice Returns the index, start time, duration, state, transition details if any of the current cycle. + function getCycleStateDetails() external view returns (CommonUtils.CycleDetails memory details) { + details.index = cycleInfo.index(); + details.startTime = cycleInfo.startTime(); + details.durationSecs = cycleInfo.durationSecs(); + details.state = cycleInfo.state(); + details.nextTaskIndexPosition = cycleInfo.nextTaskIndexPosition(); + details.expectedTasksToBeProcessed = cycleInfo.getExpectedTasksToBeProcessed(); + } + + /// @notice Returns the duration of the current cycle. function getCycleDuration() external view returns (uint64) { return cycleInfo.durationSecs(); } diff --git a/solidity/supra_contracts/src/CommonUtils.sol b/solidity/supra_contracts/src/CommonUtils.sol index a43d8528ce..ee30850f8e 100644 --- a/solidity/supra_contracts/src/CommonUtils.sol +++ b/solidity/supra_contracts/src/CommonUtils.sol @@ -52,6 +52,16 @@ library CommonUtils { bytes[] auxData; } + /// @notice Cycle details + struct CycleDetails { + uint64 index; + uint64 startTime; + uint64 durationSecs; + CycleState state; + uint64 nextTaskIndexPosition; + uint64[] expectedTasksToBeProcessed; + } + function getTaskDetails(LibRegistry.TaskMetadata storage t) internal view returns (TaskDetails memory details) { // --- Decode maxGasAmount (upper 128 bits) --- details.maxGasAmount = uint128(t.maxGasAmount_gasPriceCap >> 128); diff --git a/solidity/supra_contracts/src/LibController.sol b/solidity/supra_contracts/src/LibController.sol index f6f07b7a7e..dc38665d27 100644 --- a/solidity/supra_contracts/src/LibController.sol +++ b/solidity/supra_contracts/src/LibController.sol @@ -158,6 +158,10 @@ library LibController { return uint64(cycle.transitionState.refundDuration_newCycleDuration_nextTaskIndexPosition >> 64); } + function getExpectedTasksToBeProcessed(AutomationCycleInfo storage cycle) internal view returns (uint64[] memory) { + return uintSetToUint64Array(cycle.transitionState.expectedTasksToBeProcessed); + } + function setRefundDuration(AutomationCycleInfo storage cycle, uint64 refund) internal { TransitionState storage ts = cycle.transitionState; @@ -198,9 +202,20 @@ library LibController { bool isRemoved; } + /// @notice Converts an EnumerableSet.UintSet to a uint64 array. + /// @param set The UintSet to convert. + /// @return result The values as a uint64 array. + function uintSetToUint64Array(EnumerableSet.UintSet storage set) internal view returns (uint64[] memory result) { + uint256 length = EnumerableSet.length(set); + result = new uint64[](length); + for (uint256 i = 0; i < length; i++) { + result[i] = uint64(EnumerableSet.at(set, i)); + } + } + /// @notice Helper function to sort an array. /// @param arr Input array to sort. - /// @return Returns the sorted array. + /// @return Returns the sorted array. function sortUint64(uint64[] memory arr) internal pure returns (uint64[] memory) { uint256 length = arr.length; for (uint256 i = 0; i < length; i++) { diff --git a/solidity/supra_contracts/src/SupraContractsBindings.sol b/solidity/supra_contracts/src/SupraContractsBindings.sol index 23039776a1..a361fbde7c 100644 --- a/solidity/supra_contracts/src/SupraContractsBindings.sol +++ b/solidity/supra_contracts/src/SupraContractsBindings.sol @@ -6,17 +6,14 @@ import {CommonUtils} from "./CommonUtils.sol"; interface SupraContractsBindings { // View functions of AutomationRegistry - function ifTaskExists(uint64 _taskIndex) external view returns (bool); function getAllActiveTaskIds() external view returns (uint256[] memory); function getTaskIdList() external view returns (uint256[] memory); - function isAutomationEnabled() external view returns (bool); - function getTaskDetails(uint64 _taskIndex) external view returns (CommonUtils.TaskDetails memory); function getTaskDetailsBulk(uint64[] memory _taskIndexes) external view returns (CommonUtils.TaskDetails[] memory); // View functions of AutomationController - function getCycleInfo() external view returns(uint64, uint64, uint64, CommonUtils.CycleState); - function getTransitionInfo() external view returns (uint64, uint128); + function getCycleStateDetails() external view returns (CommonUtils.CycleDetails memory details); + function isAutomationEnabled() external view returns (bool); // Entry function to be called by node runtime for bookkeeping function processTasks(uint64 _cycleIndex, uint64[] memory _taskIndexes) external;