This is a ride hailing platform Rust Smart Contract(Solana Blockchain). It enables riders to request for rides and make payments once the ride is completed. Drivers who fulfill the rides get a share of the payments.
Below are some features contained in the program:
- Register rider
- Register driver
- Request trip
- Pay for trip
- Earn fees(driver) for successful ride
- Earn(rider) loyalty points
In order to run this example program you will need to install Rust and Solana. Information about installing Rust can be found here and information about installing Solana can be found here.
Once you've completed the Solana installation run the following commands to configure you machine for local development:
solana config set --url localhost
solana-keygen new
These two commands create Solana config files in ~/.config/solana/
which solana command line tools will read in to determine what cluster
to connect to and what keypair to use.
Having done that run a local Solana validator by running:
solana-test-validator
This program must be left running in the background.
To deploy the Solana program in this repository to the Solana cluster that you have configured run:
anchor deploy
To run the test program you must have already deployed the Solana program. The test program sends a transaction to the Solana blockchain asking it to execute the deployed program and reports the results.
anchor test --skip-local-validator