tfchain icon indicating copy to clipboard operation
tfchain copied to clipboard

Evaluate the Use of `utility.force_batch` in the TFChain Go Client

Open sameh-farouk opened this issue 5 months ago • 0 comments

Currently, the TFChain Go client provides two methods for batch-creating contracts:

  1. BatchAllCreateContract: Utilizes Utility.batch_all, which stops on the first error and reverts all transactions (all-or-nothing approach).
  2. BatchCreateContract: Utilizes Utility.batch, which stops on the first error and only reverts the failed transaction (fail-fast approach).

We should evaluate the potential benefit of adding a third option using the Utility.force_batch call. This approach does not stop on error and only reverts the failed transactions, allowing the others to continue (keep-going approach).

If deployer tools could benefit from this behavior, it may be worth incorporating this feature into the TFChain clients.

sameh-farouk avatar Sep 22 '24 11:09 sameh-farouk