cancelOrder method

Future<TransactionBlock> cancelOrder({
  1. required String poolId,
  2. required int orderId,
})

Cancel an order.

poolId Object id of pool, created after invoking createPool, eg: "0xcaee8e1c046b58e55196105f1436a2337dcaa0c340a7a8c8baf65e4afb8823a4"

orderId orderId of a limit order, you can find them through function query.list_open_orders eg: "0"

Implementation

Future<TransactionBlock> cancelOrder({
  required String poolId,
  required int orderId
}) async {
		final txb = TransactionBlock();
		txb.moveCall(
			"$PACKAGE_ID::$MODULE_CLOB::cancel_order",
			typeArguments: await getPoolTypeArgs(poolId),
			arguments: [txb.object(poolId), txb.pureInt(orderId), txb.object(_checkAccountCap())],
		);
		return txb;
	}