-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,10 @@ import "../interfaces/IUniswapV2Interfaces.sol"; | |
|
||
import "parseb/[email protected]/contracts/interfaces/superfluid/ISuperfluid.sol"; | ||
import "parseb/[email protected]/contracts/interfaces/agreements/IConstantFlowAgreementV1.sol"; | ||
//import "parseb/[email protected]/contracts/interfaces/superfluid/ISuperToken.sol"; | ||
|
||
import "parseb/[email protected]/contracts/apps/CFAv1Library.sol"; | ||
import "parseb/[email protected]/contracts/interfaces/superfluid/ISuperTokenFactory.sol"; | ||
|
||
|
||
// import "parseb/[email protected]/contracts/interfaces/superfluid/ISuperToken.sol"; | ||
|
||
|
||
contract CashCow is ERC721("Cash Cow Quest", "COWQ") { | ||
|
@@ -33,6 +32,7 @@ contract CashCow is ERC721("Cash Cow Quest", "COWQ") { | |
using CFAv1Library for CFAv1Library.InitData; | ||
CFAv1Library.InitData public cfaV1; | ||
address SFtokenFactory; | ||
ISuperfluid host; | ||
|
||
|
||
//// Errors | ||
|
@@ -61,7 +61,8 @@ contract CashCow is ERC721("Cash Cow Quest", "COWQ") { | |
DAI.approve(_v2Router, MAXUINT); | ||
sweeper = _sweepTo; | ||
tempId = 1; | ||
ISuperfluid host = ISuperfluid(_superfluidHost); | ||
|
||
host = ISuperfluid(_superfluidHost); | ||
SFtokenFactory = _superfluidTokenFactory; | ||
|
||
cfaV1 = CFAv1Library.InitData( | ||
|
@@ -261,20 +262,32 @@ contract CashCow is ERC721("Cash Cow Quest", "COWQ") { | |
timeElapsed(_dealId) | ||
returns (bool s) | ||
{ | ||
Cow memory cow = cashCowById[_dealId]; | ||
|
||
|
||
// ISuperToken token = ISuperTokenFactory(SFtokenFactory).createERC20Wrapper( | ||
// ISuperTokenFactory TF = ISuperTokenFactory(SFtokenFactory); | ||
|
||
ISuperTokenFactory factory = host.getSuperTokenFactory(); | ||
|
||
factory.createERC20Wrapper( | ||
IERC20(cashCowById[_dealId].owners[3]), | ||
18, | ||
1, | ||
"FluidCow", | ||
"aCow" | ||
); | ||
// ISuperToken t= ISuperTokenFactory(SFtokenFactory).createERC20Wrapper( | ||
// IERC20(cashCowById[_dealId].owners[3]), | ||
// 18, | ||
// 1, | ||
// "FluidCow", | ||
// "aCow" | ||
// ); | ||
|
||
ISuperToken t = ISuperToken(cashCowById[_dealId].owners[3]); | ||
|
||
// ISuperToken t = ISuperToken(cow.owners[3]); | ||
//int96 tokensPerSecond = cow.amounts[2] / (cow.vestStartEnd[1] - cow.vestStartEnd[0]); | ||
// // with optional user data | ||
cfaV1.createFlow(msg.sender, t, 33342, bytes("cow")); | ||
|
||
// createFlow(msg.sender, ISuperToken , 33342, bytes("cow")); | ||
// cfaV1.updateFlow(receiver, token, flowRate, userData); | ||
// cfaV1.deleteFlow(sender, receiver, token, userData); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters