Skip to content

Commit

Permalink
Merge pull request #6 from primitivefinance/feat/factory
Browse files Browse the repository at this point in the history
Feat/factory
  • Loading branch information
kinrezC authored May 8, 2024
2 parents 44fae61 + 1bfbb16 commit dc92210
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Factory.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.13;

import {RMM} from "./RMM.sol";

contract Factory {
event NewPool(address indexed caller, address indexed pool, string name, string symbol);

address public immutable WETH;

address[] public pools;

constructor(address weth_) {
WETH = weth_;
}

function createRMM(string memory poolName, string memory poolSymbol) external returns (RMM) {
RMM rmm = new RMM(WETH, poolName, poolSymbol);
emit NewPool(msg.sender, address(rmm), poolName, poolSymbol);
pools.push(address(rmm));
return rmm;
}
}

0 comments on commit dc92210

Please sign in to comment.