@@ -398,7 +398,7 @@ describe('v3 launch', function () {
398398 // get last claim id
399399 const individualClaims = await ethers . getContractAt ( abis . IndividualClaims , addresses . IndividualClaims ) ;
400400 const latestClaimCount = await individualClaims . getClaimsCount ( ) ;
401- const latestClaimId = latestClaimCount - 1n ; // TODO: why subtract 1?!
401+ const latestClaimId = latestClaimCount - 1n ;
402402
403403 const claimsAddress = await this . registry . getContractAddressByIndex ( ContractIndexes . C_CLAIMS ) ;
404404 this . claims = await ethers . getContractAt ( 'Claims' , claimsAddress ) ;
@@ -409,6 +409,34 @@ describe('v3 launch', function () {
409409 data : this . claims . interface . encodeFunctionData ( 'initialize' , [ latestClaimId ] ) ,
410410 } ) ;
411411
412+ // TGovernor -> Assessments.addAssessorsToGroup
413+ const assessmentsAddress = await this . registry . getContractAddressByIndex ( ContractIndexes . C_ASSESSMENTS ) ;
414+ this . assessments = await ethers . getContractAt ( 'Assessments' , assessmentsAddress ) ;
415+
416+ const assessorIds = [
417+ await this . registry . getMemberId ( '0x87B2a7559d85f4653f13E6546A14189cd5455d45' ) ,
418+ await this . registry . getMemberId ( '0x43f4cd7d153701794ce25a01eFD90DdC32FF8e8E' ) ,
419+ await this . registry . getMemberId ( '0x9063a2C78aFd6C8A3510273d646111Df67D6CB4b' ) ,
420+ ] ;
421+
422+ tGovernorTxs . push ( {
423+ target : this . assessments . target ,
424+ data : this . assessments . interface . encodeFunctionData ( 'addAssessorsToGroup' , [ assessorIds , 0 ] ) , // create new group
425+ } ) ;
426+
427+ // TGovernor -> Assessments.setAssessingGroupIdForProductTypes
428+ const assessmentGroupId = 1 ;
429+ const latestProductTypeCount = await this . coverProducts . getProductTypeCount ( ) ;
430+ const allProductTypeIds = Array . from ( { length : Number ( latestProductTypeCount ) } , ( _ , i ) => i ) ;
431+
432+ tGovernorTxs . push ( {
433+ target : this . assessments . target ,
434+ data : this . assessments . interface . encodeFunctionData ( 'setAssessingGroupIdForProductTypes' , [
435+ allProductTypeIds ,
436+ assessmentGroupId ,
437+ ] ) ,
438+ } ) ;
439+
412440 // TGovernance -> NXMaster.migrate
413441 this . master = await ethers . getContractAt ( 'NXMaster' , this . master . target ) ; // get upgraded master contract
414442 tGovernanceTxs . push ( {
@@ -439,9 +467,6 @@ describe('v3 launch', function () {
439467 const receipt = await abTx . wait ( ) ;
440468 console . log ( 'Phase 3 AB tx gas used:' , receipt . gasUsed . toString ( ) ) ;
441469
442- const assessmentsAddress = await this . registry . getContractAddressByIndex ( ContractIndexes . C_ASSESSMENTS ) ;
443- this . assessments = await ethers . getContractAt ( 'Assessments' , assessmentsAddress ) ;
444-
445470 const coverProductsAddress = await this . registry . getContractAddressByIndex ( ContractIndexes . C_COVER_PRODUCTS ) ;
446471 this . coverProducts = await ethers . getContractAt ( 'CoverProducts' , coverProductsAddress ) ;
447472
0 commit comments