setReadWrite

Sets the read-write portion of the storage footprint.

The read-write footprint contains ledger keys that the transaction will both read and potentially modify. This includes:

  • Contract data being written

  • Account balances being updated

  • Contract state being modified

Footprint Requirements

All ledger entries modified by a Soroban transaction MUST be in the read-write footprint. Attempting to modify entries only in read-only or not in the footprint causes transaction failure.

Null Behavior

  • null: Leaves the read-write footprint unchanged

  • Empty collection: Clears the read-write footprint

  • Non-empty collection: Replaces the read-write footprint

Return

This builder instance for chaining

Parameters

readWrite

The ledger keys to set as read-write (null to leave unchanged)