Skip to content

Commit

Permalink
Create RideFactory.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 12, 2024
1 parent 398c842 commit 56d5075
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit 56d5075

Please sign in to comment.