Skip to content
Merged
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
fmt
  • Loading branch information
ascjones committed Feb 26, 2024
commit e6c46c967fa7b95dcc8821f414f6a933433665f8
16 changes: 11 additions & 5 deletions integration-tests/cross-contract-calls/e2e_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ async fn flip_and_get<Client: E2EBackend>(mut client: Client) -> E2EResult<()> {
}

#[ink_e2e::test]
async fn instantiate_v2_with_limits<Client: E2EBackend>(mut client: Client) -> E2EResult<()> {
async fn instantiate_v2_with_limits<Client: E2EBackend>(
mut client: Client,
) -> E2EResult<()> {
// given
let other_contract_code = client
.upload("other-contract", &ink_e2e::alice())
Expand All @@ -47,10 +49,11 @@ async fn instantiate_v2_with_limits<Client: E2EBackend>(mut client: Client) -> E
const PROOF_TIME_LIMIT: u64 = 100_000;
const STORAGE_DEPOSIT_LIMIT: u128 = 1_000_000_000;

let mut constructor = CrossContractCallsRef::new_v2_with_limits(other_contract_code.code_hash,
let mut constructor = CrossContractCallsRef::new_v2_with_limits(
other_contract_code.code_hash,
REF_TIME_LIMIT,
PROOF_TIME_LIMIT,
STORAGE_DEPOSIT_LIMIT
STORAGE_DEPOSIT_LIMIT,
);
let contract = client
.instantiate("cross-contract-calls", &ink_e2e::alice(), &mut constructor)
Expand All @@ -61,15 +64,18 @@ async fn instantiate_v2_with_limits<Client: E2EBackend>(mut client: Client) -> E
}

#[ink_e2e::test]
async fn instantiate_v2_no_limits<Client: E2EBackend>(mut client: Client) -> E2EResult<()> {
async fn instantiate_v2_no_limits<Client: E2EBackend>(
mut client: Client,
) -> E2EResult<()> {
// given
let other_contract_code = client
.upload("other-contract", &ink_e2e::alice())
.submit()
.await
.expect("other_contract upload failed");

let mut constructor = CrossContractCallsRef::new_v2_no_limits(other_contract_code.code_hash);
let mut constructor =
CrossContractCallsRef::new_v2_no_limits(other_contract_code.code_hash);
let contract = client
.instantiate("cross-contract-calls", &ink_e2e::alice(), &mut constructor)
.submit()
Expand Down