diff --git a/src/testcases/run_in_band/dex_bindings.test.ts b/src/testcases/run_in_band/dex_bindings.test.ts index 1d7a7bb3..67c32aae 100644 --- a/src/testcases/run_in_band/dex_bindings.test.ts +++ b/src/testcases/run_in_band/dex_bindings.test.ts @@ -464,19 +464,6 @@ describe('Neutron / dex module bindings', () => { ['TrancheKey'], )[0]['TrancheKey']; - // swap through a bit of it - await neutronClient.execute(contractAddress, { - place_limit_order: { - receiver: contractAddress, - token_in: 'uibcusdc', - token_out: 'untrn', - tick_index_in_to_out: 0, - limit_sell_price: '1', - amount_in: '1000', - order_type: 'IMMEDIATE_OR_CANCEL', - }, - }); - // create an expired tranche const res2 = await neutronClient.execute(contractAddress, { place_limit_order: { @@ -669,127 +656,5 @@ describe('Neutron / dex module bindings', () => { }); expect(res.pool_metadata.length).toBeGreaterThan(0); }); - test('SimulateDeposit', async () => { - const res = await neutronClient.queryContractSmart(contractAddress, { - simulate_deposit: { - msg: { - token_a: 'untrn', - token_b: 'uibcusdc', - amounts_a: ['100'], - amounts_b: ['0'], - tick_indexes_a_to_b: [0], - fees: [1], - options: [{ disable_autoswap: true, fail_tx_on_bel: false }], - }, - }, - }); - expect(res.resp.reserve0_deposited[0]).toBe('0'); - expect(res.resp.reserve1_deposited[0]).toBe('100'); - expect(res.resp.shares_issued[0].amount).toBe('100'); - }); - test('SimulateDeposit failed deposit', async () => { - const res = await neutronClient.queryContractSmart(contractAddress, { - simulate_deposit: { - msg: { - token_a: 'untrn', - token_b: 'uibcusdc', - amounts_a: ['0'], - amounts_b: ['100'], - tick_indexes_a_to_b: [0], - fees: [1], - options: [{ disable_autoswap: true, fail_tx_on_bel: false }], - }, - }, - }); - expect(res.resp.failed_deposits[0].error).contains('deposit failed'); - }); - test('SimulateWithdrawal', async () => { - const res = await neutronClient.queryContractSmart(contractAddress, { - simulate_withdrawal: { - msg: { - creator: contractAddress, - receiver: contractAddress, - token_a: 'untrn', - token_b: 'uibcusdc', - shares_to_remove: ['10'], - tick_indexes_a_to_b: [1], - fees: [0], - }, - }, - }); - expect(res.resp.reserve1_withdrawn).toBe('10'); - expect(res.resp.shares_burned[0].amount).toBe('10'); - }); - test('SimulatePlaceLimitOrder', async () => { - const res = await neutronClient.queryContractSmart(contractAddress, { - simulate_place_limit_order: { - msg: { - token_in: 'uibcusdc', - token_out: 'untrn', - tick_index_in_to_out: 0, - limit_sell_price: '1.2', - amount_in: '10000', - order_type: 'FILL_OR_KILL', - }, - }, - }); - expect(res.resp.taker_coin_out.amount).toBe('12212'); - expect(res.resp.taker_coin_in.amount).toBe('10000'); - expect(res.resp.coin_in.amount).toBe('10000'); - }), - test('SimulateWithdrawFilledLimitOrder', async () => { - const res = await neutronClient.queryContractSmart(contractAddress, { - simulate_withdraw_filled_limit_order: { - msg: { - creator: contractAddress, - tranche_key: activeTrancheKey, - }, - }, - }); - expect(res.resp.taker_coin_out.amount).toBe('998'); - expect(res.resp.maker_coin_out.amount).toBe('0'); - }); - test('SimulateCancelLimitOrder', async () => { - const res = await neutronClient.queryContractSmart(contractAddress, { - simulate_cancel_limit_order: { - msg: { - creator: contractAddress, - tranche_key: activeTrancheKey, - }, - }, - }); - expect(res.resp.taker_coin_out.amount).toBe('998'); - expect(res.resp.maker_coin_out.amount).toBe('998779'); - }); - test('SimulateMultiHopSwap', async () => { - const res = await neutronClient.queryContractSmart(contractAddress, { - simulate_multi_hop_swap: { - msg: { - receiver: contractAddress, - routes: [ - { - hops: [ - multiHopSwapDenoms[0].denom, - multiHopSwapDenoms[1].denom, - multiHopSwapDenoms[2].denom, - multiHopSwapDenoms[3].denom, - multiHopSwapDenoms[4].denom, - multiHopSwapDenoms[5].denom, - multiHopSwapDenoms[6].denom, - multiHopSwapDenoms[7].denom, - multiHopSwapDenoms[8].denom, - multiHopSwapDenoms[9].denom, - ], - }, - ], - amount_in: '100', - exit_limit_price: '0.1', - pick_best_route: true, - }, - }, - }); - expect(res.resp.coin_out.amount).toBe('91'); - expect(res.resp.route.hops.length).toBe(10); - }); }); });