mirror of
https://github.com/status-im/keycard-redeem.git
synced 2025-02-17 06:27:29 +00:00
re-organize contracts
This commit is contained in:
parent
3da8c8c43c
commit
f2971e659c
@ -1,7 +1,7 @@
|
|||||||
pragma solidity ^0.6.1;
|
pragma solidity ^0.6.1;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "./IERC20.sol";
|
import "./erc20/IERC20.sol";
|
||||||
|
|
||||||
contract GiftBucket {
|
contract GiftBucket {
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import "./Proxy.sol";
|
|||||||
contract GiftBucketFactory {
|
contract GiftBucketFactory {
|
||||||
GiftBucket public GiftBucketImplementation;
|
GiftBucket public GiftBucketImplementation;
|
||||||
|
|
||||||
event Created(address indexed gifter, address indexed bucket);
|
event BucketCreated(address indexed gifter, address indexed bucket);
|
||||||
|
|
||||||
constructor() public {
|
constructor() public {
|
||||||
GiftBucketImplementation = new GiftBucket(address(0), block.timestamp + 1);
|
GiftBucketImplementation = new GiftBucket(address(0), block.timestamp + 1);
|
||||||
@ -14,7 +14,7 @@ contract GiftBucketFactory {
|
|||||||
|
|
||||||
function create(address _tokenAddress, uint256 _expirationTime) public returns (address) {
|
function create(address _tokenAddress, uint256 _expirationTime) public returns (address) {
|
||||||
address p = address(new Proxy(abi.encodeWithSelector(0xc350a1b5, _tokenAddress, _expirationTime, msg.sender), address(GiftBucketImplementation)));
|
address p = address(new Proxy(abi.encodeWithSelector(0xc350a1b5, _tokenAddress, _expirationTime, msg.sender), address(GiftBucketImplementation)));
|
||||||
emit Created(msg.sender, p);
|
emit BucketCreated(msg.sender, p);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user