/// feed-factory.sol - deploy to create price-feeds // Copyright (C) 2017, 2018 DappHub, LLC // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see . pragma solidity 0.5.7; import "./price-feed.sol"; contract FeedFactory { event Created(address indexed sender, address feed); mapping(address=>bool) public isFeed; function create() public returns (PriceFeed) { PriceFeed feed = new PriceFeed(); emit Created(msg.sender, address(feed)); feed.setOwner(msg.sender); isFeed[address(feed)] = true; return feed; } }