-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
overwrite the collateral with the consideration its matched to.
- Loading branch information
1 parent
f8720d5
commit 59e3fa2
Showing
4 changed files
with
34 additions
and
49 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 |
---|---|---|
@@ -1,48 +1,37 @@ | ||
import { expect } from "chai"; | ||
import { describe, it } from "mocha"; | ||
import { ethers } from "hardhat"; | ||
import { UniqueValidator__factory } from "../typechain-types/factories/src/validators"; | ||
import { UniqueOriginator__factory } from "../typechain-types/factories/src/originators"; | ||
import { LoanManager__factory } from "../typechain-types/factories/src"; | ||
import { MockERC20__factory } from "../typechain-types/factories/lib/solmate/src/tokens"; | ||
//import { UniqueValidator__factory } from "../typechain-types/factories/src/"; | ||
|
||
describe("Loan Open Benchmarks", function() { | ||
it("", async function() { | ||
import { ERC20__factory } from "../typechain-types/factories/lib/solady/src/tokens"; | ||
|
||
describe("Loan Open Benchmarks", function () { | ||
it("", async function () { | ||
// one year in the future | ||
// const lm = await ethers.getContractFactoryFromArtifact("LoanManager.sol"); | ||
|
||
|
||
}); | ||
}); | ||
|
||
async function setUp() { | ||
const [astaria, strategist, lender, borrower] = await ethers.getSigners(); | ||
|
||
const conduitController = await (await ethers.getContractFactory("ConduitController")).deploy(); | ||
const consideration = await (await ethers.getContractFactory("Consideration")).deploy(); | ||
const debtToken = await (await ethers.getContractFactory("TestToken")).deploy(); | ||
|
||
const loanManager = await new LoanManager__factory(astaria).deploy(consideration.address); | ||
const uniqueValidator = await new UniqueValidator__factory(lender).deploy( | ||
const conduitController = await ( | ||
await ethers.getContractFactory("ConduitController") | ||
).deploy(); | ||
const consideration = await ( | ||
await ethers.getContractFactory("Consideration") | ||
).deploy(); | ||
const debtToken = await ( | ||
await ethers.getContractFactory("TestToken") | ||
).deploy(); | ||
|
||
const loanManager = await new LoanManager__factory(astaria).deploy( | ||
consideration.address | ||
); | ||
const uniqueOriginator = await new UniqueOriginator__factory(lender).deploy( | ||
loanManager.address, | ||
conduitController.address, | ||
strategist.address, | ||
0 | ||
); | ||
|
||
|
||
// conduitKeyOne = bytes32(uint256(uint160(address(strategist))) << 96); | ||
|
||
// vm.startPrank(lender); | ||
// debtToken.approve(address(UV.conduit()), 100000); | ||
// debtToken.mint(address(lender), 1000); | ||
|
||
// vm.stopPrank(); | ||
}// | ||
|
||
|
||
|
||
|
||
|
||
|
||
} |
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
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
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