Contract purpose

Smart Contract that enables insurance companies to directly transfer payment compensation to clients in case their flights are delayed or canceled.

Contract parameters

manager : address of the system manager

Exposed methods and variables

addFlight : allows the manager to introduce a new flight for which there are reservations made

parameter name

type

details

_flightNr

string

the unique alpha-numeric identifier of the flight

addReservation : the manager can introduce a reservation linked to a specific flight and he also needs to send to the contract the amount of ether equivalent to the maximum of cancellation and delay compensations for the client and emits reservationAdded event

parameter name

type

details

_client

ethereum address

the address of the client

_restNr

string

the unique alpha-numeric identifier of the reservation

_flightNr

string

the unique alpha-numeric identifier of the flight

_delayCompensation

integer

the sum the company will pay the client if the flight is delayed

_cancelCompensation

integer

the sum the company will pay the client if the flight is cancelled

flightIsDelayed : the manager marks the flight as delayed and the money will automatically be sent to the clients and what remains is sent back to the manager and emits delayedFlight event

parameter name

type

details

_flightNr

string

the unique alpha-numeric identifier of the flight

flightIsCancelled : the manager marks the flight as cancelled and the money will automatically be sent to the clients and what remains is sent back to the manager and emits cancelledFlight event

parameter name

type

details

_flightNr

string

the unique alpha-numeric identifier of the flight

flightLandedOk : if the flight has no problem, the money goes back to the manager