keycard-redeem/contracts/NFTBucketFactory.sol
Andrea Franz 3151b19e3e
Revert "downgrade solidity version to 0.5.16 in contracts"
This reverts commit 9f4a48e2827765d4de3c6c1af08a301f04fdea8b.
2020-09-30 12:17:50 +02:00

21 lines
739 B
Solidity

pragma solidity ^0.6.1;
import "./NFTBucket.sol";
import "./Proxy.sol";
contract NFTBucketFactory {
NFTBucket public NFTBucketImplementation;
event BucketCreated(address indexed provider, address indexed bucket);
constructor() public {
NFTBucketImplementation = new NFTBucket(address(0), 0, block.timestamp + 1, 1);
}
function create(address _tokenAddress, uint256 _startTime, uint256 _expirationTime, uint256 _maxTxDelayInBlocks) public returns (address) {
address p = address(new Proxy(abi.encodeWithSelector(0xe0c69ab8, "KeycardNFTBucket", _tokenAddress, _startTime, _expirationTime, _maxTxDelayInBlocks, msg.sender), address(NFTBucketImplementation)));
emit BucketCreated(msg.sender, p);
return p;
}
}