Skip to content

Instantly share code, notes, and snippets.

@cag
Last active March 27, 2018 16:20
Show Gist options
  • Save cag/c9c7eae967d3bad3bb054bc3b08fdf4f to your computer and use it in GitHub Desktop.
Save cag/c9c7eae967d3bad3bb054bc3b08fdf4f to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.21;
import "./KombuchaWithInit.sol";
import "./ProxyPostByzantium.sol";
contract KombuchaFactory {
Kombucha private masterCopy;
function KombuchaFactory(Kombucha _masterCopy) public {
masterCopy = _masterCopy;
}
function createKombucha(string flavor, uint fillAmount, uint capacity)
public
returns (Kombucha kombucha)
{
kombucha = Kombucha(new Proxy(masterCopy));
kombucha.init(flavor, fillAmount, capacity);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment