Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ETHUSDHandlerFactory
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