pub fn init(
        &mut self,
        price: U256,
        fee: u32,
        tick_spacing: u8,
        max_liquidity_per_tick: u128,
    ) -> Result<(), Revert> {
        assert_or!(!self.initialised.get(), Error::PoolAlreadyInitialised);
        assert_or!(fee <= 10000, Error::BadFee);

        self.initialised.set(true);

        self.sqrt_price.set(price);
        self.cur_tick
            .set(I32::lib(&tick_math::get_tick_at_sqrt_ratio(price)?));

        self.fee.set(U32::lib(&fee));
        self.tick_spacing.set(U8::lib(&tick_spacing));
        self.max_liquidity_per_tick
            .set(U128::lib(&max_liquidity_per_tick));

        Ok(())
    }
pub fn init(
    &mut self,
    price: U256,
    fee: u32,
    tick_spacing: u8,
    max_liquidity_per_tick: u128,
) -> Result<(), Revert> {
    assert_or!(!self.initialised.get(), Error::PoolAlreadyInitialised);
    assert_or!(fee <= 10000, Error::BadFee);

    self.initialised.set(true);
+   self.enabled.set(true);  // Enable pool after initialization

    self.sqrt_price.set(price);
    self.cur_tick
        .set(I32::lib(&tick_math::get_tick_at_sqrt_ratio(price)?));

    self.fee.set(U32::lib(&fee));
    self.tick_spacing.set(U8::lib(&tick_spacing));
    self.max_liquidity_per_tick
        .set(U128::lib(&max_liquidity_per_tick));

    Ok(())
}
