@@ -3,7 +3,7 @@ import { expect } from 'chai';
33import { EventLog , Signer , ZeroAddress } from 'ethers' ;
44import { ethers , upgrades } from 'hardhat' ;
55import { EscrowFactory , HMToken , Staking } from '../typechain-types' ;
6- import { fa , faker } from '@faker-js/faker' ;
6+ import { faker } from '@faker-js/faker' ;
77
88let owner : Signer ,
99 launcher1 : Signer ,
@@ -349,10 +349,6 @@ describe('EscrowFactory', function () {
349349 manifestHash
350350 ) ;
351351
352- await expect ( tx )
353- . to . emit ( escrowFactory , 'LaunchedV2' )
354- . withArgs ( tokenAddress , anyValue , FIXTURE_REQUESTER_ID ) ;
355-
356352 const receipt = await tx . wait ( ) ;
357353 const event = (
358354 receipt ?. logs ?. find ( ( { topics } ) =>
@@ -362,6 +358,26 @@ describe('EscrowFactory', function () {
362358
363359 expect ( event ) . to . not . be . undefined ;
364360 const escrowAddress = event [ 1 ] ;
361+
362+ const escrow = await ethers . getContractAt (
363+ 'contracts/Escrow.sol:Escrow' ,
364+ escrowAddress
365+ ) ;
366+
367+ await expect ( tx )
368+ . to . emit ( escrowFactory , 'LaunchedV2' )
369+ . withArgs ( tokenAddress , escrowAddress , FIXTURE_REQUESTER_ID )
370+ . to . emit ( escrow , 'PendingV2' )
371+ . withArgs (
372+ manifestUrl ,
373+ manifestHash ,
374+ reputationOracleAddress ,
375+ recordingOracleAddress ,
376+ exchangeOracleAddress
377+ )
378+ . to . emit ( escrow , 'Fund' )
379+ . withArgs ( fundAmount ) ;
380+
365381 expect ( await escrowFactory . hasEscrow ( escrowAddress ) ) . to . be . true ;
366382 expect ( await escrowFactory . lastEscrow ( ) ) . to . equal ( escrowAddress ) ;
367383 } ) ;
0 commit comments