mirror of
https://github.com/status-im/keycard-redeem.git
synced 2025-01-13 13:44:59 +00:00
Merge pull request #1 from richard-ramos/fix/giftbucket-init
initialize GiftBucket in Proxy constructor
This commit is contained in:
commit
76cb481b50
@ -13,13 +13,9 @@ 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("", address(GiftBucketImplementation)));
|
// initialize(address,uint256,address)
|
||||||
|
address p = address(new Proxy(abi.encodeWithSelector(0xc350a1b5, _tokenAddress, _expirationTime, msg.sender), address(GiftBucketImplementation)));
|
||||||
GiftBucket g = GiftBucket(p);
|
emit Created(msg.sender, p);
|
||||||
g.initialize(_tokenAddress, _expirationTime, msg.sender);
|
return p;
|
||||||
|
|
||||||
emit Created(msg.sender, address(p));
|
|
||||||
|
|
||||||
return address(p);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user