Skip to content

Commit 8d81f12

Browse files
azixusCluEleSsUK
authored andcommitted
fix: check bindings on updating generated & update bindings (#209)
* chore: clippy fixes * fix(ci): check rust bindings on changing generated * fix(rust-bindings): update bindings * fix(ci): fix generated path * fix: restore correct onlyswaps-solidity commit hash
1 parent 3bc5d14 commit 8d81f12

24 files changed

Lines changed: 463 additions & 4279 deletions

crates/generated/src/blocklock/blocklock_sender.rs

Lines changed: 32 additions & 446 deletions
Large diffs are not rendered by default.

crates/generated/src/blocklock/blocklock_signature_scheme.rs

Lines changed: 17 additions & 114 deletions
Large diffs are not rendered by default.

crates/generated/src/blocklock/decryption_sender.rs

Lines changed: 25 additions & 270 deletions
Large diffs are not rendered by default.

crates/generated/src/blocklock/i_blocklock_sender.rs

Lines changed: 30 additions & 130 deletions
Large diffs are not rendered by default.

crates/generated/src/blocklock/i_decryption_sender.rs

Lines changed: 23 additions & 88 deletions
Large diffs are not rendered by default.

crates/generated/src/blocklock/i_signature_scheme_address_provider.rs

Lines changed: 16 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ function getSignatureSchemeAddress(string memory schemeID) external view returns
131131
use alloy::sol_types as alloy_sol_types;
132132
{
133133
#[doc(hidden)]
134-
#[allow(dead_code)]
135134
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,);
136135
#[doc(hidden)]
137136
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,);
@@ -165,7 +164,6 @@ function getSignatureSchemeAddress(string memory schemeID) external view returns
165164
}
166165
{
167166
#[doc(hidden)]
168-
#[allow(dead_code)]
169167
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
170168
#[doc(hidden)]
171169
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
@@ -287,7 +285,6 @@ function isSupportedScheme(string memory schemeID) external view returns (bool);
287285
use alloy::sol_types as alloy_sol_types;
288286
{
289287
#[doc(hidden)]
290-
#[allow(dead_code)]
291288
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,);
292289
#[doc(hidden)]
293290
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,);
@@ -321,7 +318,6 @@ function isSupportedScheme(string memory schemeID) external view returns (bool);
321318
}
322319
{
323320
#[doc(hidden)]
324-
#[allow(dead_code)]
325321
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
326322
#[doc(hidden)]
327323
type UnderlyingRustTuple<'a> = (bool,);
@@ -440,7 +436,6 @@ function updateSignatureScheme(string memory schemeID, address schemeAddress) ex
440436
use alloy::sol_types as alloy_sol_types;
441437
{
442438
#[doc(hidden)]
443-
#[allow(dead_code)]
444439
type UnderlyingSolTuple<'a> = (
445440
alloy::sol_types::sol_data::String,
446441
alloy::sol_types::sol_data::Address,
@@ -483,7 +478,6 @@ function updateSignatureScheme(string memory schemeID, address schemeAddress) ex
483478
}
484479
{
485480
#[doc(hidden)]
486-
#[allow(dead_code)]
487481
type UnderlyingSolTuple<'a> = ();
488482
#[doc(hidden)]
489483
type UnderlyingRustTuple<'a> = ();
@@ -580,7 +574,6 @@ function updateSignatureScheme(string memory schemeID, address schemeAddress) ex
580574
}
581575
};
582576
///Container for all the [`ISignatureSchemeAddressProvider`](self) function calls.
583-
#[derive(Clone)]
584577
#[derive(serde::Serialize, serde::Deserialize)]
585578
#[derive()]
586579
pub enum ISignatureSchemeAddressProviderCalls {
@@ -591,6 +584,7 @@ function updateSignatureScheme(string memory schemeID, address schemeAddress) ex
591584
#[allow(missing_docs)]
592585
updateSignatureScheme(updateSignatureSchemeCall),
593586
}
587+
#[automatically_derived]
594588
impl ISignatureSchemeAddressProviderCalls {
595589
/// All the selectors of this enum.
596590
///
@@ -603,38 +597,6 @@ function updateSignatureScheme(string memory schemeID, address schemeAddress) ex
603597
[91u8, 176u8, 156u8, 248u8],
604598
[186u8, 184u8, 103u8, 218u8],
605599
];
606-
/// The names of the variants in the same order as `SELECTORS`.
607-
pub const VARIANT_NAMES: &'static [&'static str] = &[
608-
::core::stringify!(isSupportedScheme),
609-
::core::stringify!(getSignatureSchemeAddress),
610-
::core::stringify!(updateSignatureScheme),
611-
];
612-
/// The signatures in the same order as `SELECTORS`.
613-
pub const SIGNATURES: &'static [&'static str] = &[
614-
<isSupportedSchemeCall as alloy_sol_types::SolCall>::SIGNATURE,
615-
<getSignatureSchemeAddressCall as alloy_sol_types::SolCall>::SIGNATURE,
616-
<updateSignatureSchemeCall as alloy_sol_types::SolCall>::SIGNATURE,
617-
];
618-
/// Returns the signature for the given selector, if known.
619-
#[inline]
620-
pub fn signature_by_selector(
621-
selector: [u8; 4usize],
622-
) -> ::core::option::Option<&'static str> {
623-
match Self::SELECTORS.binary_search(&selector) {
624-
::core::result::Result::Ok(idx) => {
625-
::core::option::Option::Some(Self::SIGNATURES[idx])
626-
}
627-
::core::result::Result::Err(_) => ::core::option::Option::None,
628-
}
629-
}
630-
/// Returns the enum variant name for the given selector, if known.
631-
#[inline]
632-
pub fn name_by_selector(
633-
selector: [u8; 4usize],
634-
) -> ::core::option::Option<&'static str> {
635-
let sig = Self::signature_by_selector(selector)?;
636-
sig.split_once('(').map(|(name, _)| name)
637-
}
638600
}
639601
#[automatically_derived]
640602
impl alloy_sol_types::SolInterface for ISignatureSchemeAddressProviderCalls {
@@ -831,9 +793,9 @@ See the [wrapper's documentation](`ISignatureSchemeAddressProviderInstance`) for
831793
N: alloy_contract::private::Network,
832794
>(
833795
address: alloy_sol_types::private::Address,
834-
__provider: P,
796+
provider: P,
835797
) -> ISignatureSchemeAddressProviderInstance<P, N> {
836-
ISignatureSchemeAddressProviderInstance::<P, N>::new(address, __provider)
798+
ISignatureSchemeAddressProviderInstance::<P, N>::new(address, provider)
837799
}
838800
/**Deploys this contract using the given `provider` and constructor arguments, if any.
839801
@@ -845,11 +807,11 @@ For more fine-grained control over the deployment process, use [`deploy_builder`
845807
P: alloy_contract::private::Provider<N>,
846808
N: alloy_contract::private::Network,
847809
>(
848-
__provider: P,
810+
provider: P,
849811
) -> impl ::core::future::Future<
850812
Output = alloy_contract::Result<ISignatureSchemeAddressProviderInstance<P, N>>,
851813
> {
852-
ISignatureSchemeAddressProviderInstance::<P, N>::deploy(__provider)
814+
ISignatureSchemeAddressProviderInstance::<P, N>::deploy(provider)
853815
}
854816
/**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
855817
and constructor arguments, if any.
@@ -860,8 +822,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/
860822
pub fn deploy_builder<
861823
P: alloy_contract::private::Provider<N>,
862824
N: alloy_contract::private::Network,
863-
>(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
864-
ISignatureSchemeAddressProviderInstance::<P, N>::deploy_builder(__provider)
825+
>(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
826+
ISignatureSchemeAddressProviderInstance::<P, N>::deploy_builder(provider)
865827
}
866828
/**A [`ISignatureSchemeAddressProvider`](self) instance.
867829
@@ -893,6 +855,7 @@ See the [module-level documentation](self) for all the available methods.*/
893855
}
894856
}
895857
/// Instantiation and getters/setters.
858+
#[automatically_derived]
896859
impl<
897860
P: alloy_contract::private::Provider<N>,
898861
N: alloy_contract::private::Network,
@@ -903,11 +866,11 @@ See the [wrapper's documentation](`ISignatureSchemeAddressProviderInstance`) for
903866
#[inline]
904867
pub const fn new(
905868
address: alloy_sol_types::private::Address,
906-
__provider: P,
869+
provider: P,
907870
) -> Self {
908871
Self {
909872
address,
910-
provider: __provider,
873+
provider,
911874
_network: ::core::marker::PhantomData,
912875
}
913876
}
@@ -918,9 +881,9 @@ Returns a new instance of the contract, if the deployment was successful.
918881
For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
919882
#[inline]
920883
pub async fn deploy(
921-
__provider: P,
884+
provider: P,
922885
) -> alloy_contract::Result<ISignatureSchemeAddressProviderInstance<P, N>> {
923-
let call_builder = Self::deploy_builder(__provider);
886+
let call_builder = Self::deploy_builder(provider);
924887
let contract_address = call_builder.deploy().await?;
925888
Ok(Self::new(contract_address, call_builder.provider))
926889
}
@@ -930,9 +893,9 @@ and constructor arguments, if any.
930893
This is a simple wrapper around creating a `RawCallBuilder` with the data set to
931894
the bytecode concatenated with the constructor's ABI-encoded arguments.*/
932895
#[inline]
933-
pub fn deploy_builder(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
896+
pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
934897
alloy_contract::RawCallBuilder::new_raw_deploy(
935-
__provider,
898+
provider,
936899
::core::clone::Clone::clone(&BYTECODE),
937900
)
938901
}
@@ -971,6 +934,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/
971934
}
972935
}
973936
/// Function calls.
937+
#[automatically_derived]
974938
impl<
975939
P: alloy_contract::private::Provider<N>,
976940
N: alloy_contract::private::Network,
@@ -1018,6 +982,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/
1018982
}
1019983
}
1020984
/// Event filters.
985+
#[automatically_derived]
1021986
impl<
1022987
P: alloy_contract::private::Provider<N>,
1023988
N: alloy_contract::private::Network,

0 commit comments

Comments
 (0)