Severity: Low (gas). From the 2026-07-29 cross-repo audit.
Three small items in the fund-moving paths:
contracts/src/RAIL0.sol:78 — _reentrancyStatus is regular storage; with solc 0.8.27 + via-ir and all target chains post-Cancun, EIP-1153 transient storage (tstore/tload) saves ~2k gas on each of the six guarded entrypoints.
:392-393 — capture writes the same packed slot twice (capturableAmount, then refundableAmount); writing the whole PaymentState once (as authorize/charge do) removes reliance on the IR optimizer coalescing the writes.
:480 — refund re-reads _configHash[paymentId] although _loadAndVerify (:593) just loaded and verified it; returning the hash from _loadAndVerify drops the extra SLOAD.
Bundle with the next version bump — not worth a deployment on their own.
Severity: Low (gas). From the 2026-07-29 cross-repo audit.
Three small items in the fund-moving paths:
contracts/src/RAIL0.sol:78—_reentrancyStatusis regular storage; with solc 0.8.27 + via-ir and all target chains post-Cancun, EIP-1153 transient storage (tstore/tload) saves ~2k gas on each of the six guarded entrypoints.:392-393—capturewrites the same packed slot twice (capturableAmount, thenrefundableAmount); writing the wholePaymentStateonce (asauthorize/chargedo) removes reliance on the IR optimizer coalescing the writes.:480—refundre-reads_configHash[paymentId]although_loadAndVerify(:593) just loaded and verified it; returning the hash from_loadAndVerifydrops the extra SLOAD.Bundle with the next version bump — not worth a deployment on their own.