This repository has been archived by the owner on Mar 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e868b14
commit f742ce0
Showing
11 changed files
with
1,991 additions
and
1,995 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
pragma solidity 0.4.24; | ||
|
||
import "./MarketSource.sol"; | ||
|
||
|
||
/** | ||
* @title Market Source Factory | ||
* @notice https://www.fragments.org/protocol/ | ||
* | ||
* @dev A factory which spawns MarketSource contracts. | ||
*/ | ||
contract MarketSourceFactory { | ||
event SourceCreated(address owner, string name, MarketSource source); | ||
|
||
/** | ||
* @dev Any user may call this function to create a MarketSource, | ||
* which can be used to report market data. | ||
* @param name a human readable identifier for the source. | ||
* @return The address of the created MarketSource contract. | ||
*/ | ||
function createSource(string name) public returns (MarketSource) { | ||
MarketSource source = new MarketSource(name); | ||
emit SourceCreated(msg.sender, name, source); | ||
source.transferOwnership(msg.sender); | ||
return source; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.