From 0e5d9bf7f9b212976f5c754b28f96b37a8039076 Mon Sep 17 00:00:00 2001 From: Skima Harvey <64636974+skimaharvey@users.noreply.github.com> Date: Mon, 7 Aug 2023 11:11:26 +0200 Subject: [PATCH] fix: failing tests for lsp23 + add LSP23 test suite in CI (#657) * tests: fix lsp23 tests * ci: add lsp23 tests to lint workflow --- .github/workflows/build-lint-test.yml | 1 + package.json | 1 + ...ehaviour.ts => LSP23MultiChainDeployment.test.ts} | 12 ++++-------- 3 files changed, 6 insertions(+), 8 deletions(-) rename tests/LSP23MultiChainDeployment/{LSP23MultiChainDeployment.behaviour.ts => LSP23MultiChainDeployment.test.ts} (94%) diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index 60f54e5e5..435d99d21 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -66,6 +66,7 @@ jobs: "lsp11init", "lsp20", "lsp20init", + "lsp23", "universalfactory", "reentrancy", "reentrancyinit", diff --git a/package.json b/package.json index 5969ea24f..94cf5f5c0 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "test:lsp11init": "hardhat test --no-compile tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts", "test:lsp20": "hardhat test --no-compile tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts", "test:lsp20init": "hardhat test --no-compile tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts", + "test:lsp23": "hardhat test --no-compile tests/LSP23MultiChainDeployment/LSP23MultiChainDeployment.test.ts", "test:universalfactory": "hardhat test --no-compile tests/LSP16UniversalFactory/LSP16UniversalFactory.test.ts", "test:reentrancy": "hardhat test --no-compile tests/Reentrancy/Reentrancy.test.ts", "test:reentrancyinit": "hardhat test --no-compile tests/Reentrancy/ReentrancyInit.test.ts", diff --git a/tests/LSP23MultiChainDeployment/LSP23MultiChainDeployment.behaviour.ts b/tests/LSP23MultiChainDeployment/LSP23MultiChainDeployment.test.ts similarity index 94% rename from tests/LSP23MultiChainDeployment/LSP23MultiChainDeployment.behaviour.ts rename to tests/LSP23MultiChainDeployment/LSP23MultiChainDeployment.test.ts index ae511e876..7a808074a 100644 --- a/tests/LSP23MultiChainDeployment/LSP23MultiChainDeployment.behaviour.ts +++ b/tests/LSP23MultiChainDeployment/LSP23MultiChainDeployment.test.ts @@ -31,7 +31,7 @@ describe('UniversalProfileDeployer', function () { const ownerControlledDeploymentInit: OwnerControlledContractDeployer.ControlledContractDeploymentInitStruct = { salt, - value: 0, + fundingAmount: 0, implementationContract: universalProfileInit.address, initializationCalldata: universalProfileInit.interface.encodeFunctionData('initialize', [ upPostDeploymentModule.address, @@ -39,7 +39,7 @@ describe('UniversalProfileDeployer', function () { }; const ownerDeploymentInit: OwnerControlledContractDeployer.OwnerContractDeploymentInitStruct = { - value: 0, + fundingAmount: 0, implementationContract: keyManagerInit.address, addControlledContractAddress: true, initializationCalldata: '0xc4d66de8', @@ -113,12 +113,8 @@ describe('UniversalProfileDeployer', function () { const [expectedUpProxyAddress, expectedKeyManagerProxyAddress] = await ownerControlledContractDeployer.computeERC1167Addresses( - ownerControlledDeploymentInit.salt, - ownerControlledDeploymentInit.implementationContract, - ownerDeploymentInit.implementationContract, - ownerDeploymentInit.initializationCalldata, - ownerDeploymentInit.addControlledContractAddress, - ownerDeploymentInit.extraInitializationParams, + ownerControlledDeploymentInit, + ownerDeploymentInit, upPostDeploymentModule.address, encodedBytes, );