2020-09-30 10:17:50 +00:00
|
|
|
pragma solidity ^0.6.1;
|
2020-04-09 09:59:43 +00:00
|
|
|
|
|
|
|
import "./NFTBucket.sol";
|
|
|
|
import "./Proxy.sol";
|
|
|
|
|
2020-04-09 10:05:00 +00:00
|
|
|
contract NFTBucketFactory {
|
2020-04-09 09:59:43 +00:00
|
|
|
NFTBucket public NFTBucketImplementation;
|
|
|
|
|
2020-04-28 09:36:34 +00:00
|
|
|
event BucketCreated(address indexed provider, address indexed bucket);
|
2020-04-09 09:59:43 +00:00
|
|
|
|
|
|
|
constructor() public {
|
2020-05-04 06:04:30 +00:00
|
|
|
NFTBucketImplementation = new NFTBucket(address(0), 0, block.timestamp + 1, 1);
|
2020-04-09 09:59:43 +00:00
|
|
|
}
|
|
|
|
|
2020-05-04 06:04:30 +00:00
|
|
|
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)));
|
2020-04-09 09:59:43 +00:00
|
|
|
emit BucketCreated(msg.sender, p);
|
|
|
|
return p;
|
|
|
|
}
|
|
|
|
}
|