@@ -15,6 +15,7 @@ import {
15
15
createDataKey ,
16
16
deployImplementationContracts ,
17
17
} from './helpers' ;
18
+ import { EventLog } from 'ethers' ;
18
19
19
20
describe ( 'UniversalProfileDeployer' , function ( ) {
20
21
describe ( 'for non-proxies deployment' , async function ( ) {
@@ -140,7 +141,7 @@ describe('UniversalProfileDeployer', function () {
140
141
expect ( await universalProfileInstance . owner ( ) ) . to . equal ( keyManagerContract ) ;
141
142
142
143
// CHECK that the `target()` of the KeyManager contract is the UP contract
143
- expect ( await keyManagerInstance . target ( ) ) . to . equal ( upContract ) ;
144
+ expect ( await keyManagerInstance [ ' target()' ] . staticCall ( ) ) . to . equal ( upContract ) ;
144
145
} ) ;
145
146
146
147
it ( 'should deploy both contract (with value)' , async function ( ) {
@@ -472,7 +473,7 @@ describe('UniversalProfileDeployer', function () {
472
473
expect ( await universalProfileInstance . owner ( ) ) . to . equal ( keyManagerContract ) ;
473
474
474
475
// CHECK that the `target()` of the KeyManager contract is the UP contract
475
- expect ( await keyManagerInstance . target ( ) ) . to . equal ( upContract ) ;
476
+ expect ( await keyManagerInstance [ ' target()' ] . staticCall ( ) ) . to . equal ( upContract ) ;
476
477
477
478
expect ( await keyManagerInstance . FIRST_PARAM ( ) ) . to . deep . equal ( firstAddress ) ;
478
479
expect ( await keyManagerInstance . LAST_PARAM ( ) ) . to . deep . equal ( lastAddress ) ;
@@ -577,7 +578,7 @@ describe('UniversalProfileDeployer', function () {
577
578
) as unknown as LSP6KeyManager ;
578
579
579
580
const upProxyOwner = await upProxy . owner ( ) ;
580
- const keyManagerProxyOwner = await keyManagerProxy . target ( ) ;
581
+ const keyManagerProxyOwner = await keyManagerProxy [ ' target()' ] . staticCall ( ) ;
581
582
582
583
const [ expectedUpProxyAddress , expectedKeyManagerProxyAddress ] =
583
584
await LSP23LinkedContractsFactory . computeERC1167Addresses (
@@ -805,7 +806,7 @@ describe('UniversalProfileDeployer', function () {
805
806
'KeyManagerInitWithExtraParams' ,
806
807
) ;
807
808
const keyManagerWithExtraParamsFactory = await KeyManagerWithExtraParamsFactory . deploy ( ) ;
808
- await keyManagerWithExtraParamsFactory . deployed ( ) ;
809
+ await keyManagerWithExtraParamsFactory . waitForDeployment ( ) ;
809
810
810
811
const salt = ethers . hexlify ( ethers . randomBytes ( 32 ) ) ;
811
812
const primaryFundingAmount = ethers . parseEther ( '1' ) ;
@@ -832,7 +833,7 @@ describe('UniversalProfileDeployer', function () {
832
833
833
834
const secondaryContractDeploymentInit = {
834
835
fundingAmount : secondaryFundingAmount ,
835
- implementationContract : keyManagerWithExtraParamsFactory . address ,
836
+ implementationContract : keyManagerWithExtraParamsFactory . target ,
836
837
addPrimaryContractAddress : true ,
837
838
initializationCalldata : initializationDataWithSelector ,
838
839
extraInitializationParams : lastParam ,
@@ -922,11 +923,12 @@ describe('UniversalProfileDeployer', function () {
922
923
) ;
923
924
924
925
const receipt = await tx . wait ( ) ;
925
- const event = receipt . events ?. find ( ( e ) => e . event === 'DeployedERC1167Proxies' ) ;
926
+ // const event = receipt.events?.find((e) => e.event === 'DeployedERC1167Proxies');
927
+ const event = receipt . logs . find ( ( e : EventLog ) => e . eventName === 'DeployedERC1167Proxies' ) ;
926
928
927
929
expect ( event ) . to . not . be . undefined ;
928
930
929
- const args = event . args ;
931
+ const args = ( event as EventLog ) . args ;
930
932
931
933
expect ( args [ 0 ] ) . to . equal ( primaryAddress ) ;
932
934
expect ( args [ 1 ] ) . to . equal ( secondaryAddress ) ;
0 commit comments