Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: fmt
  • Loading branch information
davidsemakula committed Sep 9, 2025
commit 642671091e589e3f0ec90a2f03345c5da8ff153d
2 changes: 1 addition & 1 deletion crates/allocator/src/bump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ mod tests {
mod fuzz_tests {
use super::*;
use quickcheck::{
quickcheck,
TestResult,
quickcheck,
};
use std::mem::size_of;

Expand Down
2 changes: 1 addition & 1 deletion crates/e2e/macro/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ impl E2EConfig {
mod tests {
use super::*;
use darling::{
ast::NestedMeta,
FromMeta,
ast::NestedMeta,
};
use quote::quote;

Expand Down
2 changes: 1 addition & 1 deletion crates/e2e/macro/src/ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

use crate::config::E2EConfig;
use darling::{
ast::NestedMeta,
FromMeta,
ast::NestedMeta,
};
use proc_macro2::TokenStream as TokenStream2;

Expand Down
16 changes: 7 additions & 9 deletions crates/e2e/sandbox/src/api/revive_api.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
use crate::{
balance_to_evm_value,
AccountIdFor,
ContractExecResultFor,
ContractResultInstantiate,
Sandbox,
H256,
Sandbox,
balance_to_evm_value,
};
use frame_support::{
pallet_prelude::DispatchError,
sp_runtime::traits::Bounded,
traits::{
fungible::Inspect,
Time,
fungible::Inspect,
},
weights::Weight,
};
Expand All @@ -21,13 +21,13 @@ use ink_primitives::{
DepositLimit,
};
use pallet_revive::{
BumpNonce,
Code,
CodeUploadResult,
evm::{
Tracer,
TracerType,
},
BumpNonce,
Code,
CodeUploadResult,
};
use sp_core::U256;
use std::ops::Not;
Expand Down Expand Up @@ -147,11 +147,9 @@ impl<T> ContractAPI for T
where
T: Sandbox,
T::Runtime: pallet_revive::Config,

BalanceOf<T::Runtime>: Into<U256> + TryFrom<U256> + Bounded,
MomentOf<T::Runtime>: Into<U256>,
<<T as Sandbox>::Runtime as frame_system::Config>::Nonce: Into<u32>,

// todo
<<T as Sandbox>::Runtime as frame_system::Config>::Hash:
frame_support::traits::IsType<sp_core::H256>,
Expand Down Expand Up @@ -283,9 +281,9 @@ pub fn decode_debug_buffer(buffer: &[u8]) -> Vec<String> {
mod tests {
use super::*;
use crate::{
api::prelude::*,
DefaultSandbox,
RuntimeEventOf,
api::prelude::*,
};

const STORAGE_DEPOSIT_LIMIT: DepositLimit<u128> = DepositLimit::UnsafeOnlyForDryRun;
Expand Down
6 changes: 3 additions & 3 deletions crates/e2e/sandbox/src/api/system_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ use crate::{
Sandbox,
};
use frame_support::sp_runtime::{
DispatchResultWithInfo,
traits::{
Dispatchable,
Saturating,
},
DispatchResultWithInfo,
};
use frame_system::pallet_prelude::BlockNumberFor;

Expand Down Expand Up @@ -100,17 +100,17 @@ where
#[cfg(test)]
mod tests {
use crate::{
api::prelude::*,
DefaultSandbox,
RuntimeCall,
RuntimeEventOf,
RuntimeOf,
Sandbox,
api::prelude::*,
};
use frame_support::sp_runtime::{
traits::Dispatchable,
AccountId32,
DispatchResultWithInfo,
traits::Dispatchable,
};

fn make_transfer(
Expand Down
2 changes: 1 addition & 1 deletion crates/e2e/sandbox/src/api/timestamp_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ where
#[cfg(test)]
mod tests {
use crate::{
api::prelude::*,
DefaultSandbox,
api::prelude::*,
};

#[test]
Expand Down
2 changes: 1 addition & 1 deletion crates/e2e/sandbox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ use frame_support::{
traits::fungible::Inspect,
};
use frame_system::{
EventRecord,
pallet_prelude::{
BlockNumberFor,
OriginFor,
},
EventRecord,
};
use ink_primitives::U256;
pub use macros::{
Expand Down
10 changes: 5 additions & 5 deletions crates/e2e/sandbox/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ use std::time::SystemTime;

use frame_support::{
sp_runtime::{
BuildStorage,
traits::{
Header,
One,
},
BuildStorage,
},
traits::Hooks,
};
Expand All @@ -17,10 +17,10 @@ use sp_io::TestExternalities;
pub struct BlockBuilder<T>(std::marker::PhantomData<T>);

impl<
T: pallet_balances::Config
+ pallet_timestamp::Config<Moment = u64>
+ pallet_revive::Config,
> BlockBuilder<T>
T: pallet_balances::Config
+ pallet_timestamp::Config<Moment = u64>
+ pallet_revive::Config,
> BlockBuilder<T>
{
/// Create a new externalities with the given balances.
pub fn new_ext(balances: Vec<(T::AccountId, T::Balance)>) -> TestExternalities {
Expand Down
14 changes: 7 additions & 7 deletions crates/e2e/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,36 @@
// limitations under the License.

use ink_env::{
call::utils::DecodeMessageResult,
DefaultEnvironment,
Environment,
call::utils::DecodeMessageResult,
};
use ink_primitives::{
abi::AbiEncodeWith,
DepositLimit,
abi::AbiEncodeWith,
};
use jsonrpsee::core::async_trait;
use pallet_revive::evm::CallTrace;
use sp_weights::Weight;
use subxt::dynamic::Value;

use super::{
H256,
InstantiateDryRunResult,
Keypair,
H256,
};
use crate::{
CallBuilder,
CallBuilderFinal,
CallDryRunResult,
UploadResult,
backend_calls::{
InstantiateBuilder,
RemoveCodeBuilder,
UploadBuilder,
},
builders::CreateBuilderPartial,
contract_results::BareInstantiationResult,
CallBuilder,
CallBuilderFinal,
CallDryRunResult,
UploadResult,
};

/// Full E2E testing backend: combines general chain API and contract-specific operations.
Expand Down
14 changes: 7 additions & 7 deletions crates/e2e/src/backend_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@
use std::marker::PhantomData;

use ink_env::{
call::utils::DecodeMessageResult,
Environment,
call::utils::DecodeMessageResult,
};
use ink_primitives::{
abi::AbiEncodeWith,
DepositLimit,
abi::AbiEncodeWith,
};
use sp_weights::Weight;

use super::{
balance_to_deposit_limit,
balance_to_deposit_limit_dry_run,
InstantiateDryRunResult,
Keypair,
balance_to_deposit_limit,
balance_to_deposit_limit_dry_run,
};
use crate::{
backend::BuilderClient,
builders::CreateBuilderPartial,
CallBuilderFinal,
CallDryRunResult,
CallResult,
ContractsBackend,
H256,
InstantiationResult,
UploadResult,
H256,
backend::BuilderClient,
builders::CreateBuilderPartial,
};

/// Allows to build an end-to-end call using a builder pattern.
Expand Down
8 changes: 4 additions & 4 deletions crates/e2e/src/builders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
// limitations under the License.

use ink_env::{
Environment,
call::{
CreateBuilder,
ExecutionInput,
LimitParamsV2,
utils::{
ReturnType,
Set,
},
CreateBuilder,
ExecutionInput,
LimitParamsV2,
},
Environment,
};
use ink_primitives::abi::AbiEncodeWith;

Expand Down
2 changes: 1 addition & 1 deletion crates/e2e/src/contract_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

use std::{
collections::{
hash_map::Entry,
HashMap,
hash_map::Entry,
},
env,
path::{
Expand Down
8 changes: 4 additions & 4 deletions crates/e2e/src/contract_results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@ use frame_support::pallet_prelude::{
};
use ink::codegen::ContractCallBuilder;
use ink_env::{
Environment,
call::{
utils::DecodeMessageResult,
FromAddr,
utils::DecodeMessageResult,
},
Environment,
};
use ink_primitives::{
Address,
ConstructorResult,
MessageResult,
H256,
MessageResult,
};
use pallet_revive::{
evm::CallTrace,
CodeUploadResult,
ExecReturnValue,
InstantiateReturnValue,
StorageDeposit,
evm::CallTrace,
};
use sp_runtime::{
DispatchError,
Expand Down
6 changes: 3 additions & 3 deletions crates/e2e/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ pub use node_proc::{
pub use pallet_revive::evm::CallTrace;
#[cfg(feature = "sandbox")]
pub use sandbox_client::{
preset,
Client as SandboxClient,
preset,
};
pub use sp_keyring::Sr25519Keyring;
pub use subxt::{
Expand All @@ -77,8 +77,8 @@ pub use subxt_signer::{
self,
sr25519::{
self,
dev::*,
Keypair,
dev::*,
},
};
pub use tokio;
Expand All @@ -90,9 +90,9 @@ pub use ink_sandbox::DefaultSandbox;

use ink::codegen::ContractCallBuilder;
use ink_env::{
call::FromAddr,
ContractEnv,
Environment,
call::FromAddr,
};
use ink_primitives::{
Address,
Expand Down
4 changes: 2 additions & 2 deletions crates/e2e/src/node_proc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ use std::{
process,
};
use subxt::{
backend::rpc::RpcClient,
Config,
OnlineClient,
backend::rpc::RpcClient,
};

/// Spawn a local substrate node for testing.
Expand Down Expand Up @@ -246,8 +246,8 @@ fn find_substrate_port_from_output(r: impl Read + Send + 'static) -> u16 {
mod tests {
use super::*;
use subxt::{
backend::legacy::LegacyRpcMethods,
PolkadotConfig as SubxtConfig,
backend::legacy::LegacyRpcMethods,
};

#[tokio::test]
Expand Down
Loading