Skip to content

Commit b90b8c6

Browse files
committed
chore: fix remaining failing tests in CI
1 parent adb776e commit b90b8c6

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tests/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts

+9-7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
createDataKey,
1616
deployImplementationContracts,
1717
} from './helpers';
18+
import { EventLog } from 'ethers';
1819

1920
describe('UniversalProfileDeployer', function () {
2021
describe('for non-proxies deployment', async function () {
@@ -140,7 +141,7 @@ describe('UniversalProfileDeployer', function () {
140141
expect(await universalProfileInstance.owner()).to.equal(keyManagerContract);
141142

142143
// 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);
144145
});
145146

146147
it('should deploy both contract (with value)', async function () {
@@ -472,7 +473,7 @@ describe('UniversalProfileDeployer', function () {
472473
expect(await universalProfileInstance.owner()).to.equal(keyManagerContract);
473474

474475
// 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);
476477

477478
expect(await keyManagerInstance.FIRST_PARAM()).to.deep.equal(firstAddress);
478479
expect(await keyManagerInstance.LAST_PARAM()).to.deep.equal(lastAddress);
@@ -577,7 +578,7 @@ describe('UniversalProfileDeployer', function () {
577578
) as unknown as LSP6KeyManager;
578579

579580
const upProxyOwner = await upProxy.owner();
580-
const keyManagerProxyOwner = await keyManagerProxy.target();
581+
const keyManagerProxyOwner = await keyManagerProxy['target()'].staticCall();
581582

582583
const [expectedUpProxyAddress, expectedKeyManagerProxyAddress] =
583584
await LSP23LinkedContractsFactory.computeERC1167Addresses(
@@ -805,7 +806,7 @@ describe('UniversalProfileDeployer', function () {
805806
'KeyManagerInitWithExtraParams',
806807
);
807808
const keyManagerWithExtraParamsFactory = await KeyManagerWithExtraParamsFactory.deploy();
808-
await keyManagerWithExtraParamsFactory.deployed();
809+
await keyManagerWithExtraParamsFactory.waitForDeployment();
809810

810811
const salt = ethers.hexlify(ethers.randomBytes(32));
811812
const primaryFundingAmount = ethers.parseEther('1');
@@ -832,7 +833,7 @@ describe('UniversalProfileDeployer', function () {
832833

833834
const secondaryContractDeploymentInit = {
834835
fundingAmount: secondaryFundingAmount,
835-
implementationContract: keyManagerWithExtraParamsFactory.address,
836+
implementationContract: keyManagerWithExtraParamsFactory.target,
836837
addPrimaryContractAddress: true,
837838
initializationCalldata: initializationDataWithSelector,
838839
extraInitializationParams: lastParam,
@@ -922,11 +923,12 @@ describe('UniversalProfileDeployer', function () {
922923
);
923924

924925
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');
926928

927929
expect(event).to.not.be.undefined;
928930

929-
const args = event.args;
931+
const args = (event as EventLog).args;
930932

931933
expect(args[0]).to.equal(primaryAddress);
932934
expect(args[1]).to.equal(secondaryAddress);

0 commit comments

Comments
 (0)