diff --git a/smart-contracts/contracts/cl-vault/src/test_tube/proptest.rs b/smart-contracts/contracts/cl-vault/src/test_tube/proptest.rs index 99cec0d1d..66e262cba 100644 --- a/smart-contracts/contracts/cl-vault/src/test_tube/proptest.rs +++ b/smart-contracts/contracts/cl-vault/src/test_tube/proptest.rs @@ -451,7 +451,6 @@ mod tests { .unwrap() } - // TESTS proptest! { // setup the config with amount of cases, usable for setting different values on ci vs local #![proptest_config(ProptestConfig::with_cases(get_cases()))] @@ -463,7 +462,6 @@ mod tests { percentages in get_percentage_list(), account_indexes in get_account_index_list() ) { - // Creating test core let (app, contract_address, _cl_pool_id, admin_account, _deposit_ratio, _deposit_ratio_approx) = init_test_contract( "./test-tube-build/wasm32-unknown-unknown/release/cl_vault.wasm", &[ @@ -498,7 +496,6 @@ mod tests { let cl = ConcentratedLiquidity::new(&app); let bank = Bank::new(&app); - // Create a fixed number of accounts using app.init_accounts() function from test-tube, and assign a fixed initial balance for all of them let accounts = app .init_accounts(&[ Coin::new(ACCOUNTS_INITIAL_BALANCE, "uosmo"), @@ -509,23 +506,26 @@ mod tests { // Make one arbitrary deposit foreach one of the created accounts using 10.00% of its balance, to avoid complications on withdrawing without any position for i in 0..ACCOUNTS_NUMBER { + let account = &accounts[account_indexes[i as usize] as usize]; + println!("Account {}: {}", i, account.signing_key().public_key().to_string()); deposit(&wasm, &bank, &contract_address, &accounts[i as usize], 10.00, DENOM_BASE, DENOM_QUOTE); } - // Iterate iterations times for i in 0..ITERATIONS_NUMBER { - match actions[i] { + let idx = account_indexes[i] as usize; + let account = &accounts[idx]; + let percentage = percentages[i]; + let action = actions[i]; + println!("Action for account {} with percentage {} and action {:?}", idx, percentage, action); + match action { Action::Deposit => { - deposit(&wasm, &bank, &contract_address, &accounts[account_indexes[i] as usize], percentages[i], DENOM_BASE, DENOM_QUOTE); + deposit(&wasm, &bank, &contract_address, account, percentage, DENOM_BASE, DENOM_QUOTE); }, Action::Withdraw => { - withdraw(&wasm, &contract_address, &accounts[account_indexes[i] as usize], percentages[i]); + withdraw(&wasm, &contract_address, account, percentage); }, - // Action::Swap => { - // swap(&wasm, &bank, &contract_address, &accounts[account_indexes[i] as usize], percentages[i], cl_pool_id); - // }, Action::UpdateRange => { - update_range(&wasm, &cl, &contract_address, percentages[i], &admin_account); + update_range(&wasm, &cl, &contract_address, percentage, &admin_account); }, } }