The fizzy contract was an insurance against flight delay issued in 2018 by the Axa insurance company :
the insurance contract (in french).
the ethereum smart contract
Below is the direct transcription of the fizzy contract in archetype.
fizzy.arlarchetype fizzyvariable creator : role = @tz1Lc2qBKEWCBeDU8npG6zCeCqpmaegRi6Jgenum status =| Created| Before (* flight landed before the limit *)| After (* flight landed after the limit *)| Cancelled (* cancelled by the user *)| FlightCancelled (* flight cancelled by the air company *)| Redirected (* flight redirected *)| Diverted (* flight diverted *)asset insurance {productid : string;limit : date;premium : tez;indemnity : tez;product : string;stat : status = Created;}asset flight identified by id {id : string;insurances : partition<insurance>;}entry addflightinsurance (fi : string, iproductid : string, ilimit : date, ipremium : tez, iindemnity : tez, iproduct : string, istat : status) {called by creatoreffect {if (not flight.contains (fi)) thenflight.add({ id = fi; insurances = [] });flight[fi].insurances.add({iproductid; ilimit; ipremium; iindemnity; iproduct; istat})}}(* data should be signed by oracle ... *)entry updatestatus (fi : string, arrival : date) {called by creatoreffect {for i in flight[fi].insurances domatch insurance[i].stat with| Created ->if arrival > insurance[i].limitthen insurance[i].stat := After| _ -> ()enddone}}entry manual (fi : string, pr : string, newst : status) {called by creatoreffect {for i in flight[fi].insurances.select(product = pr) domatch insurance[i].stat with| Created -> insurance[i].stat := newst| _ -> ()enddone}}security {(* any action on storage is performed only by the owner *)s1 : only_by_role (anyentry, creator);}