Is this the best way to do it?

I want to be able to check if there is no current group transaction.

Is Global.group_id() == BytesZero(Int(32)) the right way to do it?

1 Like

Be careful that a single transaction may be still use a non-zero group ID.

The best way is:

Global.group_size() == Int(1)

That being said, why are you trying to achieve the above?
Nowadays, I would recommend not doing it to allow composition of smart contract.
In addition, if your smart contract relies on it for some security reason, be careful that:

  1. block proposers can always fully control which transactions are added to a block and can most likely simulate group transactions
  2. smart contracts can issue inner transactions in a way that can simulate group transactions