Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/quietgarden/elm-web3 is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 1.0.0 found (5 same-name repos checked); no cached copy. Use another version.
Transaction lifecycle state machine.
Every transaction goes through explicit states. Pattern matching forces you to handle every case — no "transaction failed silently" bugs.
case tx.status of
Idle ->
viewBuyButton
AwaitingSignature ->
viewSigningSpinner
Submitted hash ->
viewPendingWithHash hash
Confirmed receipt ->
viewSuccess receipt
Failed err ->
viewError errMessages from the JS transaction port.
A confirmed transaction receipt, including emitted logs.
A single log entry emitted during a transaction.
Update transaction status from a port message.
Transitions are guarded to match the TLA+ GuardedNext specification:
Is this status terminal (no more updates expected)?
Apply a list of event decoders to the logs in a receipt, collecting all successfully decoded events.
type MyEvent
= Transfer { from : Address, to : Address, amount : BigInt }
| Approval { owner : Address, spender : Address, amount : BigInt }
decodeTransfer : EventLog -> Maybe MyEvent
decodeTransfer log =
-- match topic[0] to Transfer signature, then decode
...
events : List MyEvent
events =
parseReceiptEvents [ decodeTransfer, decodeApproval ] receipt
Transaction lifecycle status. Cannot be in an invalid state.