Write Functions Tx
createBatch(string name)
Deploy a new batch into the pipeline at Step 0 — LEC Crystal Growth.
advanceBatch(uint256 batchId)
Advance a batch to the next manufacturing step. Only the batch owner can call.
abandonBatch(uint256 batchId)
Mark a batch as abandoned mid-pipeline. Simulates a yield failure. Irreversible.
setStepNote(uint256 batchId, uint8 step, string note)
Attach a process note to a completed step — e.g. "Threshold 9.8mA PASS".
Step (0–5)
Read Functions Free
getBatch(uint256 batchId)
Full batch details — owner, step, timestamps, complete status.
getBatchesByOwner(address owner)
Returns all batch IDs owned by an address.
getBatchCount()
Total number of batches ever created on this contract.
timeAtCurrentStep(uint256 batchId)
Seconds this batch has been at its current step.
getBatchSteps(uint256 batchId)
All 6 step timestamps and attached notes for a batch.