keycard-redeem/contracts/NFTBucketFactory.sol

21 lines
682 B
Solidity
Raw Normal View History

2020-04-09 12:59:43 +03:00
pragma solidity ^0.6.1;
import "./NFTBucket.sol";
import "./Proxy.sol";
2020-04-09 13:05:00 +03:00
contract NFTBucketFactory {
2020-04-09 12:59:43 +03:00
NFTBucket public NFTBucketImplementation;
event BucketCreated(address indexed gifter, address indexed bucket);
constructor() public {
2020-04-23 15:51:05 +03:00
NFTBucketImplementation = new NFTBucket(address(0), 0, block.timestamp + 1);
2020-04-09 12:59:43 +03:00
}
2020-04-23 15:51:05 +03:00
function create(address _tokenAddress, uint256 _startTime, uint256 _expirationTime) public returns (address) {
2020-04-24 18:59:08 +02:00
address p = address(new Proxy(abi.encodeWithSelector(0x4e9464ed, "KeycardNFTGift", _tokenAddress, _startTime, _expirationTime, msg.sender), address(NFTBucketImplementation)));
2020-04-09 12:59:43 +03:00
emit BucketCreated(msg.sender, p);
return p;
}
}