-
Notifications
You must be signed in to change notification settings - Fork 66
fix enroll #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
fix enroll #241
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Empty file.
This file contains hidden or 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 |
---|---|---|
|
@@ -77,6 +77,9 @@ async function setup () { | |
const IndividualClaims = artifacts.require('IndividualClaims'); | ||
const Assessment = artifacts.require('Assessment'); | ||
|
||
const signers = await ethers.getSigners(); | ||
const ethersAccounts = getAccounts(signers); | ||
|
||
// external | ||
const WETH9 = artifacts.require('WETH9'); | ||
const CSMockSettlement = artifacts.require('CSMockSettlement'); | ||
|
@@ -165,7 +168,11 @@ async function setup () { | |
const as = await deployProxy(DisposableAssessment, []); | ||
const cl = await deployProxy(CoverMigrator, []); | ||
|
||
const cover = await deployProxy(DisposableCover, []); | ||
const coverUtilsLib = await CoverUtilsLib.new(); | ||
await Cover.link(coverUtilsLib); | ||
|
||
let cover = await deployProxy(DisposableCover, []); | ||
|
||
const coverNFT = await CoverNFT.new('Nexus Mutual Cover', 'NMC', cover.address); | ||
const stakingPool = await IntegrationMockStakingPool.new(tk.address, cover.address, tc.address, mr.address); | ||
|
||
|
@@ -211,6 +218,9 @@ async function setup () { | |
[owner], // advisory board members | ||
); | ||
|
||
await mr.setKycAuthAddress(ethersAccounts.defaultSender.address); | ||
|
||
|
||
await pc.initialize(mr.address); | ||
|
||
for (const category of proposalCategories) { | ||
|
@@ -320,15 +330,16 @@ async function setup () { | |
await upgradeProxy(yt.address, YieldTokenIncidents, [tk.address, coverNFT.address]); | ||
await upgradeProxy(as.address, Assessment, [master.address]); | ||
|
||
const coverUtilsLib = await CoverUtilsLib.new(); | ||
await Cover.link(coverUtilsLib); | ||
|
||
await upgradeProxy(cover.address, Cover, [ | ||
qd.address, | ||
productsV1.address, | ||
stakingPool.address, | ||
coverNFT.address, | ||
stakingPool.address, | ||
cover.address, | ||
]); | ||
|
||
cover = await Cover.at(cover.address); | ||
// | ||
// { | ||
// const params = {} | ||
|
@@ -431,26 +442,42 @@ async function setup () { | |
ethToDaiRate, | ||
}; | ||
|
||
this.contractType = contractType; | ||
|
||
const kycAuthSigner = ''; | ||
await enrollMember(this.contracts, members, kycAuthSigner); | ||
this.contractType = contractType; | ||
|
||
const signers = await ethers.getSigners(); | ||
this.withEthers = web3ToEthers(this, signers); | ||
|
||
await enrollMember(this.contracts, ethersAccounts.members, ethersAccounts.defaultSender); | ||
|
||
const DEFAULT_POOL_FEE = '5' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you check to see if your editor is using our |
||
|
||
const DEFAULT_PRODUCT_INITIALIZATION = [ | ||
{ | ||
productId: 0, | ||
weight: 100, | ||
initialPrice: 1000, | ||
targetPrice: 1000 | ||
} | ||
] | ||
|
||
for (let i = 0; i < 3; i++) { | ||
const tx = await this.withEthers.contracts.cover.createStakingPool(stakingPoolManagers[i]); | ||
const tx = await this.withEthers.contracts.cover.createStakingPool( | ||
stakingPoolManagers[i], | ||
false, // isPrivatePool, | ||
DEFAULT_POOL_FEE, // initialPoolFee | ||
DEFAULT_POOL_FEE, // maxPoolFee, | ||
DEFAULT_PRODUCT_INITIALIZATION, | ||
'0', // depositAmount, | ||
'0', // trancheId | ||
); | ||
const receipt = await tx.wait(); | ||
const { stakingPoolAddress } = receipt.events[0].args; | ||
const stakingPoolAddress = await cover.stakingPool(i); | ||
const stakingPoolInstance = await IntegrationMockStakingPool.at(stakingPoolAddress); | ||
await stakingPoolInstance.setPrice(0, 100); | ||
await stakingPoolInstance.setPrice(1, 100); | ||
await stakingPoolInstance.setPrice(2, 100); | ||
await stakingPoolInstance.setPrice(3, 100); | ||
|
||
this.contracts['stakingPool' + i] = stakingPoolInstance; | ||
} | ||
|
||
|
||
this.withEthers = web3ToEthers(this, signers); | ||
} | ||
|
||
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also have this line on :481