diff --git a/blockchain_integration/pi_network/PiRide/blockchain/smartContracts/RideFactory.sol b/blockchain_integration/pi_network/PiRide/blockchain/smartContracts/RideFactory.sol new file mode 100644 index 000000000..95ca3f587 --- /dev/null +++ b/blockchain_integration/pi_network/PiRide/blockchain/smartContracts/RideFactory.sol @@ -0,0 +1,19 @@ +pragma solidity ^0.8.0; + +import "./RideContract.sol"; + +contract RideFactory { + address[] public rideContracts; + + event NewRideContract(address rideContract); + + function createRideContract() public { + RideContract rideContract = new RideContract(); + rideContracts.push(address(rideContract)); + emit NewRideContract(address(rideContract)); + } + + function getRideContracts() public view returns (address[] memory) { + return rideContracts; + } +}