Created
          October 17, 2017 13:00 
        
      - 
      
- 
        Save simondlr/2496c4d4dcee58f40017f4bc2e3c8ece to your computer and use it in GitHub Desktop. 
    ETHUSDHandlerFactory
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | pragma solidity ^0.4.10; | |
| import "./ETHUSDHandler.sol"; | |
| contract ETHUSDHandlerFactory { | |
| mapping(address => address[]) public userToHandlers; | |
| function createNewHandler ( | |
| address _beneficiary, | |
| uint256 _initialPriceInUSD, | |
| address _admin, | |
| address _oracleAddress, | |
| uint256 _gracePeriod) returns (address) | |
| { | |
| ETHUSDHandler handler = new ETHUSDHandler(_beneficiary, _initialPriceInUSD, _admin, _oracleAddress, _gracePeriod); | |
| userToHandlers[msg.sender].push(handler); | |
| return handler; | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment