BillOfLading

Under Review

UTILITYFINANCIALDOCUMENTS

Contract purpose

A bill of lading is a legal document between a shipper and a carrier that details the type, quantity and destination of the goods being carried. The bill of lading also serves as a shipment receipt when the carrier delivers the goods at the predetermined destination.

Contract parameters

_shipper: the ethereum address of the shipper

_carrier : the ethereum address of the carrier

_receiver: the ethereum address of the receiver

Exposed methods and variables

shipper returns the address of the shipper

carrier returns the address of the carrier

receiver returns the address of the receiver

typeOfGoods returns the description about the shipped goods

quantity returns the number of units sent

destination returns the goods destination

addGoods called by the shipper to set the details about the goods that are about to be shipped and emits the addedGoods event

parameter nametypedetails
_typeOfstringtype of shipped goods
_quantityintegerthe amount of units sent
_destinationstringthe destination for the goods

setPayment payable function called by the shipper to send the payment for the carrier into the contract's balance. Once the goods are delivered, the carrier will receive this amount. The payment can be set only after the goods are added. It emits the PaymentSet event

parameter nametypedetails
_paymentintegerthe sum for the carrier once the goods are delivered

goodsAreShipped this function is called by the carrier after the previous ones in order to mark the start of shipping process and emits the ShippedGoods event

goodsAreDelivered this functions is the last one called. Only the receiver can call it and once he does, the money from the contract's balance are transferred to the carrier's account.

Events

addedGoods

parameter nametypedetails
typeOfGoodsstringtype of shipped goods
quantityintegerthe amount of units sent
destinationstringthe destination for the goods

PaymentSet

parameter nametypedetails
paymentintegerthe sum for the carrier once the goods are delivered

ShippedGoods

parameter nametypedetails
shippedbooleantrue if the goods were shipped

DeliveredGoods

parameter nametypedetails
deliveredbooleantrue if the goods were delivered

CarriedPaid

parameter nametypedetails
paidbooleantrue if the goods were delivered
Reviewed by Modex
Buy
Buy Contract

Create an account or login to purchase this smart contract