AirWayBill

DOCUMENTSUTILITYTOOLS

Contract purpose

Smart Contract that implements an air waybill (AWB).

Contract parameters

_shipper: ethereum address of the shipper

_shipperName : name of the shipper company

_carrier: ethereum address of the carrier

_carrierName: name of the carrier company

Exposed methods and variables

originAirportCode returns the airport code from where the package is shipped

destinationAirportCode returns the airport code to where the package is shipped

description returns the description of the package content

value returns the value of the shipped goods

grossWeight returns the total weight of the package

pAdded returns true if the package details were added to the contract

pAtOrigin returns true if the package arrived at the origin airport

pAtDestination returns true if the package arrived at the second airport

addPackageDetails called by the current shipper to set the package details and emits the AddedPackage event

parameter nametypedetails
_descriptionstringshipped goods description
_valueintegerthe value of the package
_grossWeightintegerthe weight of the package

packageAtOrigin called by the carrier, after the details were set, to mark that the package is at the first airport. It emits the IsAtOrigin event

parameter nametypedetails
_originAirportCodestringthe code of the first airport

packageAtDestination called by the carrier, after the previous function, to mark that the package arrived at the second airport. It emits the IsAtDestination event

parameter nametypedetails
_destinationAirportCodestringthe code of the second airport

Events

AddedPackage

parameter nametypedetails
addedbooleantrue when the package details are added to the contract

IsAtOrigin

parameter nametypedetails
airportCodestringthe airport code from where the package is shipped

IsAtDestination

parameter nametypedetails
airportCodestringthe airport code where the package arrived
Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract