Skip to content

This is a demo of a basic car sharing platform created to test the possibilities of using blockchain technology for such a platform. Currently a Leaser, Hirer and a Regulator can participate in the network

Notifications You must be signed in to change notification settings

Huipie1/CarSharePlatform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Car Sharing Platform

This is a demo of a basic car sharing platform created to test the possibilities of using blockchain technology for such a platform. Currently a Leaser, Hirer and a Regulator can participate in the network

This business network defines:

Participant SampleParticipant

Asset SampleAsset

Transaction SampleTransaction

Event SampleEvent

SampleAssets are owned by a SampleParticipant, and the value property on a SampleAsset can be modified by submitting a SampleTransaction. The SampleTransaction emits a SampleEvent that notifies applications of the old and new values for each modified SampleAsset.

To test this Business Network Definition in the Test tab:

Create a SampleParticipant participant:

{
  "$class": "org.acme.sample.SampleParticipant",
  "participantId": "Toby",
  "firstName": "Tobias",
  "lastName": "Hunter"
}

Create a SampleAsset asset:

{
  "$class": "org.acme.sample.SampleAsset",
  "assetId": "assetId:1",
  "owner": "resource:org.acme.sample.SampleParticipant#Toby",
  "value": "original value"
}

Submit a SampleTransaction transaction:

{
  "$class": "org.acme.sample.SampleTransaction",
  "asset": "resource:org.acme.sample.SampleAsset#assetId:1",
  "newValue": "new value"
}

After submitting this transaction, you should now see the transaction in the Transaction Registry and that a SampleEvent has been emitted. As a result, the value of the assetId:1 should now be new value in the Asset Registry.

Congratulations!

About

This is a demo of a basic car sharing platform created to test the possibilities of using blockchain technology for such a platform. Currently a Leaser, Hirer and a Regulator can participate in the network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published