From a4b696a41faa8c7a1b551c9ac511d9c56b291602 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Tue, 27 Feb 2024 19:26:26 -0700 Subject: [PATCH 01/21] chore!: move `@lukso/lsp-smart-contracts` in its own package --- .../contracts}/Imports.sol | 0 .../ILSP11BasicSocialRecovery.sol | 0 .../LSP11BasicSocialRecovery.sol | 0 .../LSP11BasicSocialRecoveryCore.sol | 0 .../LSP11BasicSocialRecoveryInit.sol | 0 .../LSP11BasicSocialRecoveryInitAbstract.sol | 0 .../LSP11Constants.sol | 0 .../LSP11BasicSocialRecovery/LSP11Errors.sol | 0 .../contracts}/Mocks/ABIEncoder.sol | 0 .../contracts}/Mocks/ERC165Interfaces.sol | 0 .../contracts}/Mocks/Executor.sol | 0 .../contracts}/Mocks/ExecutorLSP20.sol | 0 .../contracts}/Mocks/FallbackContract.sol | 0 .../Mocks/FallbackExtensions/AgeExtension.sol | 0 .../Mocks/FallbackExtensions/Buy.sol | 0 .../FallbackExtensions/CheckerExtension.sol | 0 .../FallbackExtensions/ERC165Extension.sol | 0 .../FallbackExtensions/EmitEventExtension.sol | 0 .../GraffitiEventExtension.sol | 0 .../FallbackExtensions/NameExtension.sol | 0 .../ReenterAccountExtension.sol | 0 .../RevertCustomExtension.sol | 0 .../RevertErrorsTestExtension.sol | 0 .../RevertFallbackExtension.sol | 0 .../RevertStringExtension.sol | 0 .../FallbackExtensions/TransferExtension.sol | 0 .../contracts}/Mocks/FallbackInitializer.sol | 0 .../contracts}/Mocks/FallbackRevert.sol | 0 .../contracts}/Mocks/GenericExecutor.sol | 0 .../GenericExecutorWithBalanceOfFunction.sol | 0 .../contracts}/Mocks/ImplementationTester.sol | 0 .../Mocks/KeyManager/ERC725YDelegateCall.sol | 0 .../KeyManager/KeyManagerInternalsTester.sol | 0 .../KeyManager/TargetPayableContract.sol | 0 .../Mocks/KeyManagerInitWithExtraParams.sol | 0 .../Mocks/KeyManagerWithExtraParams.sol | 0 .../Mocks/LSP17ExtendableTester.sol | 0 .../contracts}/Mocks/LSP1TypeIDsTester.sol | 0 .../LSP20Owners/BothCallReturnMagicValue.sol | 0 .../BothCallReturnSuccessValue.sol | 0 .../FallbackReturnSuccessValue.sol | 0 .../FirstCallReturnExpandedInvalidValue.sol | 0 .../FirstCallReturnInvalidValue.sol | 0 .../LSP20Owners/FirstCallReturnMagicValue.sol | 0 .../FirstCallReturnSuccessValue.sol | 0 .../LSP20Owners/ImplementingFallback.sol | 0 .../LSP20Owners/NotImplementingVerifyCall.sol | 0 .../Mocks/LSP20Owners/OwnerWIthURD.sol | 0 .../SecondCallReturnExpandedSuccessValue.sol | 0 .../SecondCallReturnExpandedValue.sol | 0 .../SecondCallReturnFailureValue.sol | 0 .../Mocks/MaliciousERC1271Wallet.sol | 0 .../contracts}/Mocks/NonPayableFallback.sol | 0 .../contracts}/Mocks/PayableContract.sol | 0 .../Reentrancy/BatchReentrancyRelayer.sol | 0 .../Reentrancy/LSP20ReentrantContract.sol | 0 .../LSP20ReentrantContractBatch.sol | 0 .../Mocks/Reentrancy/ReentrantContract.sol | 0 .../Reentrancy/SingleReentrancyRelayer.sol | 0 .../Mocks/Reentrancy/ThreeReentrancy.sol | 0 .../contracts}/Mocks/Security/Reentrancy.sol | 0 .../Mocks/SignatureValidatorContract.sol | 0 .../contracts}/Mocks/TargetContract.sol | 0 .../contracts}/Mocks/Tokens/IERC223.sol | 0 .../Tokens/LSP7CappedSupplyInitTester.sol | 0 .../Mocks/Tokens/LSP7CappedSupplyTester.sol | 0 .../Mocks/Tokens/LSP7InitTester.sol | 0 .../Mocks/Tokens/LSP7MintWhenDeployed.sol | 0 .../contracts}/Mocks/Tokens/LSP7Tester.sol | 0 .../Mocks/Tokens/LSP8BurnableInitTester.sol | 0 .../Mocks/Tokens/LSP8BurnableTester.sol | 0 .../Tokens/LSP8CappedSupplyInitTester.sol | 0 .../Mocks/Tokens/LSP8CappedSupplyTester.sol | 0 .../Mocks/Tokens/LSP8EnumerableInitTester.sol | 0 .../Mocks/Tokens/LSP8EnumerableTester.sol | 0 .../Mocks/Tokens/LSP8InitTester.sol | 0 .../contracts}/Mocks/Tokens/LSP8Tester.sol | 0 .../Mocks/Tokens/LSP8TransferOwnerChange.sol | 0 .../Mocks/Tokens/RequireCallbackToken.sol | 0 .../Mocks/Tokens/TokenReceiverWithLSP1.sol | 0 .../Tokens/TokenReceiverWithLSP1Revert.sol | 0 ...okenReceiverWithLSP1WithERC721Received.sol | 0 ...eiverWithLSP1WithERC721ReceivedInvalid.sol | 0 ...ceiverWithLSP1WithERC721ReceivedRevert.sol | 0 .../Mocks/Tokens/TokenReceiverWithoutLSP1.sol | 0 ...nReceiverWithoutLSP1WithERC721Received.sol | 0 ...erWithoutLSP1WithERC721ReceivedInvalid.sol | 0 ...verWithoutLSP1WithERC721ReceivedRevert.sol | 0 .../Mocks/UPWithInstantAcceptOwnership.sol | 0 .../UniversalReceiverDelegateDataLYX.sol | 0 .../UniversalReceiverDelegateDataUpdater.sol | 0 .../UniversalReceiverDelegateGasConsumer.sol | 0 .../UniversalReceiverDelegateRevert.sol | 0 ...niversalReceiverDelegateTokenReentrant.sol | 0 ...niversalReceiverDelegateVaultMalicious.sol | 0 ...iversalReceiverDelegateVaultReentrantA.sol | 0 ...iversalReceiverDelegateVaultReentrantB.sol | 0 .../UniversalReceiverDelegateVaultSetter.sol | 0 .../UniversalReceiverTester.sol | 0 .../contracts}/Version.sol | 0 .../lsp-smart-contracts/hardhat.config.ts | 197 ++++++++++++++++++ 101 files changed, 197 insertions(+) rename {contracts => packages/lsp-smart-contracts/contracts}/Imports.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/LSP11BasicSocialRecovery/ILSP11BasicSocialRecovery.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInitAbstract.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/LSP11BasicSocialRecovery/LSP11Constants.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/LSP11BasicSocialRecovery/LSP11Errors.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/ABIEncoder.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/ERC165Interfaces.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Executor.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/ExecutorLSP20.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackContract.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/AgeExtension.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/Buy.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/CheckerExtension.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/ERC165Extension.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/EmitEventExtension.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/GraffitiEventExtension.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/NameExtension.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/ReenterAccountExtension.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/RevertCustomExtension.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/RevertErrorsTestExtension.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/RevertFallbackExtension.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/RevertStringExtension.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackExtensions/TransferExtension.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackInitializer.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/FallbackRevert.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/GenericExecutor.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/GenericExecutorWithBalanceOfFunction.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/ImplementationTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/KeyManager/ERC725YDelegateCall.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/KeyManager/KeyManagerInternalsTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/KeyManager/TargetPayableContract.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/KeyManagerInitWithExtraParams.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/KeyManagerWithExtraParams.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP17ExtendableTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP1TypeIDsTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/BothCallReturnMagicValue.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/BothCallReturnSuccessValue.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/FallbackReturnSuccessValue.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/FirstCallReturnExpandedInvalidValue.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/FirstCallReturnInvalidValue.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/FirstCallReturnMagicValue.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/FirstCallReturnSuccessValue.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/ImplementingFallback.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/NotImplementingVerifyCall.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/OwnerWIthURD.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/SecondCallReturnExpandedSuccessValue.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/SecondCallReturnExpandedValue.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/LSP20Owners/SecondCallReturnFailureValue.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/MaliciousERC1271Wallet.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/NonPayableFallback.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/PayableContract.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Reentrancy/BatchReentrancyRelayer.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Reentrancy/LSP20ReentrantContract.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Reentrancy/LSP20ReentrantContractBatch.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Reentrancy/ReentrantContract.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Reentrancy/SingleReentrancyRelayer.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Reentrancy/ThreeReentrancy.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Security/Reentrancy.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/SignatureValidatorContract.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/TargetContract.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/IERC223.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP7CappedSupplyInitTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP7CappedSupplyTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP7InitTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP7MintWhenDeployed.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP7Tester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP8BurnableInitTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP8BurnableTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP8CappedSupplyInitTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP8CappedSupplyTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP8EnumerableInitTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP8EnumerableTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP8InitTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP8Tester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/LSP8TransferOwnerChange.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/RequireCallbackToken.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/TokenReceiverWithLSP1.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/TokenReceiverWithLSP1Revert.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/TokenReceiverWithLSP1WithERC721Received.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/TokenReceiverWithLSP1WithERC721ReceivedInvalid.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/TokenReceiverWithLSP1WithERC721ReceivedRevert.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/TokenReceiverWithoutLSP1.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721Received.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721ReceivedInvalid.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721ReceivedRevert.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/UPWithInstantAcceptOwnership.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/UniversalReceivers/UniversalReceiverDelegateDataLYX.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/UniversalReceivers/UniversalReceiverDelegateDataUpdater.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/UniversalReceivers/UniversalReceiverDelegateGasConsumer.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/UniversalReceivers/UniversalReceiverDelegateRevert.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/UniversalReceivers/UniversalReceiverDelegateTokenReentrant.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultMalicious.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultReentrantA.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultReentrantB.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultSetter.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Mocks/UniversalReceivers/UniversalReceiverTester.sol (100%) rename {contracts => packages/lsp-smart-contracts/contracts}/Version.sol (100%) create mode 100644 packages/lsp-smart-contracts/hardhat.config.ts diff --git a/contracts/Imports.sol b/packages/lsp-smart-contracts/contracts/Imports.sol similarity index 100% rename from contracts/Imports.sol rename to packages/lsp-smart-contracts/contracts/Imports.sol diff --git a/contracts/LSP11BasicSocialRecovery/ILSP11BasicSocialRecovery.sol b/packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/ILSP11BasicSocialRecovery.sol similarity index 100% rename from contracts/LSP11BasicSocialRecovery/ILSP11BasicSocialRecovery.sol rename to packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/ILSP11BasicSocialRecovery.sol diff --git a/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.sol b/packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.sol similarity index 100% rename from contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.sol rename to packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.sol diff --git a/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol b/packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol similarity index 100% rename from contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol rename to packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol diff --git a/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.sol b/packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.sol similarity index 100% rename from contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.sol rename to packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.sol diff --git a/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInitAbstract.sol similarity index 100% rename from contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInitAbstract.sol rename to packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInitAbstract.sol diff --git a/contracts/LSP11BasicSocialRecovery/LSP11Constants.sol b/packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/LSP11Constants.sol similarity index 100% rename from contracts/LSP11BasicSocialRecovery/LSP11Constants.sol rename to packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/LSP11Constants.sol diff --git a/contracts/LSP11BasicSocialRecovery/LSP11Errors.sol b/packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/LSP11Errors.sol similarity index 100% rename from contracts/LSP11BasicSocialRecovery/LSP11Errors.sol rename to packages/lsp-smart-contracts/contracts/LSP11BasicSocialRecovery/LSP11Errors.sol diff --git a/contracts/Mocks/ABIEncoder.sol b/packages/lsp-smart-contracts/contracts/Mocks/ABIEncoder.sol similarity index 100% rename from contracts/Mocks/ABIEncoder.sol rename to packages/lsp-smart-contracts/contracts/Mocks/ABIEncoder.sol diff --git a/contracts/Mocks/ERC165Interfaces.sol b/packages/lsp-smart-contracts/contracts/Mocks/ERC165Interfaces.sol similarity index 100% rename from contracts/Mocks/ERC165Interfaces.sol rename to packages/lsp-smart-contracts/contracts/Mocks/ERC165Interfaces.sol diff --git a/contracts/Mocks/Executor.sol b/packages/lsp-smart-contracts/contracts/Mocks/Executor.sol similarity index 100% rename from contracts/Mocks/Executor.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Executor.sol diff --git a/contracts/Mocks/ExecutorLSP20.sol b/packages/lsp-smart-contracts/contracts/Mocks/ExecutorLSP20.sol similarity index 100% rename from contracts/Mocks/ExecutorLSP20.sol rename to packages/lsp-smart-contracts/contracts/Mocks/ExecutorLSP20.sol diff --git a/contracts/Mocks/FallbackContract.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackContract.sol similarity index 100% rename from contracts/Mocks/FallbackContract.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackContract.sol diff --git a/contracts/Mocks/FallbackExtensions/AgeExtension.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/AgeExtension.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/AgeExtension.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/AgeExtension.sol diff --git a/contracts/Mocks/FallbackExtensions/Buy.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/Buy.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/Buy.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/Buy.sol diff --git a/contracts/Mocks/FallbackExtensions/CheckerExtension.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/CheckerExtension.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/CheckerExtension.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/CheckerExtension.sol diff --git a/contracts/Mocks/FallbackExtensions/ERC165Extension.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/ERC165Extension.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/ERC165Extension.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/ERC165Extension.sol diff --git a/contracts/Mocks/FallbackExtensions/EmitEventExtension.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/EmitEventExtension.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/EmitEventExtension.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/EmitEventExtension.sol diff --git a/contracts/Mocks/FallbackExtensions/GraffitiEventExtension.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/GraffitiEventExtension.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/GraffitiEventExtension.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/GraffitiEventExtension.sol diff --git a/contracts/Mocks/FallbackExtensions/NameExtension.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/NameExtension.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/NameExtension.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/NameExtension.sol diff --git a/contracts/Mocks/FallbackExtensions/ReenterAccountExtension.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/ReenterAccountExtension.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/ReenterAccountExtension.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/ReenterAccountExtension.sol diff --git a/contracts/Mocks/FallbackExtensions/RevertCustomExtension.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/RevertCustomExtension.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/RevertCustomExtension.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/RevertCustomExtension.sol diff --git a/contracts/Mocks/FallbackExtensions/RevertErrorsTestExtension.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/RevertErrorsTestExtension.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/RevertErrorsTestExtension.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/RevertErrorsTestExtension.sol diff --git a/contracts/Mocks/FallbackExtensions/RevertFallbackExtension.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/RevertFallbackExtension.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/RevertFallbackExtension.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/RevertFallbackExtension.sol diff --git a/contracts/Mocks/FallbackExtensions/RevertStringExtension.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/RevertStringExtension.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/RevertStringExtension.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/RevertStringExtension.sol diff --git a/contracts/Mocks/FallbackExtensions/TransferExtension.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/TransferExtension.sol similarity index 100% rename from contracts/Mocks/FallbackExtensions/TransferExtension.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackExtensions/TransferExtension.sol diff --git a/contracts/Mocks/FallbackInitializer.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackInitializer.sol similarity index 100% rename from contracts/Mocks/FallbackInitializer.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackInitializer.sol diff --git a/contracts/Mocks/FallbackRevert.sol b/packages/lsp-smart-contracts/contracts/Mocks/FallbackRevert.sol similarity index 100% rename from contracts/Mocks/FallbackRevert.sol rename to packages/lsp-smart-contracts/contracts/Mocks/FallbackRevert.sol diff --git a/contracts/Mocks/GenericExecutor.sol b/packages/lsp-smart-contracts/contracts/Mocks/GenericExecutor.sol similarity index 100% rename from contracts/Mocks/GenericExecutor.sol rename to packages/lsp-smart-contracts/contracts/Mocks/GenericExecutor.sol diff --git a/contracts/Mocks/GenericExecutorWithBalanceOfFunction.sol b/packages/lsp-smart-contracts/contracts/Mocks/GenericExecutorWithBalanceOfFunction.sol similarity index 100% rename from contracts/Mocks/GenericExecutorWithBalanceOfFunction.sol rename to packages/lsp-smart-contracts/contracts/Mocks/GenericExecutorWithBalanceOfFunction.sol diff --git a/contracts/Mocks/ImplementationTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/ImplementationTester.sol similarity index 100% rename from contracts/Mocks/ImplementationTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/ImplementationTester.sol diff --git a/contracts/Mocks/KeyManager/ERC725YDelegateCall.sol b/packages/lsp-smart-contracts/contracts/Mocks/KeyManager/ERC725YDelegateCall.sol similarity index 100% rename from contracts/Mocks/KeyManager/ERC725YDelegateCall.sol rename to packages/lsp-smart-contracts/contracts/Mocks/KeyManager/ERC725YDelegateCall.sol diff --git a/contracts/Mocks/KeyManager/KeyManagerInternalsTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/KeyManager/KeyManagerInternalsTester.sol similarity index 100% rename from contracts/Mocks/KeyManager/KeyManagerInternalsTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/KeyManager/KeyManagerInternalsTester.sol diff --git a/contracts/Mocks/KeyManager/TargetPayableContract.sol b/packages/lsp-smart-contracts/contracts/Mocks/KeyManager/TargetPayableContract.sol similarity index 100% rename from contracts/Mocks/KeyManager/TargetPayableContract.sol rename to packages/lsp-smart-contracts/contracts/Mocks/KeyManager/TargetPayableContract.sol diff --git a/contracts/Mocks/KeyManagerInitWithExtraParams.sol b/packages/lsp-smart-contracts/contracts/Mocks/KeyManagerInitWithExtraParams.sol similarity index 100% rename from contracts/Mocks/KeyManagerInitWithExtraParams.sol rename to packages/lsp-smart-contracts/contracts/Mocks/KeyManagerInitWithExtraParams.sol diff --git a/contracts/Mocks/KeyManagerWithExtraParams.sol b/packages/lsp-smart-contracts/contracts/Mocks/KeyManagerWithExtraParams.sol similarity index 100% rename from contracts/Mocks/KeyManagerWithExtraParams.sol rename to packages/lsp-smart-contracts/contracts/Mocks/KeyManagerWithExtraParams.sol diff --git a/contracts/Mocks/LSP17ExtendableTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP17ExtendableTester.sol similarity index 100% rename from contracts/Mocks/LSP17ExtendableTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP17ExtendableTester.sol diff --git a/contracts/Mocks/LSP1TypeIDsTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP1TypeIDsTester.sol similarity index 100% rename from contracts/Mocks/LSP1TypeIDsTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP1TypeIDsTester.sol diff --git a/contracts/Mocks/LSP20Owners/BothCallReturnMagicValue.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/BothCallReturnMagicValue.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/BothCallReturnMagicValue.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/BothCallReturnMagicValue.sol diff --git a/contracts/Mocks/LSP20Owners/BothCallReturnSuccessValue.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/BothCallReturnSuccessValue.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/BothCallReturnSuccessValue.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/BothCallReturnSuccessValue.sol diff --git a/contracts/Mocks/LSP20Owners/FallbackReturnSuccessValue.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/FallbackReturnSuccessValue.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/FallbackReturnSuccessValue.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/FallbackReturnSuccessValue.sol diff --git a/contracts/Mocks/LSP20Owners/FirstCallReturnExpandedInvalidValue.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/FirstCallReturnExpandedInvalidValue.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/FirstCallReturnExpandedInvalidValue.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/FirstCallReturnExpandedInvalidValue.sol diff --git a/contracts/Mocks/LSP20Owners/FirstCallReturnInvalidValue.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/FirstCallReturnInvalidValue.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/FirstCallReturnInvalidValue.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/FirstCallReturnInvalidValue.sol diff --git a/contracts/Mocks/LSP20Owners/FirstCallReturnMagicValue.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/FirstCallReturnMagicValue.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/FirstCallReturnMagicValue.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/FirstCallReturnMagicValue.sol diff --git a/contracts/Mocks/LSP20Owners/FirstCallReturnSuccessValue.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/FirstCallReturnSuccessValue.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/FirstCallReturnSuccessValue.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/FirstCallReturnSuccessValue.sol diff --git a/contracts/Mocks/LSP20Owners/ImplementingFallback.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/ImplementingFallback.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/ImplementingFallback.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/ImplementingFallback.sol diff --git a/contracts/Mocks/LSP20Owners/NotImplementingVerifyCall.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/NotImplementingVerifyCall.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/NotImplementingVerifyCall.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/NotImplementingVerifyCall.sol diff --git a/contracts/Mocks/LSP20Owners/OwnerWIthURD.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/OwnerWIthURD.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/OwnerWIthURD.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/OwnerWIthURD.sol diff --git a/contracts/Mocks/LSP20Owners/SecondCallReturnExpandedSuccessValue.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/SecondCallReturnExpandedSuccessValue.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/SecondCallReturnExpandedSuccessValue.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/SecondCallReturnExpandedSuccessValue.sol diff --git a/contracts/Mocks/LSP20Owners/SecondCallReturnExpandedValue.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/SecondCallReturnExpandedValue.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/SecondCallReturnExpandedValue.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/SecondCallReturnExpandedValue.sol diff --git a/contracts/Mocks/LSP20Owners/SecondCallReturnFailureValue.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/SecondCallReturnFailureValue.sol similarity index 100% rename from contracts/Mocks/LSP20Owners/SecondCallReturnFailureValue.sol rename to packages/lsp-smart-contracts/contracts/Mocks/LSP20Owners/SecondCallReturnFailureValue.sol diff --git a/contracts/Mocks/MaliciousERC1271Wallet.sol b/packages/lsp-smart-contracts/contracts/Mocks/MaliciousERC1271Wallet.sol similarity index 100% rename from contracts/Mocks/MaliciousERC1271Wallet.sol rename to packages/lsp-smart-contracts/contracts/Mocks/MaliciousERC1271Wallet.sol diff --git a/contracts/Mocks/NonPayableFallback.sol b/packages/lsp-smart-contracts/contracts/Mocks/NonPayableFallback.sol similarity index 100% rename from contracts/Mocks/NonPayableFallback.sol rename to packages/lsp-smart-contracts/contracts/Mocks/NonPayableFallback.sol diff --git a/contracts/Mocks/PayableContract.sol b/packages/lsp-smart-contracts/contracts/Mocks/PayableContract.sol similarity index 100% rename from contracts/Mocks/PayableContract.sol rename to packages/lsp-smart-contracts/contracts/Mocks/PayableContract.sol diff --git a/contracts/Mocks/Reentrancy/BatchReentrancyRelayer.sol b/packages/lsp-smart-contracts/contracts/Mocks/Reentrancy/BatchReentrancyRelayer.sol similarity index 100% rename from contracts/Mocks/Reentrancy/BatchReentrancyRelayer.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Reentrancy/BatchReentrancyRelayer.sol diff --git a/contracts/Mocks/Reentrancy/LSP20ReentrantContract.sol b/packages/lsp-smart-contracts/contracts/Mocks/Reentrancy/LSP20ReentrantContract.sol similarity index 100% rename from contracts/Mocks/Reentrancy/LSP20ReentrantContract.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Reentrancy/LSP20ReentrantContract.sol diff --git a/contracts/Mocks/Reentrancy/LSP20ReentrantContractBatch.sol b/packages/lsp-smart-contracts/contracts/Mocks/Reentrancy/LSP20ReentrantContractBatch.sol similarity index 100% rename from contracts/Mocks/Reentrancy/LSP20ReentrantContractBatch.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Reentrancy/LSP20ReentrantContractBatch.sol diff --git a/contracts/Mocks/Reentrancy/ReentrantContract.sol b/packages/lsp-smart-contracts/contracts/Mocks/Reentrancy/ReentrantContract.sol similarity index 100% rename from contracts/Mocks/Reentrancy/ReentrantContract.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Reentrancy/ReentrantContract.sol diff --git a/contracts/Mocks/Reentrancy/SingleReentrancyRelayer.sol b/packages/lsp-smart-contracts/contracts/Mocks/Reentrancy/SingleReentrancyRelayer.sol similarity index 100% rename from contracts/Mocks/Reentrancy/SingleReentrancyRelayer.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Reentrancy/SingleReentrancyRelayer.sol diff --git a/contracts/Mocks/Reentrancy/ThreeReentrancy.sol b/packages/lsp-smart-contracts/contracts/Mocks/Reentrancy/ThreeReentrancy.sol similarity index 100% rename from contracts/Mocks/Reentrancy/ThreeReentrancy.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Reentrancy/ThreeReentrancy.sol diff --git a/contracts/Mocks/Security/Reentrancy.sol b/packages/lsp-smart-contracts/contracts/Mocks/Security/Reentrancy.sol similarity index 100% rename from contracts/Mocks/Security/Reentrancy.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Security/Reentrancy.sol diff --git a/contracts/Mocks/SignatureValidatorContract.sol b/packages/lsp-smart-contracts/contracts/Mocks/SignatureValidatorContract.sol similarity index 100% rename from contracts/Mocks/SignatureValidatorContract.sol rename to packages/lsp-smart-contracts/contracts/Mocks/SignatureValidatorContract.sol diff --git a/contracts/Mocks/TargetContract.sol b/packages/lsp-smart-contracts/contracts/Mocks/TargetContract.sol similarity index 100% rename from contracts/Mocks/TargetContract.sol rename to packages/lsp-smart-contracts/contracts/Mocks/TargetContract.sol diff --git a/contracts/Mocks/Tokens/IERC223.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/IERC223.sol similarity index 100% rename from contracts/Mocks/Tokens/IERC223.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/IERC223.sol diff --git a/contracts/Mocks/Tokens/LSP7CappedSupplyInitTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP7CappedSupplyInitTester.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP7CappedSupplyInitTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP7CappedSupplyInitTester.sol diff --git a/contracts/Mocks/Tokens/LSP7CappedSupplyTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP7CappedSupplyTester.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP7CappedSupplyTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP7CappedSupplyTester.sol diff --git a/contracts/Mocks/Tokens/LSP7InitTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP7InitTester.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP7InitTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP7InitTester.sol diff --git a/contracts/Mocks/Tokens/LSP7MintWhenDeployed.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP7MintWhenDeployed.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP7MintWhenDeployed.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP7MintWhenDeployed.sol diff --git a/contracts/Mocks/Tokens/LSP7Tester.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP7Tester.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP7Tester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP7Tester.sol diff --git a/contracts/Mocks/Tokens/LSP8BurnableInitTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8BurnableInitTester.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP8BurnableInitTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8BurnableInitTester.sol diff --git a/contracts/Mocks/Tokens/LSP8BurnableTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8BurnableTester.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP8BurnableTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8BurnableTester.sol diff --git a/contracts/Mocks/Tokens/LSP8CappedSupplyInitTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8CappedSupplyInitTester.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP8CappedSupplyInitTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8CappedSupplyInitTester.sol diff --git a/contracts/Mocks/Tokens/LSP8CappedSupplyTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8CappedSupplyTester.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP8CappedSupplyTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8CappedSupplyTester.sol diff --git a/contracts/Mocks/Tokens/LSP8EnumerableInitTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8EnumerableInitTester.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP8EnumerableInitTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8EnumerableInitTester.sol diff --git a/contracts/Mocks/Tokens/LSP8EnumerableTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8EnumerableTester.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP8EnumerableTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8EnumerableTester.sol diff --git a/contracts/Mocks/Tokens/LSP8InitTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8InitTester.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP8InitTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8InitTester.sol diff --git a/contracts/Mocks/Tokens/LSP8Tester.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8Tester.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP8Tester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8Tester.sol diff --git a/contracts/Mocks/Tokens/LSP8TransferOwnerChange.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8TransferOwnerChange.sol similarity index 100% rename from contracts/Mocks/Tokens/LSP8TransferOwnerChange.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/LSP8TransferOwnerChange.sol diff --git a/contracts/Mocks/Tokens/RequireCallbackToken.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/RequireCallbackToken.sol similarity index 100% rename from contracts/Mocks/Tokens/RequireCallbackToken.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/RequireCallbackToken.sol diff --git a/contracts/Mocks/Tokens/TokenReceiverWithLSP1.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithLSP1.sol similarity index 100% rename from contracts/Mocks/Tokens/TokenReceiverWithLSP1.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithLSP1.sol diff --git a/contracts/Mocks/Tokens/TokenReceiverWithLSP1Revert.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithLSP1Revert.sol similarity index 100% rename from contracts/Mocks/Tokens/TokenReceiverWithLSP1Revert.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithLSP1Revert.sol diff --git a/contracts/Mocks/Tokens/TokenReceiverWithLSP1WithERC721Received.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithLSP1WithERC721Received.sol similarity index 100% rename from contracts/Mocks/Tokens/TokenReceiverWithLSP1WithERC721Received.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithLSP1WithERC721Received.sol diff --git a/contracts/Mocks/Tokens/TokenReceiverWithLSP1WithERC721ReceivedInvalid.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithLSP1WithERC721ReceivedInvalid.sol similarity index 100% rename from contracts/Mocks/Tokens/TokenReceiverWithLSP1WithERC721ReceivedInvalid.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithLSP1WithERC721ReceivedInvalid.sol diff --git a/contracts/Mocks/Tokens/TokenReceiverWithLSP1WithERC721ReceivedRevert.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithLSP1WithERC721ReceivedRevert.sol similarity index 100% rename from contracts/Mocks/Tokens/TokenReceiverWithLSP1WithERC721ReceivedRevert.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithLSP1WithERC721ReceivedRevert.sol diff --git a/contracts/Mocks/Tokens/TokenReceiverWithoutLSP1.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithoutLSP1.sol similarity index 100% rename from contracts/Mocks/Tokens/TokenReceiverWithoutLSP1.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithoutLSP1.sol diff --git a/contracts/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721Received.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721Received.sol similarity index 100% rename from contracts/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721Received.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721Received.sol diff --git a/contracts/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721ReceivedInvalid.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721ReceivedInvalid.sol similarity index 100% rename from contracts/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721ReceivedInvalid.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721ReceivedInvalid.sol diff --git a/contracts/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721ReceivedRevert.sol b/packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721ReceivedRevert.sol similarity index 100% rename from contracts/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721ReceivedRevert.sol rename to packages/lsp-smart-contracts/contracts/Mocks/Tokens/TokenReceiverWithoutLSP1WithERC721ReceivedRevert.sol diff --git a/contracts/Mocks/UPWithInstantAcceptOwnership.sol b/packages/lsp-smart-contracts/contracts/Mocks/UPWithInstantAcceptOwnership.sol similarity index 100% rename from contracts/Mocks/UPWithInstantAcceptOwnership.sol rename to packages/lsp-smart-contracts/contracts/Mocks/UPWithInstantAcceptOwnership.sol diff --git a/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataLYX.sol b/packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataLYX.sol similarity index 100% rename from contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataLYX.sol rename to packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataLYX.sol diff --git a/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataUpdater.sol b/packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataUpdater.sol similarity index 100% rename from contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataUpdater.sol rename to packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataUpdater.sol diff --git a/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateGasConsumer.sol b/packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateGasConsumer.sol similarity index 100% rename from contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateGasConsumer.sol rename to packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateGasConsumer.sol diff --git a/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateRevert.sol b/packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateRevert.sol similarity index 100% rename from contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateRevert.sol rename to packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateRevert.sol diff --git a/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateTokenReentrant.sol b/packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateTokenReentrant.sol similarity index 100% rename from contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateTokenReentrant.sol rename to packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateTokenReentrant.sol diff --git a/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultMalicious.sol b/packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultMalicious.sol similarity index 100% rename from contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultMalicious.sol rename to packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultMalicious.sol diff --git a/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultReentrantA.sol b/packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultReentrantA.sol similarity index 100% rename from contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultReentrantA.sol rename to packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultReentrantA.sol diff --git a/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultReentrantB.sol b/packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultReentrantB.sol similarity index 100% rename from contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultReentrantB.sol rename to packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultReentrantB.sol diff --git a/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultSetter.sol b/packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultSetter.sol similarity index 100% rename from contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultSetter.sol rename to packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateVaultSetter.sol diff --git a/contracts/Mocks/UniversalReceivers/UniversalReceiverTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverTester.sol similarity index 100% rename from contracts/Mocks/UniversalReceivers/UniversalReceiverTester.sol rename to packages/lsp-smart-contracts/contracts/Mocks/UniversalReceivers/UniversalReceiverTester.sol diff --git a/contracts/Version.sol b/packages/lsp-smart-contracts/contracts/Version.sol similarity index 100% rename from contracts/Version.sol rename to packages/lsp-smart-contracts/contracts/Version.sol diff --git a/packages/lsp-smart-contracts/hardhat.config.ts b/packages/lsp-smart-contracts/hardhat.config.ts new file mode 100644 index 000000000..1a29755de --- /dev/null +++ b/packages/lsp-smart-contracts/hardhat.config.ts @@ -0,0 +1,197 @@ +import { HardhatUserConfig } from 'hardhat/config'; +import { NetworkUserConfig } from 'hardhat/types'; +import { config as dotenvConfig } from 'dotenv'; +import { resolve } from 'path'; + +/** + * this package includes: + * - @nomiclabs/hardhat-ethers + * - @nomicfoundation/hardhat-chai-matchers + * - @nomicfoundation/hardhat-network-helpers + * - @nomiclabs/hardhat-etherscan + * - @typechain/hardhat + * - solidity-coverage + */ +import '@nomicfoundation/hardhat-toolbox'; + +// additional hardhat plugins +import 'hardhat-packager'; +import 'hardhat-contract-sizer'; +import 'hardhat-deploy'; + +// custom built hardhat plugins for CI +import './scripts/ci/docs-generate'; +import './scripts/ci/gas_benchmark'; +import './scripts/ci/check-deployer-balance'; +import './scripts/ci/verify-all-contracts'; + +// Typescript types for web3.js +import '@nomiclabs/hardhat-web3'; + +/** + * @dev uncomment to generate contract docs in Markdown + */ +import '@b00ste/hardhat-dodoc'; +import { dodocConfig } from './dodoc/config'; + +dotenvConfig({ path: resolve(__dirname, './.env') }); + +function getTestnetChainConfig(): NetworkUserConfig { + const config: NetworkUserConfig = { + live: true, + url: 'https://rpc.testnet.lukso.network', + chainId: 4201, + saveDeployments: true, + }; + + if (process.env.CONTRACT_VERIFICATION_TESTNET_PK !== undefined) { + config['accounts'] = [process.env.CONTRACT_VERIFICATION_TESTNET_PK]; + } + + return config; +} + +function getMainnetChainConfig(): NetworkUserConfig { + const config: NetworkUserConfig = { + live: true, + url: 'https://rpc.lukso.gateway.fm', + chainId: 42, + saveDeployments: true, + }; + + if (process.env.CONTRACT_VERIFICATION_MAINNET_PK !== undefined) { + config['accounts'] = [process.env.CONTRACT_VERIFICATION_MAINNET_PK]; + } + + return config; +} + +const config: HardhatUserConfig = { + defaultNetwork: 'hardhat', + networks: { + hardhat: { + live: false, + saveDeployments: true, + allowBlocksWithSameTimestamp: true, + }, + luksoTestnet: getTestnetChainConfig(), + luksoMainnet: getMainnetChainConfig(), + }, + namedAccounts: { + owner: 0, + }, + deterministicDeployment: { + luksoTestnet: { + // Nick Factory. See https://github.com/Arachnid/deterministic-deployment-proxy + factory: '0x4e59b44847b379578588920ca78fbf26c0b4956c', + deployer: '0x3fab184622dc19b6109349b94811493bf2a45362', + funding: '0x0000000000000000000000000000000000000000000000000000000000000000', + signedTx: + '0xf8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222', + }, + }, + etherscan: { + apiKey: 'no-api-key-needed', + customChains: [ + { + network: 'luksoTestnet', + chainId: 4201, + urls: { + apiURL: 'https://api.explorer.execution.testnet.lukso.network/api', + browserURL: 'https://explorer.execution.testnet.lukso.network/', + }, + }, + { + network: 'luksoMainnet', + chainId: 42, + urls: { + apiURL: 'https://api.explorer.execution.mainnet.lukso.network/api', + browserURL: 'https://explorer.execution.mainnet.lukso.network/', + }, + }, + ], + }, + gasReporter: { + enabled: true, + currency: 'USD', + gasPrice: 21, + excludeContracts: ['Helpers/'], + src: './contracts', + showMethodSig: true, + }, + solidity: { + version: '0.8.17', + settings: { + optimizer: { + enabled: true, + /** + * Optimize for how many times you intend to run the code. + * Lower values will optimize more for initial deployment cost, higher + * values will optimize more for high-frequency usage. + * @see https://docs.soliditylang.org/en/v0.8.6/internals/optimizer.html#opcode-based-optimizer-module + */ + runs: 1000, + }, + outputSelection: { + '*': { + '*': ['storageLayout'], + }, + }, + }, + }, + mocha: { + timeout: 10000000, + }, + packager: { + // What contracts to keep the artifacts and the bindings for. + contracts: [ + // Standard version + // ------------------ + 'UniversalProfile', + 'LSP0ERC725Account', + 'LSP1UniversalReceiverDelegateUP', + 'LSP1UniversalReceiverDelegateVault', + 'LSP4DigitalAssetMetadata', + 'LSP6KeyManager', + 'LSP7DigitalAsset', + 'LSP7CappedSupply', + 'LSP7Mintable', + 'LSP8IdentifiableDigitalAsset', + 'LSP8CappedSupply', + 'LSP8Mintable', + 'LSP9Vault', + 'LSP11BasicSocialRecovery', + // Proxy version + // ------------------ + 'UniversalProfileInit', + 'LSP0ERC725AccountInit', + 'LSP4DigitalAssetMetadataInitAbstract', + 'LSP6KeyManagerInit', + 'LSP7DigitalAssetInitAbstract', + 'LSP7CappedSupplyInitAbstract', + 'LSP7MintableInit', + 'LSP8IdentifiableDigitalAssetInitAbstract', + 'LSP8CappedSupplyInitAbstract', + 'LSP8MintableInit', + 'LSP9VaultInit', + 'LSP11BasicSocialRecoveryInit', + // Tools + // ------------------ + 'LSP23LinkedContractsFactory', + ], + // Whether to include the TypeChain factories or not. + // If this is enabled, you need to run the TypeChain files through the TypeScript compiler before shipping to the registry. + // includeFactories: true, + }, + paths: { + artifacts: 'artifacts', + tests: 'tests', + }, + typechain: { + outDir: 'types', + target: 'ethers-v6', + }, + dodoc: dodocConfig, +}; + +export default config; From 404cfb5132aa0a99d533da7d902a1c9e8a2ca993 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Tue, 27 Feb 2024 19:29:59 -0700 Subject: [PATCH 02/21] build: move all the build and config files into `packages/lsp-smart-contracts` --- .eslintrc.js | 9 - config/tsconfig/contracts.module.json | 11 - gasreport.ansi | 1 - hardhat.config.ts | 197 ------------------ packages/lsp-smart-contracts/.eslintrc.js | 4 + .../lsp-smart-contracts/.solcover.js | 0 .../lsp-smart-contracts/.solhint.json | 0 .../lsp-smart-contracts/CHANGELOG.md | 0 .../lsp-smart-contracts/build.config.ts | 0 .../lsp-smart-contracts/constants.ts | 0 .../lsp-smart-contracts/dodoc}/config.ts | 0 .../lsp-smart-contracts/dodoc}/template.sqrl | 0 packages/lsp-smart-contracts/index.ts | 1 + .../lsp-smart-contracts/scripts}/ci/README.md | 0 .../scripts}/ci/check-deployer-balance.ts | 0 .../scripts}/ci/docs-generate.ts | 0 .../scripts}/ci/gas_benchmark.ts | 0 .../scripts}/ci/gas_benchmark_template.json | 0 .../scripts}/ci/verify-all-contracts.ts | 0 .../scripts}/fix_flattener.js | 0 .../scripts}/interfaceIds.ts | 0 .../lsp-smart-contracts/scripts}/typesTs.sh | 0 packages/lsp-smart-contracts/tsconfig.json | 4 + tsconfig.json | 20 -- tsconfig.module.json | 10 - 25 files changed, 9 insertions(+), 248 deletions(-) delete mode 100644 .eslintrc.js delete mode 100755 config/tsconfig/contracts.module.json delete mode 100644 gasreport.ansi delete mode 100644 hardhat.config.ts create mode 100644 packages/lsp-smart-contracts/.eslintrc.js rename .solcover.js => packages/lsp-smart-contracts/.solcover.js (100%) rename .solhint.json => packages/lsp-smart-contracts/.solhint.json (100%) rename CHANGELOG.md => packages/lsp-smart-contracts/CHANGELOG.md (100%) rename build.config.ts => packages/lsp-smart-contracts/build.config.ts (100%) rename constants.ts => packages/lsp-smart-contracts/constants.ts (100%) rename {dodoc => packages/lsp-smart-contracts/dodoc}/config.ts (100%) rename {dodoc => packages/lsp-smart-contracts/dodoc}/template.sqrl (100%) create mode 100644 packages/lsp-smart-contracts/index.ts rename {scripts => packages/lsp-smart-contracts/scripts}/ci/README.md (100%) rename {scripts => packages/lsp-smart-contracts/scripts}/ci/check-deployer-balance.ts (100%) rename {scripts => packages/lsp-smart-contracts/scripts}/ci/docs-generate.ts (100%) rename {scripts => packages/lsp-smart-contracts/scripts}/ci/gas_benchmark.ts (100%) rename {scripts => packages/lsp-smart-contracts/scripts}/ci/gas_benchmark_template.json (100%) rename {scripts => packages/lsp-smart-contracts/scripts}/ci/verify-all-contracts.ts (100%) rename {scripts => packages/lsp-smart-contracts/scripts}/fix_flattener.js (100%) rename {scripts => packages/lsp-smart-contracts/scripts}/interfaceIds.ts (100%) rename {scripts => packages/lsp-smart-contracts/scripts}/typesTs.sh (100%) create mode 100644 packages/lsp-smart-contracts/tsconfig.json delete mode 100644 tsconfig.json delete mode 100644 tsconfig.module.json diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 336d708d3..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - ignorePatterns: ['artifacts/', 'cache/', 'dist/', 'types/', 'contracts.ts'], - extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], - plugins: ['@typescript-eslint/eslint-plugin', 'prettier'], - rules: { - 'prettier/prettier': 'error', - '@typescript-eslint/no-explicit-any': 'off', - }, -}; diff --git a/config/tsconfig/contracts.module.json b/config/tsconfig/contracts.module.json deleted file mode 100755 index 83997ab57..000000000 --- a/config/tsconfig/contracts.module.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig", - "compilerOptions": { - "module": "esNext", - "target": "esNext", - "outDir": "module", - "declaration": true, - "skipLibCheck": false - }, - "files": ["./constants.ts"] -} diff --git a/gasreport.ansi b/gasreport.ansi deleted file mode 100644 index 5d07ee0fa..000000000 --- a/gasreport.ansi +++ /dev/null @@ -1 +0,0 @@ -Compiling 272 files with 0.8.17 diff --git a/hardhat.config.ts b/hardhat.config.ts deleted file mode 100644 index 1a29755de..000000000 --- a/hardhat.config.ts +++ /dev/null @@ -1,197 +0,0 @@ -import { HardhatUserConfig } from 'hardhat/config'; -import { NetworkUserConfig } from 'hardhat/types'; -import { config as dotenvConfig } from 'dotenv'; -import { resolve } from 'path'; - -/** - * this package includes: - * - @nomiclabs/hardhat-ethers - * - @nomicfoundation/hardhat-chai-matchers - * - @nomicfoundation/hardhat-network-helpers - * - @nomiclabs/hardhat-etherscan - * - @typechain/hardhat - * - solidity-coverage - */ -import '@nomicfoundation/hardhat-toolbox'; - -// additional hardhat plugins -import 'hardhat-packager'; -import 'hardhat-contract-sizer'; -import 'hardhat-deploy'; - -// custom built hardhat plugins for CI -import './scripts/ci/docs-generate'; -import './scripts/ci/gas_benchmark'; -import './scripts/ci/check-deployer-balance'; -import './scripts/ci/verify-all-contracts'; - -// Typescript types for web3.js -import '@nomiclabs/hardhat-web3'; - -/** - * @dev uncomment to generate contract docs in Markdown - */ -import '@b00ste/hardhat-dodoc'; -import { dodocConfig } from './dodoc/config'; - -dotenvConfig({ path: resolve(__dirname, './.env') }); - -function getTestnetChainConfig(): NetworkUserConfig { - const config: NetworkUserConfig = { - live: true, - url: 'https://rpc.testnet.lukso.network', - chainId: 4201, - saveDeployments: true, - }; - - if (process.env.CONTRACT_VERIFICATION_TESTNET_PK !== undefined) { - config['accounts'] = [process.env.CONTRACT_VERIFICATION_TESTNET_PK]; - } - - return config; -} - -function getMainnetChainConfig(): NetworkUserConfig { - const config: NetworkUserConfig = { - live: true, - url: 'https://rpc.lukso.gateway.fm', - chainId: 42, - saveDeployments: true, - }; - - if (process.env.CONTRACT_VERIFICATION_MAINNET_PK !== undefined) { - config['accounts'] = [process.env.CONTRACT_VERIFICATION_MAINNET_PK]; - } - - return config; -} - -const config: HardhatUserConfig = { - defaultNetwork: 'hardhat', - networks: { - hardhat: { - live: false, - saveDeployments: true, - allowBlocksWithSameTimestamp: true, - }, - luksoTestnet: getTestnetChainConfig(), - luksoMainnet: getMainnetChainConfig(), - }, - namedAccounts: { - owner: 0, - }, - deterministicDeployment: { - luksoTestnet: { - // Nick Factory. See https://github.com/Arachnid/deterministic-deployment-proxy - factory: '0x4e59b44847b379578588920ca78fbf26c0b4956c', - deployer: '0x3fab184622dc19b6109349b94811493bf2a45362', - funding: '0x0000000000000000000000000000000000000000000000000000000000000000', - signedTx: - '0xf8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222', - }, - }, - etherscan: { - apiKey: 'no-api-key-needed', - customChains: [ - { - network: 'luksoTestnet', - chainId: 4201, - urls: { - apiURL: 'https://api.explorer.execution.testnet.lukso.network/api', - browserURL: 'https://explorer.execution.testnet.lukso.network/', - }, - }, - { - network: 'luksoMainnet', - chainId: 42, - urls: { - apiURL: 'https://api.explorer.execution.mainnet.lukso.network/api', - browserURL: 'https://explorer.execution.mainnet.lukso.network/', - }, - }, - ], - }, - gasReporter: { - enabled: true, - currency: 'USD', - gasPrice: 21, - excludeContracts: ['Helpers/'], - src: './contracts', - showMethodSig: true, - }, - solidity: { - version: '0.8.17', - settings: { - optimizer: { - enabled: true, - /** - * Optimize for how many times you intend to run the code. - * Lower values will optimize more for initial deployment cost, higher - * values will optimize more for high-frequency usage. - * @see https://docs.soliditylang.org/en/v0.8.6/internals/optimizer.html#opcode-based-optimizer-module - */ - runs: 1000, - }, - outputSelection: { - '*': { - '*': ['storageLayout'], - }, - }, - }, - }, - mocha: { - timeout: 10000000, - }, - packager: { - // What contracts to keep the artifacts and the bindings for. - contracts: [ - // Standard version - // ------------------ - 'UniversalProfile', - 'LSP0ERC725Account', - 'LSP1UniversalReceiverDelegateUP', - 'LSP1UniversalReceiverDelegateVault', - 'LSP4DigitalAssetMetadata', - 'LSP6KeyManager', - 'LSP7DigitalAsset', - 'LSP7CappedSupply', - 'LSP7Mintable', - 'LSP8IdentifiableDigitalAsset', - 'LSP8CappedSupply', - 'LSP8Mintable', - 'LSP9Vault', - 'LSP11BasicSocialRecovery', - // Proxy version - // ------------------ - 'UniversalProfileInit', - 'LSP0ERC725AccountInit', - 'LSP4DigitalAssetMetadataInitAbstract', - 'LSP6KeyManagerInit', - 'LSP7DigitalAssetInitAbstract', - 'LSP7CappedSupplyInitAbstract', - 'LSP7MintableInit', - 'LSP8IdentifiableDigitalAssetInitAbstract', - 'LSP8CappedSupplyInitAbstract', - 'LSP8MintableInit', - 'LSP9VaultInit', - 'LSP11BasicSocialRecoveryInit', - // Tools - // ------------------ - 'LSP23LinkedContractsFactory', - ], - // Whether to include the TypeChain factories or not. - // If this is enabled, you need to run the TypeChain files through the TypeScript compiler before shipping to the registry. - // includeFactories: true, - }, - paths: { - artifacts: 'artifacts', - tests: 'tests', - }, - typechain: { - outDir: 'types', - target: 'ethers-v6', - }, - dodoc: dodocConfig, -}; - -export default config; diff --git a/packages/lsp-smart-contracts/.eslintrc.js b/packages/lsp-smart-contracts/.eslintrc.js new file mode 100644 index 000000000..03ee7431b --- /dev/null +++ b/packages/lsp-smart-contracts/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: ['custom'], +}; diff --git a/.solcover.js b/packages/lsp-smart-contracts/.solcover.js similarity index 100% rename from .solcover.js rename to packages/lsp-smart-contracts/.solcover.js diff --git a/.solhint.json b/packages/lsp-smart-contracts/.solhint.json similarity index 100% rename from .solhint.json rename to packages/lsp-smart-contracts/.solhint.json diff --git a/CHANGELOG.md b/packages/lsp-smart-contracts/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to packages/lsp-smart-contracts/CHANGELOG.md diff --git a/build.config.ts b/packages/lsp-smart-contracts/build.config.ts similarity index 100% rename from build.config.ts rename to packages/lsp-smart-contracts/build.config.ts diff --git a/constants.ts b/packages/lsp-smart-contracts/constants.ts similarity index 100% rename from constants.ts rename to packages/lsp-smart-contracts/constants.ts diff --git a/dodoc/config.ts b/packages/lsp-smart-contracts/dodoc/config.ts similarity index 100% rename from dodoc/config.ts rename to packages/lsp-smart-contracts/dodoc/config.ts diff --git a/dodoc/template.sqrl b/packages/lsp-smart-contracts/dodoc/template.sqrl similarity index 100% rename from dodoc/template.sqrl rename to packages/lsp-smart-contracts/dodoc/template.sqrl diff --git a/packages/lsp-smart-contracts/index.ts b/packages/lsp-smart-contracts/index.ts new file mode 100644 index 000000000..c94f80f84 --- /dev/null +++ b/packages/lsp-smart-contracts/index.ts @@ -0,0 +1 @@ +export * from './constants'; diff --git a/scripts/ci/README.md b/packages/lsp-smart-contracts/scripts/ci/README.md similarity index 100% rename from scripts/ci/README.md rename to packages/lsp-smart-contracts/scripts/ci/README.md diff --git a/scripts/ci/check-deployer-balance.ts b/packages/lsp-smart-contracts/scripts/ci/check-deployer-balance.ts similarity index 100% rename from scripts/ci/check-deployer-balance.ts rename to packages/lsp-smart-contracts/scripts/ci/check-deployer-balance.ts diff --git a/scripts/ci/docs-generate.ts b/packages/lsp-smart-contracts/scripts/ci/docs-generate.ts similarity index 100% rename from scripts/ci/docs-generate.ts rename to packages/lsp-smart-contracts/scripts/ci/docs-generate.ts diff --git a/scripts/ci/gas_benchmark.ts b/packages/lsp-smart-contracts/scripts/ci/gas_benchmark.ts similarity index 100% rename from scripts/ci/gas_benchmark.ts rename to packages/lsp-smart-contracts/scripts/ci/gas_benchmark.ts diff --git a/scripts/ci/gas_benchmark_template.json b/packages/lsp-smart-contracts/scripts/ci/gas_benchmark_template.json similarity index 100% rename from scripts/ci/gas_benchmark_template.json rename to packages/lsp-smart-contracts/scripts/ci/gas_benchmark_template.json diff --git a/scripts/ci/verify-all-contracts.ts b/packages/lsp-smart-contracts/scripts/ci/verify-all-contracts.ts similarity index 100% rename from scripts/ci/verify-all-contracts.ts rename to packages/lsp-smart-contracts/scripts/ci/verify-all-contracts.ts diff --git a/scripts/fix_flattener.js b/packages/lsp-smart-contracts/scripts/fix_flattener.js similarity index 100% rename from scripts/fix_flattener.js rename to packages/lsp-smart-contracts/scripts/fix_flattener.js diff --git a/scripts/interfaceIds.ts b/packages/lsp-smart-contracts/scripts/interfaceIds.ts similarity index 100% rename from scripts/interfaceIds.ts rename to packages/lsp-smart-contracts/scripts/interfaceIds.ts diff --git a/scripts/typesTs.sh b/packages/lsp-smart-contracts/scripts/typesTs.sh similarity index 100% rename from scripts/typesTs.sh rename to packages/lsp-smart-contracts/scripts/typesTs.sh diff --git a/packages/lsp-smart-contracts/tsconfig.json b/packages/lsp-smart-contracts/tsconfig.json new file mode 100644 index 000000000..b7a34e03f --- /dev/null +++ b/packages/lsp-smart-contracts/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "tsconfig/contracts.json", + "include": ["**/*.ts"] +} diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index f534beb22..000000000 --- a/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2019", - "module": "commonjs", - "moduleResolution": "node", - "esModuleInterop": true, - "outDir": "dist", - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "lib": ["ES2019", "es2019.array", "ES2021.String"] - }, - "include": [ - "./tests", - "./deploy", - "hardhat", - "packages/LSP2ERC725YJSONSchema/tests/LSP2UtilsLibrary.test.ts" - ], - "files": ["./hardhat.config.ts"] -} diff --git a/tsconfig.module.json b/tsconfig.module.json deleted file mode 100644 index db1b7f1fd..000000000 --- a/tsconfig.module.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig", - "compilerOptions": { - "module": "esNext", - "target": "esNext", - "declaration": true, - "skipLibCheck": false - }, - "files": ["./constants.ts"] -} From c77f9e9e2b87f3d601ad250e7500c4426a82e8dc Mon Sep 17 00:00:00 2001 From: CJ42 Date: Tue, 27 Feb 2024 19:30:36 -0700 Subject: [PATCH 03/21] test: move all the tests/ under `packages/lsp-smart-contracts` --- .../lsp-smart-contracts/tests}/Benchmark.test.ts | 2 +- .../LSP11BasicSocialRecovery.behaviour.ts | 2 +- .../LSP11BasicSocialRecovery.test.ts | 6 +++++- .../LSP11BasicSocialRecoveryInit.test.ts | 2 +- .../LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts | 2 +- .../LSP17ContractExtension/LSP17Extendable.behaviour.ts | 2 +- .../LSP17ContractExtension/LSP17Extendable.test.ts | 2 +- .../LSP17ExtendableTokens.behaviour.ts | 2 +- .../tests}/LSP17Extensions/Extension4337/4337.test.ts | 2 +- .../tests}/LSP17Extensions/helpers/Create2Factory.ts | 0 .../tests}/LSP17Extensions/helpers/UserOp.ts | 0 .../tests}/LSP17Extensions/helpers/solidityTypes.ts | 0 .../tests}/LSP17Extensions/helpers/utils.ts | 0 .../LSP1UniversalReceiver.behaviour.ts | 2 +- .../LSP1UniversalReceiverDelegateUP.behaviour.ts | 2 +- .../LSP1UniversalReceiverDelegateUP.test.ts | 6 +++++- .../LSP1UniversalReceiverDelegateVault.behaviour.ts | 2 +- .../LSP1UniversalReceiverDelegateVault.test.ts | 2 +- .../LSP20CallVerification.behaviour.ts | 4 ++-- .../LSP20CallVerification/LSP20WithLSP14.behaviour.ts | 2 +- .../LSP6/Admin/PermissionChangeAddExtensions.test.ts | 0 .../LSP6/Admin/PermissionChangeAddURD.test.ts | 0 .../LSP6/Admin/PermissionChangeOwner.test.ts | 2 +- .../LSP6/Interactions/AllowedAddresses.test.ts | 2 +- .../LSP6/Interactions/AllowedFunctions.test.ts | 2 +- .../LSP6/Interactions/AllowedStandards.test.ts | 2 +- .../LSP6/Interactions/ERC725XExecuteBatch.test.ts | 2 +- .../LSP6/Interactions/OtherScenarios.test.ts | 2 +- .../LSP6/Interactions/PermissionCall.test.ts | 2 +- .../LSP6/Interactions/PermissionDelegateCall.test.ts | 2 +- .../LSP6/Interactions/PermissionDeploy.test.ts | 2 +- .../LSP6/Interactions/PermissionStaticCall.test.ts | 2 +- .../LSP6/Interactions/PermissionTransferValue.test.ts | 2 +- .../LSP6/Interactions/Security.test.ts | 2 +- .../LSP6/LSP20WithLSP6.behaviour.ts | 0 .../LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts | 2 +- .../LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts | 2 +- .../LSP6/SetData/AllowedERC725YDataKeys.test.ts | 0 .../LSP6/SetData/PermissionSetData.test.ts | 2 +- .../SetPermissions/PermissionChangeAddController.test.ts | 0 .../LSP6/SetPermissions/SetAllowedCalls.test.ts | 0 .../SetPermissions/SetAllowedERC725YDataKeys.test.ts | 0 .../tests}/LSP20CallVerification/LSP6/index.ts | 0 .../LSP23LinkedContractsDeployment.test.ts | 2 +- .../tests}/LSP23LinkedContractsDeployment/helpers.ts | 4 ++-- .../LSP4DigitalAssetMetadata.behaviour.ts | 2 +- .../Admin/PermissionChangeAddExtensions.test.ts | 0 .../LSP6KeyManager/Admin/PermissionChangeAddURD.test.ts | 0 .../LSP6KeyManager/Admin/PermissionChangeOwner.test.ts | 2 +- .../tests}/LSP6KeyManager/Admin/PermissionSign.test.ts | 0 .../LSP6KeyManager/Interactions/AllowedAddresses.test.ts | 2 +- .../LSP6KeyManager/Interactions/AllowedFunctions.test.ts | 2 +- .../LSP6KeyManager/Interactions/AllowedStandards.test.ts | 2 +- .../LSP6KeyManager/Interactions/BatchExecute.test.ts | 6 +++++- .../Interactions/InvalidExecutePayloads.test.ts | 2 +- .../LSP6KeyManager/Interactions/PermissionCall.test.ts | 2 +- .../Interactions/PermissionDelegateCall.test.ts | 2 +- .../LSP6KeyManager/Interactions/PermissionDeploy.test.ts | 2 +- .../Interactions/PermissionStaticCall.test.ts | 2 +- .../Interactions/PermissionTransferValue.test.ts | 2 +- .../tests}/LSP6KeyManager/LSP6ControlledToken.test.ts | 2 +- .../tests}/LSP6KeyManager/LSP6KeyManager.behaviour.ts | 0 .../tests}/LSP6KeyManager/LSP6KeyManager.test.ts | 2 +- .../tests}/LSP6KeyManager/LSP6KeyManagerInit.test.ts | 2 +- .../tests}/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts | 2 +- .../LSP6KeyManager/Relay/MultiChannelNonce.test.ts | 2 +- .../SetData/AllowedERC725YDataKeys.test.ts | 0 .../LSP6KeyManager/SetData/PermissionSetData.test.ts | 2 +- .../SetPermissions/PermissionChangeAddController.test.ts | 0 .../SetPermissions/SetAllowedCalls.test.ts | 0 .../SetPermissions/SetAllowedERC725YDataKeys.test.ts | 0 .../lsp-smart-contracts/tests}/LSP6KeyManager/index.ts | 0 .../LSP6KeyManager/internals/AllowedCalls.internal.ts | 2 +- .../internals/AllowedERC725YDataKeys.internal.ts | 0 .../tests}/LSP6KeyManager/internals/Execute.internal.ts | 0 .../LSP6KeyManager/internals/ReadPermissions.internal.ts | 0 .../tests}/LSP6KeyManager/internals/SetData.internal.ts | 0 .../LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts | 2 +- .../LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts | 2 +- .../tests}/LSP7DigitalAsset/LSP7Mintable.behaviour.ts | 2 +- .../LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts | 5 ++++- .../LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts | 2 +- .../LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts | 2 +- .../LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts | 2 +- .../LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts | 2 +- .../LSP7DigitalAsset/standard/LSP7Mintable.test.ts | 2 +- .../LSP8CappedSupply.behaviour.ts | 2 +- .../LSP8Enumerable.behaviour.ts | 2 +- .../LSP8IdentifiableDigitalAsset.behaviour.ts | 2 +- .../LSP8Mintable.behaviour.ts | 2 +- .../proxy/LSP8BurnableInit.test.ts | 2 +- .../proxy/LSP8CappedSupplyInit.test.ts | 5 ++++- .../proxy/LSP8EnumerableInit.test.ts | 2 +- .../proxy/LSP8IdentifiableDigitalAssetInit.test.ts | 6 +++++- .../proxy/LSP8MintableInit.test.ts | 2 +- .../standard/LSP8Burnable.test.ts | 2 +- .../standard/LSP8CappedSupply.test.ts | 2 +- .../standard/LSP8Enumerable.test.ts | 2 +- .../standard/LSP8IdentifiableDigitalAsset.test.ts | 2 +- .../standard/LSP8Mintable.test.ts | 2 +- .../tests}/LSP9Vault/LSP9Vault.behaviour.ts | 2 +- .../tests}/LSP9Vault/LSP9Vault.test.ts | 2 +- .../tests}/LSP9Vault/LSP9VaultInit.test.ts | 2 +- .../lsp-smart-contracts/tests}/Mocks/ABIEncoder.test.ts | 2 +- .../tests}/Mocks/ERC165Interfaces.test.ts | 2 +- .../tests}/Mocks/KeyManagerExecutionCosts.test.ts | 6 +++++- .../lsp-smart-contracts/tests}/Mocks/LSP1TypeIDs.test.ts | 2 +- {tests => packages/lsp-smart-contracts/tests}/README.md | 0 .../LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts | 2 +- .../LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts | 2 +- .../LSP20/ERC725XExecuteToERC725XExecute.test.ts | 2 +- .../ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts | 2 +- .../LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts | 2 +- .../Reentrancy/LSP20/LSP20WithLSP6Reentrancy.test.ts | 0 .../tests}/Reentrancy/LSP20/reentrancyHelpers.ts | 2 +- .../tests}/Reentrancy/LSP6/LSP6Reentrancy.test.ts | 2 +- .../LSP6/SingleExecuteRelayCallToSingleExecute.test.ts | 0 ...ingleExecuteRelayCallToSingleExecuteRelayCall.test.ts | 2 +- .../Reentrancy/LSP6/SingleExecuteToBatchExecute.test.ts | 0 .../LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts | 2 +- .../Reentrancy/LSP6/SingleExecuteToSingleExecute.test.ts | 0 .../LSP6/SingleExecuteToSingleExecuteRelayCall.test.ts | 0 .../tests}/Reentrancy/LSP6/reentrancyHelpers.ts | 2 +- .../tests}/Reentrancy/Reentrancy.test.ts | 2 +- .../tests}/Reentrancy/ReentrancyInit.test.ts | 2 +- .../tests}/UniversalProfile.behaviour.ts | 2 +- .../lsp-smart-contracts/tests}/UniversalProfile.test.ts | 2 +- .../tests}/UniversalProfileInit.test.ts | 2 +- .../tests}/foundry/GasTests/LSP6s/LSP6ExecuteRC.sol | 0 .../tests}/foundry/GasTests/LSP6s/LSP6ExecuteUC.sol | 0 .../tests}/foundry/GasTests/LSP6s/LSP6SetDataRC.sol | 0 .../tests}/foundry/GasTests/LSP6s/LSP6SetDataUC.sol | 0 .../foundry/GasTests/UniversalProfileTestsHelper.sol | 0 .../foundry/GasTests/execute/RestrictedController.sol | 0 .../foundry/GasTests/execute/UnrestrictedController.sol | 0 .../foundry/GasTests/setData/RestrictedController.sol | 0 .../foundry/GasTests/setData/UnrestrictedController.sol | 0 .../LSP11BasicSocialRecovery.t.sol | 0 .../foundry/LSP11BasicSocialRecovery/LSP11Mock.sol | 0 .../LSP14Ownable2Step/AcceptOwnershipCleanState.sol | 0 .../foundry/LSP14Ownable2Step/TwoStepOwnership.sol | 0 .../LSP14Ownable2Step/TwoStepRenounceOwnership.sol | 0 .../LSP6KeyManager/LSP6RestrictedController.t.sol | 0 .../lsp-smart-contracts/tests}/utils/context.ts | 6 +++++- .../lsp-smart-contracts/tests}/utils/fixtures.ts | 4 ++-- .../lsp-smart-contracts/tests}/utils/helpers.ts | 0 .../lsp-smart-contracts/tests}/utils/tokens.ts | 0 template/build.config.ts | 9 +++++++++ 148 files changed, 141 insertions(+), 102 deletions(-) rename {tests => packages/lsp-smart-contracts/tests}/Benchmark.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts (94%) rename {tests => packages/lsp-smart-contracts/tests}/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP17ContractExtension/LSP17Extendable.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP17ContractExtension/LSP17Extendable.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP17ContractExtension/LSP17ExtendableTokens.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP17Extensions/Extension4337/4337.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP17Extensions/helpers/Create2Factory.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP17Extensions/helpers/UserOp.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP17Extensions/helpers/solidityTypes.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP17Extensions/helpers/utils.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP1UniversalReceiver/LSP1UniversalReceiver.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.test.ts (94%) rename {tests => packages/lsp-smart-contracts/tests}/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP20CallVerification.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP20WithLSP14.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Admin/PermissionChangeAddExtensions.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Admin/PermissionChangeAddURD.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Admin/PermissionChangeOwner.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Interactions/AllowedAddresses.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Interactions/AllowedFunctions.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Interactions/AllowedStandards.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Interactions/ERC725XExecuteBatch.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Interactions/OtherScenarios.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Interactions/PermissionCall.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Interactions/PermissionDelegateCall.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Interactions/PermissionDeploy.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Interactions/PermissionStaticCall.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/Interactions/Security.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/LSP20WithLSP6.behaviour.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts (97%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/SetData/AllowedERC725YDataKeys.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/SetData/PermissionSetData.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/SetPermissions/PermissionChangeAddController.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/SetPermissions/SetAllowedCalls.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/SetPermissions/SetAllowedERC725YDataKeys.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP20CallVerification/LSP6/index.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP23LinkedContractsDeployment/helpers.ts (97%) rename {tests => packages/lsp-smart-contracts/tests}/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Admin/PermissionChangeAddExtensions.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Admin/PermissionChangeAddURD.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Admin/PermissionChangeOwner.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Admin/PermissionSign.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Interactions/AllowedAddresses.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Interactions/AllowedFunctions.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Interactions/AllowedStandards.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Interactions/BatchExecute.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Interactions/InvalidExecutePayloads.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Interactions/PermissionCall.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Interactions/PermissionDelegateCall.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Interactions/PermissionDeploy.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Interactions/PermissionStaticCall.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/LSP6ControlledToken.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/LSP6KeyManager.behaviour.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/LSP6KeyManager.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/LSP6KeyManagerInit.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/Relay/MultiChannelNonce.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/SetData/AllowedERC725YDataKeys.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/SetData/PermissionSetData.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/SetPermissions/PermissionChangeAddController.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/SetPermissions/SetAllowedCalls.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/SetPermissions/SetAllowedERC725YDataKeys.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/index.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/internals/AllowedCalls.internal.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/internals/AllowedERC725YDataKeys.internal.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/internals/Execute.internal.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/internals/ReadPermissions.internal.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP6KeyManager/internals/SetData.internal.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP7DigitalAsset/LSP7Mintable.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts (96%) rename {tests => packages/lsp-smart-contracts/tests}/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts (95%) rename {tests => packages/lsp-smart-contracts/tests}/LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP7DigitalAsset/standard/LSP7Mintable.test.ts (95%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts (96%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts (97%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts (96%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts (95%) rename {tests => packages/lsp-smart-contracts/tests}/LSP9Vault/LSP9Vault.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP9Vault/LSP9Vault.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/LSP9Vault/LSP9VaultInit.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/Mocks/ABIEncoder.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/Mocks/ERC165Interfaces.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/Mocks/KeyManagerExecutionCosts.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/Mocks/LSP1TypeIDs.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/README.md (100%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP20/ERC725XExecuteToERC725XExecute.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP20/ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP20/LSP20WithLSP6Reentrancy.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP20/reentrancyHelpers.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP6/LSP6Reentrancy.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecute.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecuteRelayCall.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP6/SingleExecuteToBatchExecute.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP6/SingleExecuteToSingleExecute.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP6/SingleExecuteToSingleExecuteRelayCall.test.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/LSP6/reentrancyHelpers.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/Reentrancy.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/Reentrancy/ReentrancyInit.test.ts (98%) rename {tests => packages/lsp-smart-contracts/tests}/UniversalProfile.behaviour.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/UniversalProfile.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/UniversalProfileInit.test.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/GasTests/LSP6s/LSP6ExecuteRC.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/GasTests/LSP6s/LSP6ExecuteUC.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/GasTests/LSP6s/LSP6SetDataRC.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/GasTests/LSP6s/LSP6SetDataUC.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/GasTests/UniversalProfileTestsHelper.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/GasTests/execute/RestrictedController.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/GasTests/execute/UnrestrictedController.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/GasTests/setData/RestrictedController.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/GasTests/setData/UnrestrictedController.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.t.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/LSP11BasicSocialRecovery/LSP11Mock.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/LSP14Ownable2Step/AcceptOwnershipCleanState.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/LSP14Ownable2Step/TwoStepOwnership.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/LSP14Ownable2Step/TwoStepRenounceOwnership.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/foundry/LSP6KeyManager/LSP6RestrictedController.t.sol (100%) rename {tests => packages/lsp-smart-contracts/tests}/utils/context.ts (81%) rename {tests => packages/lsp-smart-contracts/tests}/utils/fixtures.ts (99%) rename {tests => packages/lsp-smart-contracts/tests}/utils/helpers.ts (100%) rename {tests => packages/lsp-smart-contracts/tests}/utils/tokens.ts (100%) create mode 100644 template/build.config.ts diff --git a/tests/Benchmark.test.ts b/packages/lsp-smart-contracts/tests/Benchmark.test.ts similarity index 99% rename from tests/Benchmark.test.ts rename to packages/lsp-smart-contracts/tests/Benchmark.test.ts index 419e08423..157c8fbab 100644 --- a/tests/Benchmark.test.ts +++ b/packages/lsp-smart-contracts/tests/Benchmark.test.ts @@ -11,7 +11,7 @@ import { UniversalProfile, UniversalProfile__factory, LSP6KeyManager__factory, -} from '../types'; +} from '../../../types'; import { ERC725YDataKeys, INTERFACE_IDS } from '../constants'; import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; diff --git a/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.behaviour.ts similarity index 99% rename from tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.behaviour.ts index a5c3b3edb..e6b2f4a11 100644 --- a/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.behaviour.ts @@ -2,7 +2,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { LSP11BasicSocialRecovery, LSP6KeyManager, UniversalProfile } from '../../types'; +import { LSP11BasicSocialRecovery, LSP6KeyManager, UniversalProfile } from '../../../../types'; import { ERC725YDataKeys, INTERFACE_IDS } from '../../constants'; import { ALL_PERMISSIONS } from '@lukso/lsp6-contracts'; diff --git a/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts b/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts similarity index 94% rename from tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts rename to packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts index 728d6ede4..6d6795988 100644 --- a/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts @@ -1,4 +1,8 @@ -import { LSP11BasicSocialRecovery__factory, LSP6KeyManager, UniversalProfile } from '../../types'; +import { + LSP11BasicSocialRecovery__factory, + LSP6KeyManager, + UniversalProfile, +} from '../../../../types'; import { getNamedAccounts, diff --git a/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts b/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts similarity index 99% rename from tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts rename to packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts index 686f84632..2c56f6243 100644 --- a/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts @@ -5,7 +5,7 @@ import { UniversalProfile, LSP11BasicSocialRecoveryInit__factory, LSP11BasicSocialRecovery, -} from '../../types'; +} from '../../../../types'; import { getNamedAccounts, diff --git a/tests/LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts similarity index 99% rename from tests/LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts index 47c2f3fa4..8684c67e3 100644 --- a/tests/LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts @@ -6,7 +6,7 @@ import { LSP9Vault, UPWithInstantAcceptOwnership__factory, UPWithInstantAcceptOwnership, -} from '../../types'; +} from '../../../../types'; // constants import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; diff --git a/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts similarity index 99% rename from tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts index 7304af609..315295025 100644 --- a/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts @@ -30,7 +30,7 @@ import { NameExtension, NameExtension__factory, AgeExtension__factory, -} from '../../types'; +} from '../../../../types'; // helpers import { abiCoder, provider } from '../utils/helpers'; diff --git a/tests/LSP17ContractExtension/LSP17Extendable.test.ts b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.test.ts similarity index 99% rename from tests/LSP17ContractExtension/LSP17Extendable.test.ts rename to packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.test.ts index d109eeeb6..a2396e952 100644 --- a/tests/LSP17ContractExtension/LSP17Extendable.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.test.ts @@ -8,7 +8,7 @@ import { EmitEventExtension__factory, RevertErrorsTestExtension, RevertErrorsTestExtension__factory, -} from '../../types'; +} from '../../../../types'; describe('LSP17Extendable - Basic Implementation', () => { let accounts; diff --git a/tests/LSP17ContractExtension/LSP17ExtendableTokens.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17ExtendableTokens.behaviour.ts similarity index 99% rename from tests/LSP17ContractExtension/LSP17ExtendableTokens.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17ExtendableTokens.behaviour.ts index d5f2511bc..29f4268d0 100644 --- a/tests/LSP17ContractExtension/LSP17ExtendableTokens.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17ExtendableTokens.behaviour.ts @@ -22,7 +22,7 @@ import { NameExtension, AgeExtension__factory, AgeExtension, -} from '../../types'; +} from '../../../../types'; // helpers import { abiCoder, provider } from '../utils/helpers'; diff --git a/tests/LSP17Extensions/Extension4337/4337.test.ts b/packages/lsp-smart-contracts/tests/LSP17Extensions/Extension4337/4337.test.ts similarity index 99% rename from tests/LSP17Extensions/Extension4337/4337.test.ts rename to packages/lsp-smart-contracts/tests/LSP17Extensions/Extension4337/4337.test.ts index b4b5113e9..fdf4fefd2 100644 --- a/tests/LSP17Extensions/Extension4337/4337.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP17Extensions/Extension4337/4337.test.ts @@ -10,7 +10,7 @@ import { UniversalProfile, UniversalProfile__factory, Extension4337__factory, -} from '../../../types'; +} from '../../../../../types'; import { deployEntryPoint, getBalance, isDeployed } from '../helpers/utils'; import { ERC725YDataKeys } from '../../../constants'; import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; diff --git a/tests/LSP17Extensions/helpers/Create2Factory.ts b/packages/lsp-smart-contracts/tests/LSP17Extensions/helpers/Create2Factory.ts similarity index 100% rename from tests/LSP17Extensions/helpers/Create2Factory.ts rename to packages/lsp-smart-contracts/tests/LSP17Extensions/helpers/Create2Factory.ts diff --git a/tests/LSP17Extensions/helpers/UserOp.ts b/packages/lsp-smart-contracts/tests/LSP17Extensions/helpers/UserOp.ts similarity index 100% rename from tests/LSP17Extensions/helpers/UserOp.ts rename to packages/lsp-smart-contracts/tests/LSP17Extensions/helpers/UserOp.ts diff --git a/tests/LSP17Extensions/helpers/solidityTypes.ts b/packages/lsp-smart-contracts/tests/LSP17Extensions/helpers/solidityTypes.ts similarity index 100% rename from tests/LSP17Extensions/helpers/solidityTypes.ts rename to packages/lsp-smart-contracts/tests/LSP17Extensions/helpers/solidityTypes.ts diff --git a/tests/LSP17Extensions/helpers/utils.ts b/packages/lsp-smart-contracts/tests/LSP17Extensions/helpers/utils.ts similarity index 100% rename from tests/LSP17Extensions/helpers/utils.ts rename to packages/lsp-smart-contracts/tests/LSP17Extensions/helpers/utils.ts diff --git a/tests/LSP1UniversalReceiver/LSP1UniversalReceiver.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiver.behaviour.ts similarity index 99% rename from tests/LSP1UniversalReceiver/LSP1UniversalReceiver.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiver.behaviour.ts index 06a894e93..09e8b3357 100644 --- a/tests/LSP1UniversalReceiver/LSP1UniversalReceiver.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiver.behaviour.ts @@ -8,7 +8,7 @@ import { UniversalReceiverTester, UniversalReceiverDelegateRevert__factory, UniversalReceiverDelegateRevert, -} from '../../types'; +} from '../../../../types'; // helpers import { abiCoder, LSP1_HOOK_PLACEHOLDER } from '../utils/helpers'; diff --git a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts similarity index 99% rename from tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts index 6a643edfc..93cf727de 100644 --- a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts @@ -24,7 +24,7 @@ import { LSP7MintWhenDeployed, GenericExecutorWithBalanceOfFunction, GenericExecutorWithBalanceOfFunction__factory, -} from '../../types'; +} from '../../../../types'; // helpers import { ARRAY_LENGTH, LSP1_HOOK_PLACEHOLDER, abiCoder } from '../utils/helpers'; diff --git a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.test.ts b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.test.ts similarity index 94% rename from tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.test.ts rename to packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.test.ts index 5ae070d8f..f0a51ecb2 100644 --- a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.test.ts @@ -1,5 +1,9 @@ import { ethers } from 'hardhat'; -import { LSP1UniversalReceiverDelegateUP, UniversalProfile, LSP6KeyManager } from '../../types'; +import { + LSP1UniversalReceiverDelegateUP, + UniversalProfile, + LSP6KeyManager, +} from '../../../../types'; import { setupProfileWithKeyManagerWithURD } from '../utils/fixtures'; diff --git a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts similarity index 99% rename from tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts index 63183f41c..1c0c50a19 100644 --- a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts @@ -14,7 +14,7 @@ import { LSP7MintWhenDeployed__factory, LSP7MintWhenDeployed, LSP1UniversalReceiverDelegateVault__factory, -} from '../../types'; +} from '../../../../types'; import { ARRAY_LENGTH, LSP1_HOOK_PLACEHOLDER, abiCoder } from '../utils/helpers'; diff --git a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts similarity index 98% rename from tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts rename to packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts index aae85aa2a..c80860e76 100644 --- a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts @@ -5,7 +5,7 @@ import { LSP1UniversalReceiverDelegateVault__factory, UniversalProfile__factory, LSP9Vault__factory, -} from '../../types'; +} from '../../../../types'; import { LSP1TestContext, diff --git a/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts similarity index 99% rename from tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts index 929627878..260d7062a 100644 --- a/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts @@ -27,12 +27,12 @@ import { BothCallReturnSuccessValue__factory, SecondCallReturnExpandedSuccessValue, SecondCallReturnExpandedSuccessValue__factory, -} from '../../types'; +} from '../../../../types'; // constants import { LSP1_TYPE_IDS } from '../../constants'; import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; -import { abiCoder } from './../utils/helpers'; +import { abiCoder } from '../utils/helpers'; export type LSP20TestContext = { accounts: SignerWithAddress[]; diff --git a/tests/LSP20CallVerification/LSP20WithLSP14.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20WithLSP14.behaviour.ts similarity index 99% rename from tests/LSP20CallVerification/LSP20WithLSP14.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20WithLSP14.behaviour.ts index f628d8e3c..d51e805a8 100644 --- a/tests/LSP20CallVerification/LSP20WithLSP14.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20WithLSP14.behaviour.ts @@ -6,7 +6,7 @@ import { UPWithInstantAcceptOwnership__factory, UPWithInstantAcceptOwnership, LSP0ERC725Account, -} from '../../types'; +} from '../../../../types'; // constants import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; diff --git a/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeAddExtensions.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeAddExtensions.test.ts similarity index 100% rename from tests/LSP20CallVerification/LSP6/Admin/PermissionChangeAddExtensions.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeAddExtensions.test.ts diff --git a/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeAddURD.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeAddURD.test.ts similarity index 100% rename from tests/LSP20CallVerification/LSP6/Admin/PermissionChangeAddURD.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeAddURD.test.ts diff --git a/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeOwner.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeOwner.test.ts similarity index 99% rename from tests/LSP20CallVerification/LSP6/Admin/PermissionChangeOwner.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeOwner.test.ts index b4626a2ab..d6c8a6346 100644 --- a/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeOwner.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeOwner.test.ts @@ -8,7 +8,7 @@ import { ERC725YDataKeys } from '../../../../constants'; import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; import { PERMISSIONS } from '@lukso/lsp6-contracts'; -import { LSP6KeyManager, LSP6KeyManager__factory } from '../../../../types'; +import { LSP6KeyManager, LSP6KeyManager__factory } from '../../../../../../types'; // setup import { LSP6TestContext } from '../../../utils/context'; diff --git a/tests/LSP20CallVerification/LSP6/Interactions/AllowedAddresses.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedAddresses.test.ts similarity index 99% rename from tests/LSP20CallVerification/LSP6/Interactions/AllowedAddresses.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedAddresses.test.ts index acfe2cf14..6a527b7b3 100644 --- a/tests/LSP20CallVerification/LSP6/Interactions/AllowedAddresses.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedAddresses.test.ts @@ -2,7 +2,7 @@ import { expect } from 'chai'; import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { TargetContract, TargetContract__factory } from '../../../../types'; +import { TargetContract, TargetContract__factory } from '../../../../../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/tests/LSP20CallVerification/LSP6/Interactions/AllowedFunctions.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedFunctions.test.ts similarity index 99% rename from tests/LSP20CallVerification/LSP6/Interactions/AllowedFunctions.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedFunctions.test.ts index 634b1c8b3..30a407354 100644 --- a/tests/LSP20CallVerification/LSP6/Interactions/AllowedFunctions.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedFunctions.test.ts @@ -9,7 +9,7 @@ import { LSP7Mintable__factory, LSP8Mintable, LSP8Mintable__factory, -} from '../../../../types'; +} from '../../../../../../types'; // constants import { ERC725YDataKeys, INTERFACE_IDS } from '../../../../constants'; diff --git a/tests/LSP20CallVerification/LSP6/Interactions/AllowedStandards.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedStandards.test.ts similarity index 99% rename from tests/LSP20CallVerification/LSP6/Interactions/AllowedStandards.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedStandards.test.ts index a8b011db3..ed76ce8a6 100644 --- a/tests/LSP20CallVerification/LSP6/Interactions/AllowedStandards.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedStandards.test.ts @@ -11,7 +11,7 @@ import { LSP7Mintable__factory, UniversalProfile, UniversalProfile__factory, -} from '../../../../types'; +} from '../../../../../../types'; // constants import { ERC725YDataKeys, INTERFACE_IDS } from '../../../../constants'; diff --git a/tests/LSP20CallVerification/LSP6/Interactions/ERC725XExecuteBatch.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/ERC725XExecuteBatch.test.ts similarity index 99% rename from tests/LSP20CallVerification/LSP6/Interactions/ERC725XExecuteBatch.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/ERC725XExecuteBatch.test.ts index acbfce4cc..a42bd3630 100644 --- a/tests/LSP20CallVerification/LSP6/Interactions/ERC725XExecuteBatch.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/ERC725XExecuteBatch.test.ts @@ -15,7 +15,7 @@ import { LSP7MintableInit, LSP7MintableInit__factory, LSP7Mintable__factory, -} from '../../../../types'; +} from '../../../../../../types'; export const shouldBehaveLikeBatchExecute = ( buildContext: (initialFunding?: bigint) => Promise, diff --git a/tests/LSP20CallVerification/LSP6/Interactions/OtherScenarios.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/OtherScenarios.test.ts similarity index 99% rename from tests/LSP20CallVerification/LSP6/Interactions/OtherScenarios.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/OtherScenarios.test.ts index b43a78b30..031dbf2b9 100644 --- a/tests/LSP20CallVerification/LSP6/Interactions/OtherScenarios.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/OtherScenarios.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { TargetContract__factory, TargetContract } from '../../../../types'; +import { TargetContract__factory, TargetContract } from '../../../../../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/tests/LSP20CallVerification/LSP6/Interactions/PermissionCall.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionCall.test.ts similarity index 99% rename from tests/LSP20CallVerification/LSP6/Interactions/PermissionCall.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionCall.test.ts index 0250ffa2f..1e11fa55d 100644 --- a/tests/LSP20CallVerification/LSP6/Interactions/PermissionCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionCall.test.ts @@ -9,7 +9,7 @@ import { FallbackRevert__factory, TargetContract, TargetContract__factory, -} from '../../../../types'; +} from '../../../../../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/tests/LSP20CallVerification/LSP6/Interactions/PermissionDelegateCall.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDelegateCall.test.ts similarity index 99% rename from tests/LSP20CallVerification/LSP6/Interactions/PermissionDelegateCall.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDelegateCall.test.ts index 0bd7df864..b0083ad60 100644 --- a/tests/LSP20CallVerification/LSP6/Interactions/PermissionDelegateCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDelegateCall.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { ERC725YDelegateCall, ERC725YDelegateCall__factory } from '../../../../types'; +import { ERC725YDelegateCall, ERC725YDelegateCall__factory } from '../../../../../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/tests/LSP20CallVerification/LSP6/Interactions/PermissionDeploy.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDeploy.test.ts similarity index 98% rename from tests/LSP20CallVerification/LSP6/Interactions/PermissionDeploy.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDeploy.test.ts index 7fd49ca8b..8ffd2d68d 100644 --- a/tests/LSP20CallVerification/LSP6/Interactions/PermissionDeploy.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDeploy.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { calculateCreate2 } from 'eth-create2-calculator'; -import { TargetContract__factory } from '../../../../types'; +import { TargetContract__factory } from '../../../../../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/tests/LSP20CallVerification/LSP6/Interactions/PermissionStaticCall.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionStaticCall.test.ts similarity index 99% rename from tests/LSP20CallVerification/LSP6/Interactions/PermissionStaticCall.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionStaticCall.test.ts index 9171d907d..060e6a1cc 100644 --- a/tests/LSP20CallVerification/LSP6/Interactions/PermissionStaticCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionStaticCall.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { TargetContract, TargetContract__factory } from '../../../../types'; +import { TargetContract, TargetContract__factory } from '../../../../../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts similarity index 99% rename from tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts index 19bfb4079..54f4ca443 100644 --- a/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts @@ -16,7 +16,7 @@ import { UniversalProfile, FallbackContract__factory, FallbackContract, -} from '../../../../types'; +} from '../../../../../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/tests/LSP20CallVerification/LSP6/Interactions/Security.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/Security.test.ts similarity index 99% rename from tests/LSP20CallVerification/LSP6/Interactions/Security.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/Security.test.ts index bc25f95dd..9de0e62be 100644 --- a/tests/LSP20CallVerification/LSP6/Interactions/Security.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/Security.test.ts @@ -12,7 +12,7 @@ import { TargetContract, TargetContract__factory, UniversalReceiverDelegateDataUpdater__factory, -} from '../../../../types'; +} from '../../../../../../types'; // constants import { ERC725YDataKeys, LSP1_TYPE_IDS } from '../../../../constants'; diff --git a/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.behaviour.ts similarity index 100% rename from tests/LSP20CallVerification/LSP6/LSP20WithLSP6.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.behaviour.ts diff --git a/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts similarity index 97% rename from tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts index 96de6a820..fddbe9bfe 100644 --- a/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; -import { UniversalProfile__factory, LSP6KeyManager__factory } from '../../../types'; +import { UniversalProfile__factory, LSP6KeyManager__factory } from '../../../../../types'; import { LSP6TestContext } from '../../utils/context'; diff --git a/tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts similarity index 98% rename from tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts index e91a5aae3..13b81e28d 100644 --- a/tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts @@ -5,7 +5,7 @@ import { UniversalProfileInit__factory, LSP6KeyManagerInit__factory, LSP6KeyManagerInit, -} from '../../../types'; +} from '../../../../../types'; import { LSP6TestContext } from '../../utils/context'; import { deployProxy } from '../../utils/fixtures'; diff --git a/tests/LSP20CallVerification/LSP6/SetData/AllowedERC725YDataKeys.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetData/AllowedERC725YDataKeys.test.ts similarity index 100% rename from tests/LSP20CallVerification/LSP6/SetData/AllowedERC725YDataKeys.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetData/AllowedERC725YDataKeys.test.ts diff --git a/tests/LSP20CallVerification/LSP6/SetData/PermissionSetData.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetData/PermissionSetData.test.ts similarity index 99% rename from tests/LSP20CallVerification/LSP6/SetData/PermissionSetData.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetData/PermissionSetData.test.ts index d512c38ec..836a09dd0 100644 --- a/tests/LSP20CallVerification/LSP6/SetData/PermissionSetData.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetData/PermissionSetData.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { encodeData, ERC725JSONSchema } from '@erc725/erc725.js'; -import { ExecutorLSP20, ExecutorLSP20__factory } from '../../../../types'; +import { ExecutorLSP20, ExecutorLSP20__factory } from '../../../../../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/tests/LSP20CallVerification/LSP6/SetPermissions/PermissionChangeAddController.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetPermissions/PermissionChangeAddController.test.ts similarity index 100% rename from tests/LSP20CallVerification/LSP6/SetPermissions/PermissionChangeAddController.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetPermissions/PermissionChangeAddController.test.ts diff --git a/tests/LSP20CallVerification/LSP6/SetPermissions/SetAllowedCalls.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetPermissions/SetAllowedCalls.test.ts similarity index 100% rename from tests/LSP20CallVerification/LSP6/SetPermissions/SetAllowedCalls.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetPermissions/SetAllowedCalls.test.ts diff --git a/tests/LSP20CallVerification/LSP6/SetPermissions/SetAllowedERC725YDataKeys.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetPermissions/SetAllowedERC725YDataKeys.test.ts similarity index 100% rename from tests/LSP20CallVerification/LSP6/SetPermissions/SetAllowedERC725YDataKeys.test.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetPermissions/SetAllowedERC725YDataKeys.test.ts diff --git a/tests/LSP20CallVerification/LSP6/index.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/index.ts similarity index 100% rename from tests/LSP20CallVerification/LSP6/index.ts rename to packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/index.ts diff --git a/tests/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts b/packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts similarity index 99% rename from tests/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts rename to packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts index 9c2089ce3..5ed288d50 100644 --- a/tests/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts @@ -6,7 +6,7 @@ import { LSP6KeyManager, UniversalProfile, ILSP23LinkedContractsFactory, -} from '../../types'; +} from '../../../../types'; import { ERC725YDataKeys } from '../../constants'; import { diff --git a/tests/LSP23LinkedContractsDeployment/helpers.ts b/packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/helpers.ts similarity index 97% rename from tests/LSP23LinkedContractsDeployment/helpers.ts rename to packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/helpers.ts index 40192d1b3..125129fca 100644 --- a/tests/LSP23LinkedContractsDeployment/helpers.ts +++ b/packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/helpers.ts @@ -1,13 +1,13 @@ import { ethers } from 'hardhat'; import { BytesLike } from 'ethers'; -import { PromiseOrValue } from '../../types/common'; +import { PromiseOrValue } from '../../../../types/common'; import { UniversalProfileInit__factory, LSP6KeyManagerInit__factory, LSP23LinkedContractsFactory__factory, UniversalProfileInitPostDeploymentModule__factory, UniversalProfilePostDeploymentModule__factory, -} from '../../types'; +} from '../../../../types'; export async function calculateProxiesAddresses( salt: PromiseOrValue, diff --git a/tests/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.behaviour.ts similarity index 99% rename from tests/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.behaviour.ts index 91c752f8d..60af4ed9f 100644 --- a/tests/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.behaviour.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; // LSP7 + LSP8 -import { LSP7DigitalAsset, LSP8IdentifiableDigitalAsset, LSP9Vault } from '../../types'; +import { LSP7DigitalAsset, LSP8IdentifiableDigitalAsset, LSP9Vault } from '../../../../types'; // constants import { ERC725YDataKeys } from '../../constants'; diff --git a/tests/LSP6KeyManager/Admin/PermissionChangeAddExtensions.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionChangeAddExtensions.test.ts similarity index 100% rename from tests/LSP6KeyManager/Admin/PermissionChangeAddExtensions.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionChangeAddExtensions.test.ts diff --git a/tests/LSP6KeyManager/Admin/PermissionChangeAddURD.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionChangeAddURD.test.ts similarity index 100% rename from tests/LSP6KeyManager/Admin/PermissionChangeAddURD.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionChangeAddURD.test.ts diff --git a/tests/LSP6KeyManager/Admin/PermissionChangeOwner.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionChangeOwner.test.ts similarity index 99% rename from tests/LSP6KeyManager/Admin/PermissionChangeOwner.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionChangeOwner.test.ts index 55413cb7c..8fc5e5226 100644 --- a/tests/LSP6KeyManager/Admin/PermissionChangeOwner.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionChangeOwner.test.ts @@ -9,7 +9,7 @@ import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; import { PERMISSIONS } from '@lukso/lsp6-contracts'; import { LSP25_VERSION } from '@lukso/lsp25-contracts'; -import { LSP6KeyManager, LSP6KeyManager__factory } from '../../../types'; +import { LSP6KeyManager, LSP6KeyManager__factory } from '../../../../../types'; // setup import { LSP6TestContext } from '../../utils/context'; diff --git a/tests/LSP6KeyManager/Admin/PermissionSign.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionSign.test.ts similarity index 100% rename from tests/LSP6KeyManager/Admin/PermissionSign.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionSign.test.ts diff --git a/tests/LSP6KeyManager/Interactions/AllowedAddresses.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedAddresses.test.ts similarity index 99% rename from tests/LSP6KeyManager/Interactions/AllowedAddresses.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedAddresses.test.ts index 26b608954..394e8bb78 100644 --- a/tests/LSP6KeyManager/Interactions/AllowedAddresses.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedAddresses.test.ts @@ -2,7 +2,7 @@ import { expect } from 'chai'; import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { TargetContract, TargetContract__factory } from '../../../types'; +import { TargetContract, TargetContract__factory } from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts similarity index 99% rename from tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts index ce5343853..127f91543 100644 --- a/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts @@ -10,7 +10,7 @@ import { LSP8Mintable__factory, TargetContract, TargetContract__factory, -} from '../../../types'; +} from '../../../../../types'; // constants import { ERC725YDataKeys, INTERFACE_IDS } from '../../../constants'; diff --git a/tests/LSP6KeyManager/Interactions/AllowedStandards.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedStandards.test.ts similarity index 99% rename from tests/LSP6KeyManager/Interactions/AllowedStandards.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedStandards.test.ts index 46f2db5f6..493f9f45b 100644 --- a/tests/LSP6KeyManager/Interactions/AllowedStandards.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedStandards.test.ts @@ -11,7 +11,7 @@ import { TargetContract__factory, UniversalProfile__factory, UniversalProfile, -} from '../../../types'; +} from '../../../../../types'; // constants import { ERC725YDataKeys, INTERFACE_IDS } from '../../../constants'; diff --git a/tests/LSP6KeyManager/Interactions/BatchExecute.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/BatchExecute.test.ts similarity index 99% rename from tests/LSP6KeyManager/Interactions/BatchExecute.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/BatchExecute.test.ts index 6e693748a..17c2c6a5e 100644 --- a/tests/LSP6KeyManager/Interactions/BatchExecute.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/BatchExecute.test.ts @@ -11,7 +11,11 @@ import { ALL_PERMISSIONS } from '@lukso/lsp6-contracts'; import { LSP6TestContext } from '../../utils/context'; import { setupKeyManager } from '../../utils/fixtures'; import { abiCoder, provider } from '../../utils/helpers'; -import { LSP7Mintable, LSP7MintableInit__factory, LSP7Mintable__factory } from '../../../types'; +import { + LSP7Mintable, + LSP7MintableInit__factory, + LSP7Mintable__factory, +} from '../../../../../types'; export const shouldBehaveLikeBatchExecute = ( buildContext: (initialFunding?: bigint) => Promise, diff --git a/tests/LSP6KeyManager/Interactions/InvalidExecutePayloads.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/InvalidExecutePayloads.test.ts similarity index 99% rename from tests/LSP6KeyManager/Interactions/InvalidExecutePayloads.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/InvalidExecutePayloads.test.ts index 3686e29b0..221532920 100644 --- a/tests/LSP6KeyManager/Interactions/InvalidExecutePayloads.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/InvalidExecutePayloads.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { TargetContract__factory, TargetContract } from '../../../types'; +import { TargetContract__factory, TargetContract } from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/LSP6KeyManager/Interactions/PermissionCall.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionCall.test.ts similarity index 99% rename from tests/LSP6KeyManager/Interactions/PermissionCall.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionCall.test.ts index bd2f0ef6a..0338f78a0 100644 --- a/tests/LSP6KeyManager/Interactions/PermissionCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionCall.test.ts @@ -10,7 +10,7 @@ import { FallbackRevert__factory, TargetContract, TargetContract__factory, -} from '../../../types'; +} from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/LSP6KeyManager/Interactions/PermissionDelegateCall.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDelegateCall.test.ts similarity index 99% rename from tests/LSP6KeyManager/Interactions/PermissionDelegateCall.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDelegateCall.test.ts index 9a57ef4e7..cfbb77f58 100644 --- a/tests/LSP6KeyManager/Interactions/PermissionDelegateCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDelegateCall.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { ERC725YDelegateCall, ERC725YDelegateCall__factory } from '../../../types'; +import { ERC725YDelegateCall, ERC725YDelegateCall__factory } from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/LSP6KeyManager/Interactions/PermissionDeploy.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDeploy.test.ts similarity index 99% rename from tests/LSP6KeyManager/Interactions/PermissionDeploy.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDeploy.test.ts index 7957ee2b5..b6d4d409b 100644 --- a/tests/LSP6KeyManager/Interactions/PermissionDeploy.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDeploy.test.ts @@ -4,7 +4,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { calculateCreate2 } from 'eth-create2-calculator'; import { EIP191Signer } from '@lukso/eip191-signer.js'; -import { TargetContract__factory, UniversalProfile__factory } from '../../../types'; +import { TargetContract__factory, UniversalProfile__factory } from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/LSP6KeyManager/Interactions/PermissionStaticCall.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionStaticCall.test.ts similarity index 99% rename from tests/LSP6KeyManager/Interactions/PermissionStaticCall.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionStaticCall.test.ts index e5bffa74a..43e9cab29 100644 --- a/tests/LSP6KeyManager/Interactions/PermissionStaticCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionStaticCall.test.ts @@ -9,7 +9,7 @@ import { OnERC721ReceivedExtension, SignatureValidator__factory, OnERC721ReceivedExtension__factory, -} from '../../../types'; +} from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts similarity index 99% rename from tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts index 04e4cabad..cc104a628 100644 --- a/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts @@ -17,7 +17,7 @@ import { LSP7Mintable__factory, FallbackContract, FallbackContract__factory, -} from '../../../types'; +} from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/LSP6KeyManager/LSP6ControlledToken.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6ControlledToken.test.ts similarity index 99% rename from tests/LSP6KeyManager/LSP6ControlledToken.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6ControlledToken.test.ts index aa1f1bb5b..a10d59eb8 100644 --- a/tests/LSP6KeyManager/LSP6ControlledToken.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6ControlledToken.test.ts @@ -11,7 +11,7 @@ import { LSP7Mintable, LSP7Mintable__factory, LSP8Mintable, -} from '../../types'; +} from '../../../../types'; import { ERC725YDataKeys } from '../../constants'; import { ERC1271_VALUES } from '@lukso/lsp0-contracts'; diff --git a/tests/LSP6KeyManager/LSP6KeyManager.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManager.behaviour.ts similarity index 100% rename from tests/LSP6KeyManager/LSP6KeyManager.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManager.behaviour.ts diff --git a/tests/LSP6KeyManager/LSP6KeyManager.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManager.test.ts similarity index 98% rename from tests/LSP6KeyManager/LSP6KeyManager.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManager.test.ts index 261fba951..c1355d086 100644 --- a/tests/LSP6KeyManager/LSP6KeyManager.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManager.test.ts @@ -4,7 +4,7 @@ import { KeyManagerInternalTester__factory, UniversalProfile__factory, LSP6KeyManager__factory, -} from '../../types'; +} from '../../../../types'; import { LSP6TestContext } from '../utils/context'; diff --git a/tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts similarity index 99% rename from tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts index 4ff2a9285..2bffdefbf 100644 --- a/tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { ethers } from 'hardhat'; import { LSP6TestContext } from '../utils/context'; -import { LSP6KeyManagerInit__factory, UniversalProfileInit__factory } from '../../types'; +import { LSP6KeyManagerInit__factory, UniversalProfileInit__factory } from '../../../../types'; import { deployProxy } from '../utils/fixtures'; import { shouldBehaveLikeLSP6, shouldInitializeLikeLSP6 } from './LSP6KeyManager.behaviour'; diff --git a/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts similarity index 99% rename from tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts index 357f471a2..b160dfcf4 100644 --- a/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts @@ -9,7 +9,7 @@ import { TargetContract__factory, LSP7Mintable, LSP7Mintable__factory, -} from '../../../types'; +} from '../../../../../types'; // constants import { ERC725YDataKeys, INTERFACE_IDS } from '../../../constants'; diff --git a/tests/LSP6KeyManager/Relay/MultiChannelNonce.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/MultiChannelNonce.test.ts similarity index 99% rename from tests/LSP6KeyManager/Relay/MultiChannelNonce.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/MultiChannelNonce.test.ts index 6513383a7..6715c796b 100644 --- a/tests/LSP6KeyManager/Relay/MultiChannelNonce.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/MultiChannelNonce.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { EIP191Signer } from '@lukso/eip191-signer.js'; -import { TargetContract, TargetContract__factory } from '../../../types'; +import { TargetContract, TargetContract__factory } from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/LSP6KeyManager/SetData/AllowedERC725YDataKeys.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/SetData/AllowedERC725YDataKeys.test.ts similarity index 100% rename from tests/LSP6KeyManager/SetData/AllowedERC725YDataKeys.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/SetData/AllowedERC725YDataKeys.test.ts diff --git a/tests/LSP6KeyManager/SetData/PermissionSetData.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/SetData/PermissionSetData.test.ts similarity index 99% rename from tests/LSP6KeyManager/SetData/PermissionSetData.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/SetData/PermissionSetData.test.ts index 5cf19926e..2ee1f0e52 100644 --- a/tests/LSP6KeyManager/SetData/PermissionSetData.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/SetData/PermissionSetData.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { encodeData, ERC725JSONSchema } from '@erc725/erc725.js'; -import { Executor, Executor__factory } from '../../../types'; +import { Executor, Executor__factory } from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/LSP6KeyManager/SetPermissions/PermissionChangeAddController.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/SetPermissions/PermissionChangeAddController.test.ts similarity index 100% rename from tests/LSP6KeyManager/SetPermissions/PermissionChangeAddController.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/SetPermissions/PermissionChangeAddController.test.ts diff --git a/tests/LSP6KeyManager/SetPermissions/SetAllowedCalls.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/SetPermissions/SetAllowedCalls.test.ts similarity index 100% rename from tests/LSP6KeyManager/SetPermissions/SetAllowedCalls.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/SetPermissions/SetAllowedCalls.test.ts diff --git a/tests/LSP6KeyManager/SetPermissions/SetAllowedERC725YDataKeys.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/SetPermissions/SetAllowedERC725YDataKeys.test.ts similarity index 100% rename from tests/LSP6KeyManager/SetPermissions/SetAllowedERC725YDataKeys.test.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/SetPermissions/SetAllowedERC725YDataKeys.test.ts diff --git a/tests/LSP6KeyManager/index.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/index.ts similarity index 100% rename from tests/LSP6KeyManager/index.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/index.ts diff --git a/tests/LSP6KeyManager/internals/AllowedCalls.internal.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/AllowedCalls.internal.ts similarity index 99% rename from tests/LSP6KeyManager/internals/AllowedCalls.internal.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/AllowedCalls.internal.ts index ba5b10a9c..87a27449d 100644 --- a/tests/LSP6KeyManager/internals/AllowedCalls.internal.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/AllowedCalls.internal.ts @@ -2,7 +2,7 @@ import { expect } from 'chai'; import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { TargetContract, TargetContract__factory } from '../../../types'; +import { TargetContract, TargetContract__factory } from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/LSP6KeyManager/internals/AllowedERC725YDataKeys.internal.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/AllowedERC725YDataKeys.internal.ts similarity index 100% rename from tests/LSP6KeyManager/internals/AllowedERC725YDataKeys.internal.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/AllowedERC725YDataKeys.internal.ts diff --git a/tests/LSP6KeyManager/internals/Execute.internal.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/Execute.internal.ts similarity index 100% rename from tests/LSP6KeyManager/internals/Execute.internal.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/Execute.internal.ts diff --git a/tests/LSP6KeyManager/internals/ReadPermissions.internal.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/ReadPermissions.internal.ts similarity index 100% rename from tests/LSP6KeyManager/internals/ReadPermissions.internal.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/ReadPermissions.internal.ts diff --git a/tests/LSP6KeyManager/internals/SetData.internal.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/SetData.internal.ts similarity index 100% rename from tests/LSP6KeyManager/internals/SetData.internal.ts rename to packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/SetData.internal.ts diff --git a/tests/LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts similarity index 98% rename from tests/LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts index 5a7d88f38..e2891227c 100644 --- a/tests/LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts @@ -1,7 +1,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP7CappedSupplyTester } from '../../types'; +import { LSP7CappedSupplyTester } from '../../../../types'; export type LSP7CappedSupplyTestAccounts = { owner: SignerWithAddress; diff --git a/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts similarity index 99% rename from tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts index 14ec71cbf..c4ec0b89b 100644 --- a/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts @@ -15,7 +15,7 @@ import { TokenReceiverWithLSP1Revert, TokenReceiverWithLSP1Revert__factory, LSP7DigitalAsset, -} from '../../types'; +} from '../../../../types'; // constants import { ERC725YDataKeys, INTERFACE_IDS, LSP1_TYPE_IDS, SupportedStandards } from '../../constants'; diff --git a/tests/LSP7DigitalAsset/LSP7Mintable.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7Mintable.behaviour.ts similarity index 99% rename from tests/LSP7DigitalAsset/LSP7Mintable.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7Mintable.behaviour.ts index e465f422e..29c1505d5 100644 --- a/tests/LSP7DigitalAsset/LSP7Mintable.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7Mintable.behaviour.ts @@ -8,7 +8,7 @@ import { UniversalProfileInit, LSP6KeyManagerInit, UniversalReceiverDelegateTokenReentrant, -} from '../../types'; +} from '../../../../types'; import { setupProfileWithKeyManagerWithURD } from '../utils/fixtures'; diff --git a/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts similarity index 96% rename from tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts rename to packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts index ce125fee2..f0dbe84e2 100644 --- a/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts @@ -1,7 +1,10 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP7CappedSupplyInitTester, LSP7CappedSupplyInitTester__factory } from '../../../types'; +import { + LSP7CappedSupplyInitTester, + LSP7CappedSupplyInitTester__factory, +} from '../../../../../types'; import { shouldInitializeLikeLSP7 } from '../LSP7DigitalAsset.behaviour'; import { diff --git a/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts similarity index 99% rename from tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts rename to packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts index 321a785c9..630c714a7 100644 --- a/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts @@ -1,7 +1,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP7InitTester__factory, LSP7DigitalAsset, LSP7InitTester } from '../../../types'; +import { LSP7InitTester__factory, LSP7DigitalAsset, LSP7InitTester } from '../../../../../types'; import { getNamedAccounts, diff --git a/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts similarity index 99% rename from tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts rename to packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts index 269bd29b5..2af7cffa3 100644 --- a/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP7MintableInit, LSP7MintableInit__factory } from '../../../types'; +import { LSP7MintableInit, LSP7MintableInit__factory } from '../../../../../types'; import { shouldInitializeLikeLSP7 } from '../LSP7DigitalAsset.behaviour'; import { diff --git a/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts similarity index 95% rename from tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts rename to packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts index b0008a6de..ed7cbdf9a 100644 --- a/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; -import { LSP7CappedSupplyTester__factory } from '../../../types'; +import { LSP7CappedSupplyTester__factory } from '../../../../../types'; import { shouldInitializeLikeLSP7 } from '../LSP7DigitalAsset.behaviour'; import { diff --git a/tests/LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts similarity index 99% rename from tests/LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts rename to packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts index efb1658b3..5f28850cc 100644 --- a/tests/LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts @@ -1,7 +1,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP7Tester__factory, LSP7DigitalAsset } from '../../../types'; +import { LSP7Tester__factory, LSP7DigitalAsset } from '../../../../../types'; import { getNamedAccounts, diff --git a/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts similarity index 95% rename from tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts rename to packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts index aef2799e2..8c984f30c 100644 --- a/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts @@ -1,5 +1,5 @@ import { LSP4_TOKEN_TYPES } from '@lukso/lsp4-contracts'; -import { LSP7Mintable, LSP7Mintable__factory } from '../../../types'; +import { LSP7Mintable, LSP7Mintable__factory } from '../../../../../types'; import { shouldInitializeLikeLSP7 } from '../LSP7DigitalAsset.behaviour'; import { diff --git a/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts similarity index 98% rename from tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts index b450968d4..e78a1feed 100644 --- a/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts @@ -1,7 +1,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP8CappedSupplyTester } from '../../types'; +import { LSP8CappedSupplyTester } from '../../../../types'; import type { BytesLike } from 'ethers'; diff --git a/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts similarity index 98% rename from tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts index d4d38fb61..8020e0550 100644 --- a/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts @@ -2,7 +2,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP8EnumerableTester } from '../../types'; +import { LSP8EnumerableTester } from '../../../../types'; export type LSP8EnumerableTestAccounts = { owner: SignerWithAddress; diff --git a/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts similarity index 99% rename from tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts index 413103ba5..c994fb4dd 100644 --- a/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts @@ -15,7 +15,7 @@ import { UniversalReceiverDelegateRevert__factory, TokenReceiverWithLSP1Revert, TokenReceiverWithLSP1Revert__factory, -} from '../../types'; +} from '../../../../types'; // helpers import { tokenIdAsBytes32 } from '../utils/tokens'; diff --git a/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts similarity index 99% rename from tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts index b1477a821..1af3e4ab2 100644 --- a/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts @@ -7,7 +7,7 @@ import { LSP6KeyManager, UniversalReceiverDelegateTokenReentrant__factory, LSP8Mintable, -} from '../../types'; +} from '../../../../types'; import { setupProfileWithKeyManagerWithURD } from '../utils/fixtures'; diff --git a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts similarity index 98% rename from tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts index 334b57121..b994333df 100644 --- a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts @@ -2,7 +2,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { LSP8BurnableInitTester, LSP8BurnableInitTester__factory } from '../../../types'; +import { LSP8BurnableInitTester, LSP8BurnableInitTester__factory } from '../../../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; diff --git a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts similarity index 96% rename from tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts index 0e9a4787b..7c0f6cbde 100644 --- a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts @@ -1,6 +1,9 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP8CappedSupplyInitTester, LSP8CappedSupplyInitTester__factory } from '../../../types'; +import { + LSP8CappedSupplyInitTester, + LSP8CappedSupplyInitTester__factory, +} from '../../../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { diff --git a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts similarity index 98% rename from tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts index 0f17109aa..434eb121c 100644 --- a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { LSP8EnumerableInitTester, LSP8EnumerableInitTester__factory } from '../../../types'; +import { LSP8EnumerableInitTester, LSP8EnumerableInitTester__factory } from '../../../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { diff --git a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts similarity index 97% rename from tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts index a593d8fc3..8df3b62ee 100644 --- a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts @@ -1,7 +1,11 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP8InitTester__factory, LSP8IdentifiableDigitalAsset, LSP8Tester } from '../../../types'; +import { + LSP8InitTester__factory, + LSP8IdentifiableDigitalAsset, + LSP8Tester, +} from '../../../../../types'; import { getNamedAccounts, diff --git a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts similarity index 99% rename from tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts index 101701d7f..9eb3bf32f 100644 --- a/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP8MintableInit, LSP8MintableInit__factory } from '../../../types'; +import { LSP8MintableInit, LSP8MintableInit__factory } from '../../../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { diff --git a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts similarity index 98% rename from tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts index 7e0c8f1b2..7ebdeb6e8 100644 --- a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts @@ -1,7 +1,7 @@ import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { LSP8BurnableTester, LSP8BurnableTester__factory } from '../../../types'; +import { LSP8BurnableTester, LSP8BurnableTester__factory } from '../../../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { LSP4_TOKEN_TYPES } from '@lukso/lsp4-contracts'; diff --git a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts similarity index 96% rename from tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts index 687244673..438ccf9d1 100644 --- a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; -import { LSP8CappedSupplyTester__factory } from '../../../types'; +import { LSP8CappedSupplyTester__factory } from '../../../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { diff --git a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts similarity index 98% rename from tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts index 5147b873a..213d06c97 100644 --- a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts @@ -1,4 +1,4 @@ -import { LSP8EnumerableTester, LSP8EnumerableTester__factory } from '../../../types'; +import { LSP8EnumerableTester, LSP8EnumerableTester__factory } from '../../../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { diff --git a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts similarity index 99% rename from tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts index 7946782ce..261180551 100644 --- a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts @@ -1,7 +1,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP8Tester__factory, LSP8IdentifiableDigitalAsset } from '../../../types'; +import { LSP8Tester__factory, LSP8IdentifiableDigitalAsset } from '../../../../../types'; import { getNamedAccounts, diff --git a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts similarity index 95% rename from tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts rename to packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts index 656a72d24..0b3be89ce 100644 --- a/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts @@ -1,6 +1,6 @@ import { LSP4_TOKEN_TYPES } from '@lukso/lsp4-contracts'; import { LSP8_TOKEN_ID_FORMAT } from '@lukso/lsp8-contracts'; -import { LSP8Mintable, LSP8Mintable__factory } from '../../../types'; +import { LSP8Mintable, LSP8Mintable__factory } from '../../../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { diff --git a/tests/LSP9Vault/LSP9Vault.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.behaviour.ts similarity index 99% rename from tests/LSP9Vault/LSP9Vault.behaviour.ts rename to packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.behaviour.ts index 5959a7f6c..deca783de 100644 --- a/tests/LSP9Vault/LSP9Vault.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.behaviour.ts @@ -11,7 +11,7 @@ import { UniversalReceiverDelegateVaultReentrantB__factory, UniversalReceiverDelegateVaultMalicious__factory, LSP9Vault, -} from '../../types'; +} from '../../../../types'; // helpers import { ARRAY_LENGTH, abiCoder, combineAllowedCalls } from '../utils/helpers'; diff --git a/tests/LSP9Vault/LSP9Vault.test.ts b/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.test.ts similarity index 99% rename from tests/LSP9Vault/LSP9Vault.test.ts rename to packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.test.ts index a6f917e32..0189281bf 100644 --- a/tests/LSP9Vault/LSP9Vault.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.test.ts @@ -6,7 +6,7 @@ import { shouldBehaveLikeLSP14, } from '../LSP14Ownable2Step/LSP14Ownable2Step.behaviour'; -import { UniversalProfile, LSP6KeyManager, LSP9Vault__factory } from '../../types'; +import { UniversalProfile, LSP6KeyManager, LSP9Vault__factory } from '../../../../types'; import { getNamedAccounts, diff --git a/tests/LSP9Vault/LSP9VaultInit.test.ts b/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9VaultInit.test.ts similarity index 99% rename from tests/LSP9Vault/LSP9VaultInit.test.ts rename to packages/lsp-smart-contracts/tests/LSP9Vault/LSP9VaultInit.test.ts index 278ef4091..7e1436a81 100644 --- a/tests/LSP9Vault/LSP9VaultInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9VaultInit.test.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { shouldBehaveLikeLSP14 } from '../LSP14Ownable2Step/LSP14Ownable2Step.behaviour'; -import { UniversalProfile, LSP6KeyManager, LSP9VaultInit__factory } from '../../types'; +import { UniversalProfile, LSP6KeyManager, LSP9VaultInit__factory } from '../../../../types'; import { getNamedAccounts, diff --git a/tests/Mocks/ABIEncoder.test.ts b/packages/lsp-smart-contracts/tests/Mocks/ABIEncoder.test.ts similarity index 98% rename from tests/Mocks/ABIEncoder.test.ts rename to packages/lsp-smart-contracts/tests/Mocks/ABIEncoder.test.ts index d57b1d76a..3880c310b 100644 --- a/tests/Mocks/ABIEncoder.test.ts +++ b/packages/lsp-smart-contracts/tests/Mocks/ABIEncoder.test.ts @@ -1,7 +1,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { ABIEncoder, ABIEncoder__factory } from '../../types'; +import { ABIEncoder, ABIEncoder__factory } from '../../../../types'; describe('ABI Encoder Contract', () => { let accounts: SignerWithAddress[]; diff --git a/tests/Mocks/ERC165Interfaces.test.ts b/packages/lsp-smart-contracts/tests/Mocks/ERC165Interfaces.test.ts similarity index 99% rename from tests/Mocks/ERC165Interfaces.test.ts rename to packages/lsp-smart-contracts/tests/Mocks/ERC165Interfaces.test.ts index 72d10f1d7..7c1a74eeb 100644 --- a/tests/Mocks/ERC165Interfaces.test.ts +++ b/packages/lsp-smart-contracts/tests/Mocks/ERC165Interfaces.test.ts @@ -6,7 +6,7 @@ import { CalculateLSPInterfaces__factory, CalculateERCInterfaces, CalculateERCInterfaces__factory, -} from '../../types'; +} from '../../../../types'; // utils import { INTERFACE_IDS } from '../../constants'; diff --git a/tests/Mocks/KeyManagerExecutionCosts.test.ts b/packages/lsp-smart-contracts/tests/Mocks/KeyManagerExecutionCosts.test.ts similarity index 98% rename from tests/Mocks/KeyManagerExecutionCosts.test.ts rename to packages/lsp-smart-contracts/tests/Mocks/KeyManagerExecutionCosts.test.ts index c97664dd1..6077d66ad 100644 --- a/tests/Mocks/KeyManagerExecutionCosts.test.ts +++ b/packages/lsp-smart-contracts/tests/Mocks/KeyManagerExecutionCosts.test.ts @@ -1,7 +1,11 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { UniversalProfile__factory, LSP6KeyManager__factory, UniversalProfile } from '../../types'; +import { + UniversalProfile__factory, + LSP6KeyManager__factory, + UniversalProfile, +} from '../../../../types'; import { ERC725YDataKeys, INTERFACE_IDS } from '../../constants'; import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; import { ALL_PERMISSIONS, PERMISSIONS, CALLTYPE } from '@lukso/lsp6-contracts'; diff --git a/tests/Mocks/LSP1TypeIDs.test.ts b/packages/lsp-smart-contracts/tests/Mocks/LSP1TypeIDs.test.ts similarity index 98% rename from tests/Mocks/LSP1TypeIDs.test.ts rename to packages/lsp-smart-contracts/tests/Mocks/LSP1TypeIDs.test.ts index db54ed79a..71e9ac75f 100644 --- a/tests/Mocks/LSP1TypeIDs.test.ts +++ b/packages/lsp-smart-contracts/tests/Mocks/LSP1TypeIDs.test.ts @@ -1,7 +1,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; import { hexlify, keccak256, toUtf8Bytes } from 'ethers'; -import { LSP1TypeIDsTester, LSP1TypeIDsTester__factory } from '../../types'; +import { LSP1TypeIDsTester, LSP1TypeIDsTester__factory } from '../../../../types'; import { LSP1_TYPE_IDS } from '../../constants'; describe('calculate LSP1 Type IDs', () => { diff --git a/tests/README.md b/packages/lsp-smart-contracts/tests/README.md similarity index 100% rename from tests/README.md rename to packages/lsp-smart-contracts/tests/README.md diff --git a/tests/Reentrancy/LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts similarity index 99% rename from tests/Reentrancy/LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts index 095fc77a4..856239b10 100644 --- a/tests/Reentrancy/LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts @@ -26,7 +26,7 @@ import { loadTestCase, } from './reentrancyHelpers'; -import { LSP20ReentrantContract__factory } from '../../../types'; +import { LSP20ReentrantContract__factory } from '../../../../../types'; import { Interface } from 'ethers'; import { provider } from '../../utils/helpers'; diff --git a/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts similarity index 99% rename from tests/Reentrancy/LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts index ae749dd20..84ab2c653 100644 --- a/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts @@ -26,7 +26,7 @@ import { loadTestCase, } from './reentrancyHelpers'; -import { LSP20ReentrantContractBatch__factory } from '../../../types'; +import { LSP20ReentrantContractBatch__factory } from '../../../../../types'; import { Interface } from 'ethers'; import { provider } from '../../utils/helpers'; diff --git a/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XExecute.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XExecute.test.ts similarity index 99% rename from tests/Reentrancy/LSP20/ERC725XExecuteToERC725XExecute.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XExecute.test.ts index 1e6f228a2..605599f81 100644 --- a/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XExecute.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XExecute.test.ts @@ -25,7 +25,7 @@ import { // Functions loadTestCase, } from './reentrancyHelpers'; -import { LSP20ReentrantContract__factory } from '../../../types'; +import { LSP20ReentrantContract__factory } from '../../../../../types'; import { provider } from '../../utils/helpers'; export const testERC725XExecuteToERC725XExecute = ( diff --git a/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts similarity index 99% rename from tests/Reentrancy/LSP20/ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts index f2a07018b..9fa0e958b 100644 --- a/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; // types import { BytesLike } from 'ethers'; -import { SingleReentrancyRelayer__factory } from '../../../types'; +import { SingleReentrancyRelayer__factory } from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts similarity index 99% rename from tests/Reentrancy/LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts index 56688f4f6..862b116be 100644 --- a/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; // types import { BytesLike } from 'ethers'; -import { SingleReentrancyRelayer__factory } from '../../../types'; +import { SingleReentrancyRelayer__factory } from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/Reentrancy/LSP20/LSP20WithLSP6Reentrancy.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/LSP20WithLSP6Reentrancy.test.ts similarity index 100% rename from tests/Reentrancy/LSP20/LSP20WithLSP6Reentrancy.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP20/LSP20WithLSP6Reentrancy.test.ts diff --git a/tests/Reentrancy/LSP20/reentrancyHelpers.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/reentrancyHelpers.ts similarity index 99% rename from tests/Reentrancy/LSP20/reentrancyHelpers.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP20/reentrancyHelpers.ts index b09c0ceaf..d91680810 100644 --- a/tests/Reentrancy/LSP20/reentrancyHelpers.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/reentrancyHelpers.ts @@ -13,7 +13,7 @@ import { SingleReentrancyRelayer__factory, BatchReentrancyRelayer__factory, UniversalProfile__factory, -} from '../../../types'; +} from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/Reentrancy/LSP6/LSP6Reentrancy.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/LSP6Reentrancy.test.ts similarity index 99% rename from tests/Reentrancy/LSP6/LSP6Reentrancy.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP6/LSP6Reentrancy.test.ts index 0432f25fc..24004c3d5 100644 --- a/tests/Reentrancy/LSP6/LSP6Reentrancy.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/LSP6Reentrancy.test.ts @@ -45,7 +45,7 @@ import { SecondToCallLSP6, FirstToCallLSP6, UniversalReceiverDelegateDataUpdater__factory, -} from '../../../types'; +} from '../../../../../types'; import { setupKeyManager } from '../../utils/fixtures'; diff --git a/tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecute.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecute.test.ts similarity index 100% rename from tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecute.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecute.test.ts diff --git a/tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecuteRelayCall.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecuteRelayCall.test.ts similarity index 99% rename from tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecuteRelayCall.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecuteRelayCall.test.ts index 73f8a3f64..d82af4321 100644 --- a/tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecuteRelayCall.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecuteRelayCall.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; // types import { BytesLike } from 'ethers'; -import { SingleReentrancyRelayer__factory, UniversalProfile__factory } from '../../../types'; +import { SingleReentrancyRelayer__factory, UniversalProfile__factory } from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/Reentrancy/LSP6/SingleExecuteToBatchExecute.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToBatchExecute.test.ts similarity index 100% rename from tests/Reentrancy/LSP6/SingleExecuteToBatchExecute.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToBatchExecute.test.ts diff --git a/tests/Reentrancy/LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts similarity index 99% rename from tests/Reentrancy/LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts index 993208a1a..0fcc1025b 100644 --- a/tests/Reentrancy/LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; // types import { BytesLike } from 'ethers'; -import { SingleReentrancyRelayer__factory, UniversalProfile__factory } from '../../../types'; +import { SingleReentrancyRelayer__factory, UniversalProfile__factory } from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/Reentrancy/LSP6/SingleExecuteToSingleExecute.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToSingleExecute.test.ts similarity index 100% rename from tests/Reentrancy/LSP6/SingleExecuteToSingleExecute.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToSingleExecute.test.ts diff --git a/tests/Reentrancy/LSP6/SingleExecuteToSingleExecuteRelayCall.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToSingleExecuteRelayCall.test.ts similarity index 100% rename from tests/Reentrancy/LSP6/SingleExecuteToSingleExecuteRelayCall.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToSingleExecuteRelayCall.test.ts diff --git a/tests/Reentrancy/LSP6/reentrancyHelpers.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/reentrancyHelpers.ts similarity index 99% rename from tests/Reentrancy/LSP6/reentrancyHelpers.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/LSP6/reentrancyHelpers.ts index ed2de317e..4bbc74851 100644 --- a/tests/Reentrancy/LSP6/reentrancyHelpers.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/reentrancyHelpers.ts @@ -13,7 +13,7 @@ import { SingleReentrancyRelayer__factory, BatchReentrancyRelayer__factory, UniversalProfile__factory, -} from '../../../types'; +} from '../../../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/tests/Reentrancy/Reentrancy.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/Reentrancy.test.ts similarity index 98% rename from tests/Reentrancy/Reentrancy.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/Reentrancy.test.ts index ad88f6506..d63c99c79 100644 --- a/tests/Reentrancy/Reentrancy.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/Reentrancy.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; -import { UniversalProfile__factory, LSP6KeyManager__factory } from '../../types'; +import { UniversalProfile__factory, LSP6KeyManager__factory } from '../../../../types'; import { LSP6TestContext } from '../utils/context'; diff --git a/tests/Reentrancy/ReentrancyInit.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/ReentrancyInit.test.ts similarity index 98% rename from tests/Reentrancy/ReentrancyInit.test.ts rename to packages/lsp-smart-contracts/tests/Reentrancy/ReentrancyInit.test.ts index 584a043ca..0dbd9d764 100644 --- a/tests/Reentrancy/ReentrancyInit.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/ReentrancyInit.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; -import { UniversalProfileInit__factory, LSP6KeyManagerInit__factory } from '../../types'; +import { UniversalProfileInit__factory, LSP6KeyManagerInit__factory } from '../../../../types'; import { deployProxy } from '../utils/fixtures'; import { LSP6TestContext } from '../utils/context'; diff --git a/tests/UniversalProfile.behaviour.ts b/packages/lsp-smart-contracts/tests/UniversalProfile.behaviour.ts similarity index 99% rename from tests/UniversalProfile.behaviour.ts rename to packages/lsp-smart-contracts/tests/UniversalProfile.behaviour.ts index 68fac6049..6af61f8f8 100644 --- a/tests/UniversalProfile.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/UniversalProfile.behaviour.ts @@ -13,7 +13,7 @@ import { OwnerWithURD__factory, OwnerWithURD, UniversalProfile, -} from '../types'; +} from '../../../types'; // helpers import { LSP1_HOOK_PLACEHOLDER, abiCoder, getRandomAddresses } from './utils/helpers'; diff --git a/tests/UniversalProfile.test.ts b/packages/lsp-smart-contracts/tests/UniversalProfile.test.ts similarity index 99% rename from tests/UniversalProfile.test.ts rename to packages/lsp-smart-contracts/tests/UniversalProfile.test.ts index 29740d457..6c9e3c52d 100644 --- a/tests/UniversalProfile.test.ts +++ b/packages/lsp-smart-contracts/tests/UniversalProfile.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { UniversalReceiverTester__factory, UniversalProfile__factory } from '../types'; +import { UniversalReceiverTester__factory, UniversalProfile__factory } from '../../../types'; import { LSP1TestContext, diff --git a/tests/UniversalProfileInit.test.ts b/packages/lsp-smart-contracts/tests/UniversalProfileInit.test.ts similarity index 99% rename from tests/UniversalProfileInit.test.ts rename to packages/lsp-smart-contracts/tests/UniversalProfileInit.test.ts index 774aa13ae..923054097 100644 --- a/tests/UniversalProfileInit.test.ts +++ b/packages/lsp-smart-contracts/tests/UniversalProfileInit.test.ts @@ -4,7 +4,7 @@ import { UniversalReceiverTester__factory, UniversalProfileInit__factory, LSP0ERC725Account, -} from '../types'; +} from '../../../types'; import { deployProxy } from './utils/fixtures'; import { diff --git a/tests/foundry/GasTests/LSP6s/LSP6ExecuteRC.sol b/packages/lsp-smart-contracts/tests/foundry/GasTests/LSP6s/LSP6ExecuteRC.sol similarity index 100% rename from tests/foundry/GasTests/LSP6s/LSP6ExecuteRC.sol rename to packages/lsp-smart-contracts/tests/foundry/GasTests/LSP6s/LSP6ExecuteRC.sol diff --git a/tests/foundry/GasTests/LSP6s/LSP6ExecuteUC.sol b/packages/lsp-smart-contracts/tests/foundry/GasTests/LSP6s/LSP6ExecuteUC.sol similarity index 100% rename from tests/foundry/GasTests/LSP6s/LSP6ExecuteUC.sol rename to packages/lsp-smart-contracts/tests/foundry/GasTests/LSP6s/LSP6ExecuteUC.sol diff --git a/tests/foundry/GasTests/LSP6s/LSP6SetDataRC.sol b/packages/lsp-smart-contracts/tests/foundry/GasTests/LSP6s/LSP6SetDataRC.sol similarity index 100% rename from tests/foundry/GasTests/LSP6s/LSP6SetDataRC.sol rename to packages/lsp-smart-contracts/tests/foundry/GasTests/LSP6s/LSP6SetDataRC.sol diff --git a/tests/foundry/GasTests/LSP6s/LSP6SetDataUC.sol b/packages/lsp-smart-contracts/tests/foundry/GasTests/LSP6s/LSP6SetDataUC.sol similarity index 100% rename from tests/foundry/GasTests/LSP6s/LSP6SetDataUC.sol rename to packages/lsp-smart-contracts/tests/foundry/GasTests/LSP6s/LSP6SetDataUC.sol diff --git a/tests/foundry/GasTests/UniversalProfileTestsHelper.sol b/packages/lsp-smart-contracts/tests/foundry/GasTests/UniversalProfileTestsHelper.sol similarity index 100% rename from tests/foundry/GasTests/UniversalProfileTestsHelper.sol rename to packages/lsp-smart-contracts/tests/foundry/GasTests/UniversalProfileTestsHelper.sol diff --git a/tests/foundry/GasTests/execute/RestrictedController.sol b/packages/lsp-smart-contracts/tests/foundry/GasTests/execute/RestrictedController.sol similarity index 100% rename from tests/foundry/GasTests/execute/RestrictedController.sol rename to packages/lsp-smart-contracts/tests/foundry/GasTests/execute/RestrictedController.sol diff --git a/tests/foundry/GasTests/execute/UnrestrictedController.sol b/packages/lsp-smart-contracts/tests/foundry/GasTests/execute/UnrestrictedController.sol similarity index 100% rename from tests/foundry/GasTests/execute/UnrestrictedController.sol rename to packages/lsp-smart-contracts/tests/foundry/GasTests/execute/UnrestrictedController.sol diff --git a/tests/foundry/GasTests/setData/RestrictedController.sol b/packages/lsp-smart-contracts/tests/foundry/GasTests/setData/RestrictedController.sol similarity index 100% rename from tests/foundry/GasTests/setData/RestrictedController.sol rename to packages/lsp-smart-contracts/tests/foundry/GasTests/setData/RestrictedController.sol diff --git a/tests/foundry/GasTests/setData/UnrestrictedController.sol b/packages/lsp-smart-contracts/tests/foundry/GasTests/setData/UnrestrictedController.sol similarity index 100% rename from tests/foundry/GasTests/setData/UnrestrictedController.sol rename to packages/lsp-smart-contracts/tests/foundry/GasTests/setData/UnrestrictedController.sol diff --git a/tests/foundry/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.t.sol b/packages/lsp-smart-contracts/tests/foundry/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.t.sol similarity index 100% rename from tests/foundry/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.t.sol rename to packages/lsp-smart-contracts/tests/foundry/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.t.sol diff --git a/tests/foundry/LSP11BasicSocialRecovery/LSP11Mock.sol b/packages/lsp-smart-contracts/tests/foundry/LSP11BasicSocialRecovery/LSP11Mock.sol similarity index 100% rename from tests/foundry/LSP11BasicSocialRecovery/LSP11Mock.sol rename to packages/lsp-smart-contracts/tests/foundry/LSP11BasicSocialRecovery/LSP11Mock.sol diff --git a/tests/foundry/LSP14Ownable2Step/AcceptOwnershipCleanState.sol b/packages/lsp-smart-contracts/tests/foundry/LSP14Ownable2Step/AcceptOwnershipCleanState.sol similarity index 100% rename from tests/foundry/LSP14Ownable2Step/AcceptOwnershipCleanState.sol rename to packages/lsp-smart-contracts/tests/foundry/LSP14Ownable2Step/AcceptOwnershipCleanState.sol diff --git a/tests/foundry/LSP14Ownable2Step/TwoStepOwnership.sol b/packages/lsp-smart-contracts/tests/foundry/LSP14Ownable2Step/TwoStepOwnership.sol similarity index 100% rename from tests/foundry/LSP14Ownable2Step/TwoStepOwnership.sol rename to packages/lsp-smart-contracts/tests/foundry/LSP14Ownable2Step/TwoStepOwnership.sol diff --git a/tests/foundry/LSP14Ownable2Step/TwoStepRenounceOwnership.sol b/packages/lsp-smart-contracts/tests/foundry/LSP14Ownable2Step/TwoStepRenounceOwnership.sol similarity index 100% rename from tests/foundry/LSP14Ownable2Step/TwoStepRenounceOwnership.sol rename to packages/lsp-smart-contracts/tests/foundry/LSP14Ownable2Step/TwoStepRenounceOwnership.sol diff --git a/tests/foundry/LSP6KeyManager/LSP6RestrictedController.t.sol b/packages/lsp-smart-contracts/tests/foundry/LSP6KeyManager/LSP6RestrictedController.t.sol similarity index 100% rename from tests/foundry/LSP6KeyManager/LSP6RestrictedController.t.sol rename to packages/lsp-smart-contracts/tests/foundry/LSP6KeyManager/LSP6RestrictedController.t.sol diff --git a/tests/utils/context.ts b/packages/lsp-smart-contracts/tests/utils/context.ts similarity index 81% rename from tests/utils/context.ts rename to packages/lsp-smart-contracts/tests/utils/context.ts index 0c561184c..cba5b0867 100644 --- a/tests/utils/context.ts +++ b/packages/lsp-smart-contracts/tests/utils/context.ts @@ -1,5 +1,9 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers.js'; -import { KeyManagerInternalTester, LSP6KeyManager, UniversalProfile } from '../../types/index.js'; +import { + KeyManagerInternalTester, + LSP6KeyManager, + UniversalProfile, +} from '../../../../types/index.js'; export type LSP6TestContext = { accounts: SignerWithAddress[]; diff --git a/tests/utils/fixtures.ts b/packages/lsp-smart-contracts/tests/utils/fixtures.ts similarity index 99% rename from tests/utils/fixtures.ts rename to packages/lsp-smart-contracts/tests/utils/fixtures.ts index 165bab036..9943e3e13 100644 --- a/tests/utils/fixtures.ts +++ b/packages/lsp-smart-contracts/tests/utils/fixtures.ts @@ -6,13 +6,13 @@ import { LSP1UniversalReceiverDelegateUP__factory, LSP6KeyManager__factory, UniversalProfile__factory, -} from '../../types'; +} from '../../../../types'; import { ERC725YDataKeys } from '../../constants'; import { PERMISSIONS, ALL_PERMISSIONS } from '@lukso/lsp6-contracts'; // helpers -import { combinePermissions } from '../utils/helpers'; +import { combinePermissions } from './helpers'; import { LSP6TestContext, LSP6InternalsTestContext } from './context'; /** diff --git a/tests/utils/helpers.ts b/packages/lsp-smart-contracts/tests/utils/helpers.ts similarity index 100% rename from tests/utils/helpers.ts rename to packages/lsp-smart-contracts/tests/utils/helpers.ts diff --git a/tests/utils/tokens.ts b/packages/lsp-smart-contracts/tests/utils/tokens.ts similarity index 100% rename from tests/utils/tokens.ts rename to packages/lsp-smart-contracts/tests/utils/tokens.ts diff --git a/template/build.config.ts b/template/build.config.ts new file mode 100644 index 000000000..71798d1ff --- /dev/null +++ b/template/build.config.ts @@ -0,0 +1,9 @@ +import { defineBuildConfig } from 'unbuild'; + +export default defineBuildConfig({ + entries: ['./constants'], + declaration: 'compatible', // generate .d.ts files + rollup: { + emitCJS: true, + }, +}); From ef0f2dc727135f89048d849de852955bb101b3cb Mon Sep 17 00:00:00 2001 From: CJ42 Date: Tue, 27 Feb 2024 21:29:21 -0700 Subject: [PATCH 04/21] build: organise `package.json` for root and `@lukso/lsp-smart-contracts` --- package.json | 69 ++---------------- packages/lsp-smart-contracts/README.md | 3 + packages/lsp-smart-contracts/package.json | 86 +++++++++++++++++++++++ 3 files changed, 93 insertions(+), 65 deletions(-) create mode 100644 packages/lsp-smart-contracts/README.md create mode 100644 packages/lsp-smart-contracts/package.json diff --git a/package.json b/package.json index c100deaf5..83cb34529 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,9 @@ { - "name": "@lukso/lsp-smart-contracts", - "version": "0.12.1", + "name": "@lukso/lsp-smart-contracts-monorepo", "description": "The reference smart contract implementation for the LUKSO LSP standards", + "version": "0.12.1", + "private": true, + "npmClient": "npm", "author": "", "license": "Apache-2.0", "bugs": { @@ -23,41 +25,6 @@ "Solidity", "Universal Profiles" ], - "directories": { - "test": "tests" - }, - "files": [ - "contracts/**/*.sol", - "!contracts/Mocks/**/*.sol", - "artifacts/*.json", - "dist", - "./README.md", - "./CONTRIBUTING.md", - "./LICENSE" - ], - "main": "./dist/constants.cjs", - "module": "./dist/constants.mjs", - "typings": "./dist/constants.d.ts", - "exports": { - ".": { - "require": "./dist/constants.cjs", - "import": "./dist/constants.mjs", - "types": "./dist/constants.d.ts" - }, - "./constants.js": { - "require": "./dist/constants.cjs", - "import": "./dist/constants.mjs", - "types": "./dist/constants.d.ts" - }, - "./constants": { - "require": "./dist/constants.cjs", - "import": "./dist/constants.mjs", - "types": "./dist/constants.d.ts" - }, - "./artifacts/*": "./artifacts/*", - "./dist/*": "./dist/*", - "./package.json": "./package.json" - }, "scripts": { "preinstall": "npx --yes force-resolutions", "build": "hardhat compile", @@ -101,34 +68,6 @@ "test:foundry": "forge test --no-match-test Skip -vvv --gas-report > gasreport.ansi", "test:turbo": "turbo test" }, - "dependencies": { - "@account-abstraction/contracts": "^0.6.0", - "@erc725/smart-contracts": "^7.0.0", - "@lukso/lsp0-contracts": "*", - "@lukso/lsp1-contracts": "*", - "@lukso/lsp10-contracts": "*", - "@lukso/lsp12-contracts": "*", - "@lukso/lsp14-contracts": "*", - "@lukso/lsp16-contracts": "*", - "@lukso/lsp17-contracts": "*", - "@lukso/lsp17contractextension-contracts": "*", - "@lukso/lsp1delegate-contracts": "*", - "@lukso/lsp2-contracts": "*", - "@lukso/lsp20-contracts": "*", - "@lukso/lsp23-contracts": "*", - "@lukso/lsp25-contracts": "*", - "@lukso/lsp3-contracts": "*", - "@lukso/lsp4-contracts": "*", - "@lukso/lsp5-contracts": "*", - "@lukso/lsp6-contracts": "*", - "@lukso/lsp7-contracts": "*", - "@lukso/lsp8-contracts": "*", - "@lukso/lsp9-contracts": "*", - "@lukso/universalprofile-contracts": "*", - "@openzeppelin/contracts": "^4.9.2", - "@openzeppelin/contracts-upgradeable": "^4.9.2", - "solidity-bytes-utils": "0.8.0" - }, "devDependencies": { "@b00ste/hardhat-dodoc": "^0.3.16", "@erc725/erc725.js": "0.23.0", diff --git a/packages/lsp-smart-contracts/README.md b/packages/lsp-smart-contracts/README.md new file mode 100644 index 000000000..644976a06 --- /dev/null +++ b/packages/lsp-smart-contracts/README.md @@ -0,0 +1,3 @@ +# `@lukso/lsp-smart-contracts` + +Package for the LSP Smart Contracts. diff --git a/packages/lsp-smart-contracts/package.json b/packages/lsp-smart-contracts/package.json new file mode 100644 index 000000000..492e82a41 --- /dev/null +++ b/packages/lsp-smart-contracts/package.json @@ -0,0 +1,86 @@ +{ + "name": "@lukso/lsp-smart-contracts", + "version": "0.12.1", + "description": "The reference smart contract implementation for the LUKSO LSP standards", + "license": "Apache-2.0", + "author": "", + "keywords": [ + "LUKSO", + "LSP", + "Blockchain", + "Standards", + "Smart Contracts", + "Ethereum", + "EVM", + "Solidity" + ], + "directories": { + "test": "tests" + }, + "files": [ + "contracts/**/*.sol", + "!contracts/Mocks/**/*.sol", + "artifacts/*.json", + "dist", + "./README.md", + "./CONTRIBUTING.md", + "./LICENSE" + ], + "main": "./dist/constants.cjs", + "module": "./dist/constants.mjs", + "typings": "./dist/constants.d.ts", + "exports": { + ".": { + "require": "./dist/constants.cjs", + "import": "./dist/constants.mjs", + "types": "./dist/constants.d.ts" + }, + "./constants.js": { + "require": "./dist/constants.cjs", + "import": "./dist/constants.mjs", + "types": "./dist/constants.d.ts" + }, + "./constants": { + "require": "./dist/constants.cjs", + "import": "./dist/constants.mjs", + "types": "./dist/constants.d.ts" + }, + "./artifacts/*": "./artifacts/*", + "./dist/*": "./dist/*", + "./package.json": "./package.json" + }, + "scripts": { + "build": "hardhat compile --show-stack-traces", + "build:js": "unbuild", + "clean": "hardhat clean", + "format": "prettier --write .", + "lint": "eslint . --ext .ts,.js", + "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'", + "test": "hardhat test --no-compile tests/*.test.ts", + "test:foundry": "forge test --no-match-test Skip -vvv", + "test:coverage": "hardhat coverage" + }, + "dependencies": { + "@lukso/lsp0-contracts": "*", + "@lukso/lsp1-contracts": "*", + "@lukso/lsp10-contracts": "*", + "@lukso/lsp12-contracts": "*", + "@lukso/lsp14-contracts": "*", + "@lukso/lsp16-contracts": "*", + "@lukso/lsp17-contracts": "*", + "@lukso/lsp17contractextension-contracts": "*", + "@lukso/lsp1delegate-contracts": "*", + "@lukso/lsp2-contracts": "*", + "@lukso/lsp20-contracts": "*", + "@lukso/lsp23-contracts": "*", + "@lukso/lsp25-contracts": "*", + "@lukso/lsp3-contracts": "*", + "@lukso/lsp4-contracts": "*", + "@lukso/lsp5-contracts": "*", + "@lukso/lsp6-contracts": "*", + "@lukso/lsp7-contracts": "*", + "@lukso/lsp8-contracts": "*", + "@lukso/lsp9-contracts": "*", + "@lukso/universalprofile-contracts": "*" + } +} From b2aa93467aa9039aa5d45e9d2e83be2599d2fad3 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 04:14:58 -0700 Subject: [PATCH 05/21] build: cleanup test and scripts commands from root to package --- .gitignore | 5 +- package-lock.json | 85 ++++---- package.json | 68 +++--- .../gas_benchmark_result.json | 204 ++++++++++++++++++ packages/lsp-smart-contracts/package.json | 8 +- packages/lsp0-contracts/package.json | 2 +- packages/lsp1-contracts/package.json | 2 +- packages/lsp10-contracts/package.json | 2 +- packages/lsp12-contracts/package.json | 2 +- packages/lsp14-contracts/package.json | 2 +- packages/lsp16-contracts/package.json | 2 +- packages/lsp17-contracts/package.json | 2 +- .../package.json | 2 +- packages/lsp1delegate-contracts/package.json | 2 +- packages/lsp2-contracts/package.json | 2 +- packages/lsp20-contracts/package.json | 2 +- packages/lsp23-contracts/package.json | 2 +- packages/lsp25-contracts/package.json | 2 +- packages/lsp3-contracts/package.json | 2 +- packages/lsp4-contracts/package.json | 2 +- packages/lsp5-contracts/package.json | 2 +- packages/lsp6-contracts/package.json | 2 +- packages/lsp7-contracts/package.json | 2 +- packages/lsp8-contracts/package.json | 2 +- packages/lsp9-contracts/package.json | 2 +- .../universalprofile-contracts/package.json | 2 +- template/package.json | 2 +- turbo.json | 9 +- 28 files changed, 313 insertions(+), 110 deletions(-) create mode 100644 packages/lsp-smart-contracts/gas_benchmark_result.json diff --git a/.gitignore b/.gitignore index 9f29c4817..085bc659e 100644 --- a/.gitignore +++ b/.gitignore @@ -135,9 +135,10 @@ forge-cache/ gas_benchmark.md # Exclude build output folders +/**/dist /**/contracts.ts -/devdocs -/userdocs +/**/devdocs +/**/userdocs # test temporary folder /.test diff --git a/package-lock.json b/package-lock.json index 3067c0d31..46f35f9ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@lukso/lsp-smart-contracts", + "name": "@lukso/lsp-smart-contracts-monorepo", "version": "0.12.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@lukso/lsp-smart-contracts", + "name": "@lukso/lsp-smart-contracts-monorepo", "version": "0.12.1", "hasInstallScript": true, "license": "Apache-2.0", @@ -13,34 +13,6 @@ "config/*", "packages/*" ], - "dependencies": { - "@account-abstraction/contracts": "^0.6.0", - "@erc725/smart-contracts": "^7.0.0", - "@lukso/lsp0-contracts": "*", - "@lukso/lsp1-contracts": "*", - "@lukso/lsp10-contracts": "*", - "@lukso/lsp12-contracts": "*", - "@lukso/lsp14-contracts": "*", - "@lukso/lsp16-contracts": "*", - "@lukso/lsp17-contracts": "*", - "@lukso/lsp17contractextension-contracts": "*", - "@lukso/lsp1delegate-contracts": "*", - "@lukso/lsp2-contracts": "*", - "@lukso/lsp20-contracts": "*", - "@lukso/lsp23-contracts": "*", - "@lukso/lsp25-contracts": "*", - "@lukso/lsp3-contracts": "*", - "@lukso/lsp4-contracts": "*", - "@lukso/lsp5-contracts": "*", - "@lukso/lsp6-contracts": "*", - "@lukso/lsp7-contracts": "*", - "@lukso/lsp8-contracts": "*", - "@lukso/lsp9-contracts": "*", - "@lukso/universalprofile-contracts": "*", - "@openzeppelin/contracts": "^4.9.2", - "@openzeppelin/contracts-upgradeable": "^4.9.2", - "solidity-bytes-utils": "0.8.0" - }, "devDependencies": { "@b00ste/hardhat-dodoc": "^0.3.16", "@erc725/erc725.js": "0.23.0", @@ -139,6 +111,19 @@ "squirrelly": "^8.0.8" } }, + "node_modules/@b00ste/hardhat-dodoc/node_modules/@lukso/lsp-smart-contracts": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@lukso/lsp-smart-contracts/-/lsp-smart-contracts-0.14.0.tgz", + "integrity": "sha512-HjMpO/DfcAnL2YAoGSq4TazwsKof3CClyi33cwkOIdH7b81DMP5Z4LLjOjAGURrJlMj8wH4cLp5+4nvZ4NVSIA==", + "dev": true, + "dependencies": { + "@account-abstraction/contracts": "^0.6.0", + "@erc725/smart-contracts": "^7.0.0", + "@openzeppelin/contracts": "^4.9.2", + "@openzeppelin/contracts-upgradeable": "^4.9.2", + "solidity-bytes-utils": "0.8.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", @@ -1941,17 +1926,8 @@ } }, "node_modules/@lukso/lsp-smart-contracts": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@lukso/lsp-smart-contracts/-/lsp-smart-contracts-0.14.0.tgz", - "integrity": "sha512-HjMpO/DfcAnL2YAoGSq4TazwsKof3CClyi33cwkOIdH7b81DMP5Z4LLjOjAGURrJlMj8wH4cLp5+4nvZ4NVSIA==", - "dev": true, - "dependencies": { - "@account-abstraction/contracts": "^0.6.0", - "@erc725/smart-contracts": "^7.0.0", - "@openzeppelin/contracts": "^4.9.2", - "@openzeppelin/contracts-upgradeable": "^4.9.2", - "solidity-bytes-utils": "0.8.0" - } + "resolved": "packages/lsp-smart-contracts", + "link": true }, "node_modules/@lukso/lsp0-contracts": { "resolved": "packages/lsp0-contracts", @@ -20940,6 +20916,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "packages/lsp-smart-contracts": { + "version": "0.12.1", + "license": "Apache-2.0", + "dependencies": { + "@lukso/lsp0-contracts": "*", + "@lukso/lsp1-contracts": "*", + "@lukso/lsp10-contracts": "*", + "@lukso/lsp12-contracts": "*", + "@lukso/lsp14-contracts": "*", + "@lukso/lsp16-contracts": "*", + "@lukso/lsp17-contracts": "*", + "@lukso/lsp17contractextension-contracts": "*", + "@lukso/lsp1delegate-contracts": "*", + "@lukso/lsp2-contracts": "*", + "@lukso/lsp20-contracts": "*", + "@lukso/lsp23-contracts": "*", + "@lukso/lsp25-contracts": "*", + "@lukso/lsp3-contracts": "*", + "@lukso/lsp4-contracts": "*", + "@lukso/lsp5-contracts": "*", + "@lukso/lsp6-contracts": "*", + "@lukso/lsp7-contracts": "*", + "@lukso/lsp8-contracts": "*", + "@lukso/lsp9-contracts": "*", + "@lukso/universalprofile-contracts": "*" + } + }, "packages/lsp0-contracts": { "name": "@lukso/lsp0-contracts", "version": "0.12.1", diff --git a/package.json b/package.json index 83cb34529..62c785643 100644 --- a/package.json +++ b/package.json @@ -27,46 +27,38 @@ ], "scripts": { "preinstall": "npx --yes force-resolutions", - "build": "hardhat compile", - "build:turbo": "turbo build", - "build:docs": "hardhat dodoc && prettier -w ./docs", - "build:js": "unbuild", - "build:js:turbo": "turbo build:js", - "clean": "hardhat clean && rm -rf module common", + "build": "turbo build", + "build:js": "turbo build:js", + "clean": "turbo clean", "format": "prettier --write .", - "lint": "eslint . --ext .ts,.js", - "lint:turbo": "turbo lint", - "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'", - "lint:turbo:solidity": "turbo lint:solidity", - "package": "hardhat prepare-package", - "remixd": "remixd -s . --remix-ide", - "test": "hardhat test", + "lint": "turbo lint", + "lint:solidity": "turbo lint:solidity", + "package": "turbo package", + "test": "turbo test", + "test:foundry": "turbo test:foundry", "test:benchmark": "hardhat test --no-compile tests/Benchmark.test.ts", - "test:coverage": "hardhat coverage", - "test:parallel": "run-p test:mocks test:up test:lsp1 test:lsp2 test:lsp4 test:lsp6 test:lsp7 test:lsp8 test:lsp9 test:lsp11 test:universalfactory", - "test:mocks": "hardhat test --no-compile tests/Mocks/*.test.ts ", - "test:up": "hardhat test --no-compile tests/UniversalProfile.test.ts", - "test:upinit": "hardhat test --no-compile tests/UniversalProfileInit.test.ts", - "test:lsp1": "hardhat test --no-compile tests/LSP1UniversalReceiver/*.test.ts", - "test:lsp6": "hardhat test --no-compile tests/LSP6KeyManager/LSP6KeyManager.test.ts", - "test:lsp6init": "hardhat test --no-compile tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts", - "test:lsp7": "hardhat test --no-compile tests/LSP7DigitalAsset/standard/*.test.ts", - "test:lsp7init": "hardhat test --no-compile tests/LSP7DigitalAsset/proxy/*.test.ts", - "test:lsp8": "hardhat test --no-compile tests/LSP8IdentifiableDigitalAsset/standard/*.test.ts", - "test:lsp8init": "hardhat test --no-compile tests/LSP8IdentifiableDigitalAsset/proxy/*.test.ts", - "test:lsp9": "hardhat test --no-compile tests/LSP9Vault/LSP9Vault.test.ts", - "test:lsp9init": "hardhat test --no-compile tests/LSP9Vault/LSP9VaultInit.test.ts", - "test:lsp11": "hardhat test --no-compile tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts", - "test:lsp11init": "hardhat test --no-compile tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts", - "test:lsp17": "hardhat test --no-compile tests/LSP17ContractExtension/LSP17Extendable.test.ts", - "test:lsp17extensions": "hardhat test --no-compile tests/LSP17Extensions/**/*.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/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts", - "test:reentrancy": "hardhat test --no-compile tests/Reentrancy/Reentrancy.test.ts", - "test:reentrancyinit": "hardhat test --no-compile tests/Reentrancy/ReentrancyInit.test.ts", - "test:foundry": "forge test --no-match-test Skip -vvv --gas-report > gasreport.ansi", - "test:turbo": "turbo test" + "test:coverage": "turbo test:coverage", + "test:mocks": "hardhat test --no-compile packages/lsp-smart-contracts/tests/Mocks/*.test.ts", + "test:up": "hardhat test --no-compile packages/lsp-smart-contracts/tests/UniversalProfile.test.ts", + "test:upinit": "hardhat test --no-compile packages/lsp-smart-contracts/tests/UniversalProfileInit.test.ts", + "test:lsp1": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/*.test.ts", + "test:lsp6": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManager.test.ts", + "test:lsp6init": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts", + "test:lsp7": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/*.test.ts", + "test:lsp7init": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/*.test.ts", + "test:lsp8": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/*.test.ts", + "test:lsp8init": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/*.test.ts", + "test:lsp9": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.test.ts", + "test:lsp9init": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP9Vault/LSP9VaultInit.test.ts", + "test:lsp11": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts", + "test:lsp11init": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts", + "test:lsp17": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.test.ts", + "test:lsp17extensions": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP17Extensions/**/*.test.ts", + "test:lsp20": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts", + "test:lsp20init": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts", + "test:lsp23": "hardhat test --no-compile packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts", + "test:reentrancy": "hardhat test --no-compile packages/lsp-smart-contracts/tests/Reentrancy/Reentrancy.test.ts", + "test:reentrancyinit": "hardhat test --no-compile packages/lsp-smart-contracts/tests/Reentrancy/ReentrancyInit.test.ts" }, "devDependencies": { "@b00ste/hardhat-dodoc": "^0.3.16", diff --git a/packages/lsp-smart-contracts/gas_benchmark_result.json b/packages/lsp-smart-contracts/gas_benchmark_result.json new file mode 100644 index 000000000..e21f05d3e --- /dev/null +++ b/packages/lsp-smart-contracts/gas_benchmark_result.json @@ -0,0 +1,204 @@ +{ + "deployment_costs": { + "UniversalProfile": "", + "KeyManager": "", + "LSP1DelegateUP": "", + "LSP7Mintable": "", + "LSP8Mintable": "" + }, + "runtime_costs": { + "EOA_owner": { + "execute": { + "case_1": { + "description": "Transfer 1 LYX to an EOA without data", + "gas_cost": "" + }, + "case_2": { + "description": "Transfer 1 LYX to a UP without data", + "gas_cost": "" + }, + "case_3": { + "description": "Transfer 1 LYX to an EOA with 256 bytes of data", + "gas_cost": "" + }, + "case_4": { + "description": "Transfer 1 LYX to a UP with 256 bytes of data", + "gas_cost": "" + }, + "case_5": { + "description": "Transfer 0.1 LYX to 3x EOA without data", + "gas_cost": "" + }, + "case_6": { + "description": "Transfer 0.1 LYX to 3x UP without data", + "gas_cost": "" + }, + "case_7": { + "description": "Transfer 0.1 LYX to 3x EOA with 256 bytes of data", + "gas_cost": "" + }, + "case_8": { + "description": "Transfer 0.1 LYX to 3x UPs with 256 bytes of data", + "gas_cost": "" + } + }, + "setData": { + "case_1": { + "description": "Set a 20 bytes long value", + "gas_cost": "" + }, + "case_2": { + "description": "Set a 60 bytes long value", + "gas_cost": "" + }, + "case_3": { + "description": "Set a 160 bytes long value", + "gas_cost": "" + }, + "case_4": { + "description": "Set a 300 bytes long value", + "gas_cost": "" + }, + "case_5": { + "description": "Set a 600 bytes long value", + "gas_cost": "" + }, + "case_6": { + "description": "Change the value of a data key already set", + "gas_cost": "" + }, + "case_7": { + "description": "Remove the value of a data key already set", + "gas_cost": "" + }, + "case_8": { + "description": "Set 2 data keys of 20 bytes long value", + "gas_cost": "" + }, + "case_9": { + "description": "Set 2 data keys of 100 bytes long value", + "gas_cost": "" + }, + "case_10": { + "description": "Set 3 data keys of 20 bytes long value", + "gas_cost": "" + }, + "case_11": { + "description": "Change the value of three data keys already set of 20 bytes long value", + "gas_cost": "" + }, + "case_12": { + "description": "Remove the value of three data keys already set", + "gas_cost": "" + } + }, + "tokens": { + "case_1": { + "description": "Minting a LSP7Token to a UP (No Delegate) from an EOA", + "gas_cost": "" + }, + "case_2": { + "description": "Minting a LSP7Token to an EOA from an EOA", + "gas_cost": "" + }, + "case_3": { + "description": "Transferring an LSP7Token from a UP to another UP (No Delegate)", + "gas_cost": "" + }, + "case_4": { + "description": "Minting a LSP8Token to a UP (No Delegate) from an EOA ", + "gas_cost": "" + }, + "case_5": { + "description": "Minting a LSP8Token to an EOA from an EOA ", + "gas_cost": "" + }, + "case_6": { + "description": "Transferring an LSP8Token from a UP to another UP (No Delegate)", + "gas_cost": "" + } + } + }, + "KeyManager_owner": { + "execute": { + "case_1": { + "description": "LYX transfer --> to an EOA", + "main_controller": "", + "restricted_controller": "" + }, + "case_2": { + "description": "LYX transfer --> to a UP", + "main_controller": "", + "restricted_controller": "" + }, + "case_3": { + "description": "LSP7 token transfer --> to an EOA", + "main_controller": "", + "restricted_controller": "" + }, + "case_4": { + "description": "LSP7 token transfer --> to a UP", + "main_controller": "", + "restricted_controller": "" + }, + "case_5": { + "description": "LSP8 NFT transfer --> to an EOA", + "main_controller": "", + "restricted_controller": "" + }, + "case_6": { + "description": "LSP8 NFT transfer --> to a UP", + "main_controller": "", + "restricted_controller": "" + } + }, + "setData": { + "case_1": { + "description": "Update Profile details (LSP3Profile Metadata)", + "main_controller": "", + "restricted_controller": "" + }, + "case_2": { + "description": "Add a new controller with permission to `SET_DATA` + 3x allowed data keys:
`AddressPermissions[]`
+ `AddressPermissions[index]`
+ `AddressPermissions:Permissions:`
+ `AddressPermissions:AllowedERC725YDataKeys: 1. decrease `AddressPermissions[]` Array length
2. remove the controller address at `AddressPermissions[index]`
3. set \"0x\" for the controller permissions under AddressPermissions:Permissions:", + "main_controller": "", + "restricted_controller": "" + }, + "case_5": { + "description": "Write 5x new LSP12 Issued Assets", + "main_controller": "", + "restricted_controller": "" + }, + "case_6": { + "description": "Update 3x data keys (first 3)", + "main_controller": "", + "restricted_controller": "" + }, + "case_7": { + "description": "Update 3x data keys (middle 3)", + "main_controller": "", + "restricted_controller": "" + }, + "case_8": { + "description": "Update 3x data keys (last 3)", + "main_controller": "", + "restricted_controller": "" + }, + "case_9": { + "description": "Set 2 x new data keys + add 3x new controllers", + "main_controller": "", + "restricted_controller": "" + } + } + } + } +} \ No newline at end of file diff --git a/packages/lsp-smart-contracts/package.json b/packages/lsp-smart-contracts/package.json index 492e82a41..c75f65ff0 100644 --- a/packages/lsp-smart-contracts/package.json +++ b/packages/lsp-smart-contracts/package.json @@ -52,12 +52,14 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "build:docs": "hardhat dodoc && prettier -w ./docs", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'", - "test": "hardhat test --no-compile tests/*.test.ts", - "test:foundry": "forge test --no-match-test Skip -vvv", + "package": "hardhat prepare-package", + "test": "hardhat test --no-compile tests/**/*.test.ts", + "test:foundry": "forge test --no-match-test Skip -vvv --gas-report > gasreport.ansi", "test:coverage": "hardhat coverage" }, "dependencies": { diff --git a/packages/lsp0-contracts/package.json b/packages/lsp0-contracts/package.json index caca29e11..869cc3215 100644 --- a/packages/lsp0-contracts/package.json +++ b/packages/lsp0-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp1-contracts/package.json b/packages/lsp1-contracts/package.json index 18c720197..0ca6fb3c7 100644 --- a/packages/lsp1-contracts/package.json +++ b/packages/lsp1-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp10-contracts/package.json b/packages/lsp10-contracts/package.json index 2b356faf0..cc8814eae 100644 --- a/packages/lsp10-contracts/package.json +++ b/packages/lsp10-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp12-contracts/package.json b/packages/lsp12-contracts/package.json index af9225f51..c5789dce9 100644 --- a/packages/lsp12-contracts/package.json +++ b/packages/lsp12-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp14-contracts/package.json b/packages/lsp14-contracts/package.json index 1ec3ba564..8f0e27a44 100644 --- a/packages/lsp14-contracts/package.json +++ b/packages/lsp14-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp16-contracts/package.json b/packages/lsp16-contracts/package.json index c5bedc821..a3fc95337 100644 --- a/packages/lsp16-contracts/package.json +++ b/packages/lsp16-contracts/package.json @@ -34,7 +34,7 @@ ], "scripts": { "build": "hardhat compile --show-stack-traces", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'", diff --git a/packages/lsp17-contracts/package.json b/packages/lsp17-contracts/package.json index 56fdb2c9c..3a0f12707 100644 --- a/packages/lsp17-contracts/package.json +++ b/packages/lsp17-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp17contractextension-contracts/package.json b/packages/lsp17contractextension-contracts/package.json index 7f4960912..f3f3d2881 100644 --- a/packages/lsp17contractextension-contracts/package.json +++ b/packages/lsp17contractextension-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp1delegate-contracts/package.json b/packages/lsp1delegate-contracts/package.json index 99191dee9..4564089f3 100644 --- a/packages/lsp1delegate-contracts/package.json +++ b/packages/lsp1delegate-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp2-contracts/package.json b/packages/lsp2-contracts/package.json index 2b878115b..ee15a14a2 100644 --- a/packages/lsp2-contracts/package.json +++ b/packages/lsp2-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'", diff --git a/packages/lsp20-contracts/package.json b/packages/lsp20-contracts/package.json index 1173a1add..142c4e133 100644 --- a/packages/lsp20-contracts/package.json +++ b/packages/lsp20-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp23-contracts/package.json b/packages/lsp23-contracts/package.json index 13f0970cb..2d3fd283a 100644 --- a/packages/lsp23-contracts/package.json +++ b/packages/lsp23-contracts/package.json @@ -35,7 +35,7 @@ ], "scripts": { "build": "hardhat compile --show-stack-traces", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp25-contracts/package.json b/packages/lsp25-contracts/package.json index db329c0f1..bb4e3be3f 100644 --- a/packages/lsp25-contracts/package.json +++ b/packages/lsp25-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'", diff --git a/packages/lsp3-contracts/package.json b/packages/lsp3-contracts/package.json index 8fc02ea96..b27167061 100644 --- a/packages/lsp3-contracts/package.json +++ b/packages/lsp3-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" }, diff --git a/packages/lsp4-contracts/package.json b/packages/lsp4-contracts/package.json index b15277820..03204e730 100644 --- a/packages/lsp4-contracts/package.json +++ b/packages/lsp4-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp5-contracts/package.json b/packages/lsp5-contracts/package.json index b446f2546..0be4de2b0 100644 --- a/packages/lsp5-contracts/package.json +++ b/packages/lsp5-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp6-contracts/package.json b/packages/lsp6-contracts/package.json index 12ea99a47..3da3a906d 100644 --- a/packages/lsp6-contracts/package.json +++ b/packages/lsp6-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'", diff --git a/packages/lsp7-contracts/package.json b/packages/lsp7-contracts/package.json index a1a1a1351..05490fb95 100644 --- a/packages/lsp7-contracts/package.json +++ b/packages/lsp7-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp8-contracts/package.json b/packages/lsp8-contracts/package.json index 2efe3d8c3..b403a1c8d 100644 --- a/packages/lsp8-contracts/package.json +++ b/packages/lsp8-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/lsp9-contracts/package.json b/packages/lsp9-contracts/package.json index 021e351c6..0fb7a2ec3 100644 --- a/packages/lsp9-contracts/package.json +++ b/packages/lsp9-contracts/package.json @@ -36,7 +36,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/packages/universalprofile-contracts/package.json b/packages/universalprofile-contracts/package.json index 4524f97f1..e46a0ed58 100644 --- a/packages/universalprofile-contracts/package.json +++ b/packages/universalprofile-contracts/package.json @@ -35,7 +35,7 @@ ], "scripts": { "build": "hardhat compile --show-stack-traces", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" diff --git a/template/package.json b/template/package.json index 6fde925c6..032bd2e76 100644 --- a/template/package.json +++ b/template/package.json @@ -29,7 +29,7 @@ "scripts": { "build": "hardhat compile --show-stack-traces", "build:js": "unbuild", - "clean": "hardhat clean", + "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'", diff --git a/turbo.json b/turbo.json index 2e3c43347..db4d836f6 100644 --- a/turbo.json +++ b/turbo.json @@ -11,21 +11,22 @@ "outputs": ["**/dist/**"], "cache": true }, + "clean": {}, "lint": { "env": ["CONTRACT_VERIFICATION_TESTNET_PK"] }, "lint:solidity": {}, - "clean": {}, + "package": {}, "test": { "cache": true, "env": ["COVERAGE"] }, - "test:foundry": { - "cache": true - }, "test:coverage": { "dependsOn": ["test"], "cache": false + }, + "test:foundry": { + "cache": true } } } From 88b4022a008cc16775e4bccee99a3f1b13f51de0 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 04:17:07 -0700 Subject: [PATCH 06/21] ci: adjust CI for build lint test for all packages --- .github/workflows/build-lint-test.yml | 108 ++++---------------------- 1 file changed, 14 insertions(+), 94 deletions(-) diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index f8ac31d63..94745231b 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -5,7 +5,7 @@ name: Node.js CI - Build + Lint + Test on: pull_request jobs: - build: + build-lint-test: runs-on: ubuntu-latest steps: @@ -22,107 +22,27 @@ jobs: run: npm ci - name: 🔍 Run Solidity Linter - run: | - npm run lint:solidity - npm run lint:turbo:solidity + run: npm run lint:solidity - name: 🎨 Run ESLint on JS/TS files - run: | - npm run lint - npm run lint:turbo + run: npm run lint # This will also generate the Typechain types used by the Chai tests - name: 🏗️ Build contract artifacts run: | npm run build - npm run build:turbo npm run build:js - npm run build:js:turbo - - - name: 📤 cache dependencies + build - uses: actions/cache@v4 - with: - path: | - artifacts - node_modules - dist - types - contracts.ts - packages/**/types - packages/**/dist - key: ${{ github.run_id }} - - - name: 📚 generate ABI docs - run: npm run build:docs - - - name: 🔍 check if ABI auto-generated docs need to be updated - run: |- - if [[ $(git diff --name-only) != "" ]]; - then - echo "Error: Please generate ABI docs after making changes to Solidity code and Natspec comments!" - exit 1 - fi - - - name: 🧪 Run Turbo tests - run: npm run test:turbo - - test-suites: - strategy: - matrix: - lsp: [ - "up", - "upinit", - "lsp1", - "lsp6", - "lsp6init", - "lsp7", - "lsp7init", - "lsp8", - "lsp8init", - "lsp9", - "lsp9init", - "lsp11", - "lsp11init", - "lsp17", - # Deploying NickFactory currently fails with latest Hardhat version. Commenting out temporarily until resolved - # See following issue: https://github.com/NomicFoundation/hardhat/issues/4939 - # "lsp17extensions", - "lsp20", - "lsp20init", - "lsp23", - "reentrancy", - "reentrancyinit", - "mocks", - ] - - runs-on: ubuntu-latest - needs: [build] - steps: - - uses: actions/checkout@v3 - - name: 📥 restore cache - uses: actions/cache@v4 - id: "build-cache" - with: - path: | - artifacts - node_modules - dist - types - contracts.ts - packages/**/types - packages/**/dist - key: ${{ github.run_id }} - - - name: Use Node.js v20 - uses: actions/setup-node@v3 - with: - node-version: "20.x" - cache: "npm" + # - name: 📚 generate ABI docs + # run: npm run build:docs - - name: Install dependencies - if: steps.build-cache.outputs.cache-hit != 'true' - run: npm ci + # - name: 🔍 check if ABI auto-generated docs need to be updated + # run: |- + # if [[ $(git diff --name-only) != "" ]]; + # then + # echo "Error: Please generate ABI docs after making changes to Solidity code and Natspec comments!" + # exit 1 + # fi - - name: 🧪 run tests - run: npm run test:${{ matrix.lsp }} + - name: 🧪 Run tests for each package + run: npm run test From 7cddd0f03951feddaa2f2f168e4c1b85c75e8279 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 04:39:31 -0700 Subject: [PATCH 07/21] chore: remap import paths for `LSP0ERC725Account` to `@lukso/lsp0-contracts/` --- .../contracts/LSP0ERC725Account/ILSP0ERC725Account.sol | 4 ++++ .../contracts/LSP0ERC725Account/LSP0Constants.sol | 4 ++++ .../contracts/LSP0ERC725Account/LSP0ERC725Account.sol | 4 ++++ .../contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol | 4 ++++ .../contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol | 4 ++++ .../LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol | 4 ++++ 6 files changed, 24 insertions(+) create mode 100644 packages/lsp-smart-contracts/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725Account.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol diff --git a/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol b/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol new file mode 100644 index 000000000..39d368c70 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp0-contracts/contracts/ILSP0ERC725Account.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0Constants.sol b/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0Constants.sol new file mode 100644 index 000000000..5cabb1423 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp0-contracts/contracts/LSP0Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725Account.sol b/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725Account.sol new file mode 100644 index 000000000..e0e066a85 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725Account.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp0-contracts/contracts/LSP0ERC725Account.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol b/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol new file mode 100644 index 000000000..6cdd0ed4a --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp0-contracts/contracts/LSP0ERC725AccountCore.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol b/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol new file mode 100644 index 000000000..384a09e77 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp0-contracts/contracts/LSP0ERC725AccountInit.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol new file mode 100644 index 000000000..a6aad9e29 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp0-contracts/contracts/LSP0ERC725AccountInitAbstract.sol"; From 47cb8f82ed6b8402660c30ee8117bbc6b13d5003 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 04:56:23 -0700 Subject: [PATCH 08/21] ci: update CI job path runner for `solc_version` --- .github/workflows/solc_version.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/solc_version.yml b/.github/workflows/solc_version.yml index beb70b73d..469cf228a 100644 --- a/.github/workflows/solc_version.yml +++ b/.github/workflows/solc_version.yml @@ -11,15 +11,18 @@ on: - "develop" # Only run when `.sol` files have been changed paths: - - "contracts/**/*.sol" + - "*.sol" pull_request: paths: - - "contracts/**/*.sol" + - "*.sol" jobs: solc_version: runs-on: ubuntu-latest + defaults: + run: + working-directory: packages/lsp-smart-contracts strategy: matrix: solc: [ From 9ec83ce20842badd2a324b656c022e34b9ddd12a Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 05:37:23 -0700 Subject: [PATCH 09/21] build: tmp turn off global import disallowed in `.sol` file for `lsp-smart-contracts` --- packages/lsp-smart-contracts/.solhint.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lsp-smart-contracts/.solhint.json b/packages/lsp-smart-contracts/.solhint.json index 26e01c48a..e8a54f742 100644 --- a/packages/lsp-smart-contracts/.solhint.json +++ b/packages/lsp-smart-contracts/.solhint.json @@ -16,7 +16,7 @@ "imports-on-top": "error", "visibility-modifier-order": "error", "no-unused-import": "error", - "no-global-import": "error", + "no-global-import": "off", "reason-string": ["warn", { "maxLength": 120 }], "avoid-low-level-calls": "off", "no-empty-blocks": ["error", { "ignoreConstructors": true }], From 82b2dda3496bbaa6c440d38fe18ed253f28d9ba9 Mon Sep 17 00:00:00 2001 From: b00ste Date: Wed, 28 Feb 2024 15:40:17 +0200 Subject: [PATCH 10/21] chore: remap import paths --- .../LSP10ReceivedVaults/LSP10Constants.sol | 4 + .../LSP10ReceivedVaults/LSP10Utils.sol | 4 + .../LSP12IssuedAssets/LSP12Constants.sol | 4 + .../LSP14Ownable2Step/ILSP14Ownable2Step.sol | 4 + .../LSP14Ownable2Step/LSP14Constants.sol | 4 + .../LSP14Ownable2Step/LSP14Errors.sol | 4 + .../LSP14Ownable2Step/LSP14Ownable2Step.sol | 4 + .../LSP16UniversalFactory.sol | 4 + .../LSP17ContractExtension/LSP17Constants.sol | 4 + .../LSP17ContractExtension/LSP17Errors.sol | 4 + .../LSP17Extendable.sol | 4 + .../LSP17ContractExtension/LSP17Extension.sol | 4 + .../LSP17ContractExtension/LSP17Utils.sol | 4 + .../LSP17Extensions/Extension4337.sol | 4 + .../OnERC721ReceivedExtension.sol | 4 + .../ILSP1UniversalReceiver.sol | 4 + .../ILSP1UniversalReceiverDelegate.sol | 4 + .../LSP1UniversalReceiver/LSP1Constants.sol | 4 + .../LSP1UniversalReceiver/LSP1Errors.sol | 4 + .../LSP1UniversalReceiverDelegateUP.sol | 4 + .../LSP1UniversalReceiverDelegateVault.sol | 4 + .../LSP1UniversalReceiver/LSP1Utils.sol | 4 + .../ILSP20CallVerifier.sol | 4 + .../LSP20CallVerification.sol | 4 + .../LSP20CallVerification/LSP20Constants.sol | 4 + .../LSP20CallVerification/LSP20Errors.sol | 4 + .../ILSP23LinkedContractsFactory.sol | 4 + .../IPostDeploymentModule.sol | 4 + .../LSP23Errors.sol | 4 + .../LSP23LinkedContractsFactory.sol | 4 + .../modules/README.md | 23 +++++ ...iversalProfileInitPostDeploymentModule.sol | 4 + .../UniversalProfilePostDeploymentModule.sol | 4 + .../modules/deployment-UP-init-module.md | 92 +++++++++++++++++++ .../modules/deployment-UP-module.md | 90 ++++++++++++++++++ .../ILSP25ExecuteRelayCall.sol | 4 + .../LSP25ExecuteRelayCall/LSP25Constants.sol | 4 + .../LSP25ExecuteRelayCall/LSP25Errors.sol | 4 + .../LSP25MultiChannelNonce.sol | 4 + .../LSP3ProfileMetadata/LSP3Constants.sol | 4 + .../LSP4Constants.sol | 4 + .../LSP4DigitalAssetMetadata.sol | 4 + .../LSP4DigitalAssetMetadataCore.sol | 4 + .../LSP4DigitalAssetMetadataInitAbstract.sol | 4 + .../LSP4DigitalAssetMetadata/LSP4Errors.sol | 4 + .../LSP5ReceivedAssets/LSP5Constants.sol | 4 + .../LSP5ReceivedAssets/LSP5Utils.sol | 4 + .../LSP6KeyManager/ILSP6KeyManager.sol | 4 + .../LSP6KeyManager/LSP6Constants.sol | 4 + .../contracts/LSP6KeyManager/LSP6Errors.sol | 4 + .../LSP6KeyManager/LSP6KeyManager.sol | 4 + .../LSP6KeyManager/LSP6KeyManagerCore.sol | 4 + .../LSP6KeyManager/LSP6KeyManagerInit.sol | 4 + .../LSP6KeyManagerInitAbstract.sol | 4 + .../LSP6Modules/LSP6ExecuteModule.sol | 4 + .../LSP6ExecuteRelayCallModule.sol | 4 + .../LSP6Modules/LSP6OwnershipModule.sol | 4 + .../LSP6Modules/LSP6SetDataModule.sol | 4 + .../contracts/LSP6KeyManager/LSP6Utils.sol | 4 + .../LSP7DigitalAsset/ILSP7DigitalAsset.sol | 4 + .../LSP7DigitalAsset/LSP7Constants.sol | 4 + .../LSP7DigitalAsset/LSP7DigitalAsset.sol | 4 + .../LSP7DigitalAsset/LSP7DigitalAssetCore.sol | 4 + .../LSP7DigitalAssetInitAbstract.sol | 4 + .../contracts/LSP7DigitalAsset/LSP7Errors.sol | 4 + .../extensions/LSP7Burnable.sol | 4 + .../extensions/LSP7BurnableInitAbstract.sol | 4 + .../extensions/LSP7CappedSupply.sol | 4 + .../LSP7CappedSupplyInitAbstract.sol | 4 + .../presets/ILSP7Mintable.sol | 4 + .../LSP7DigitalAsset/presets/LSP7Mintable.sol | 4 + .../presets/LSP7MintableInit.sol | 4 + .../presets/LSP7MintableInitAbstract.sol | 4 + .../ILSP8IdentifiableDigitalAsset.sol | 4 + .../LSP8Constants.sol | 4 + .../LSP8Errors.sol | 4 + .../LSP8IdentifiableDigitalAsset.sol | 4 + .../LSP8IdentifiableDigitalAssetCore.sol | 4 + ...P8IdentifiableDigitalAssetInitAbstract.sol | 4 + .../extensions/LSP8Burnable.sol | 4 + .../extensions/LSP8BurnableInitAbstract.sol | 4 + .../extensions/LSP8CappedSupply.sol | 4 + .../LSP8CappedSupplyInitAbstract.sol | 4 + .../extensions/LSP8Enumerable.sol | 4 + .../extensions/LSP8EnumerableInitAbstract.sol | 4 + .../presets/ILSP8Mintable.sol | 4 + .../presets/LSP8Mintable.sol | 4 + .../presets/LSP8MintableInit.sol | 4 + .../presets/LSP8MintableInitAbstract.sol | 4 + .../contracts/LSP9Vault/ILSP9Vault.sol | 4 + .../contracts/LSP9Vault/LSP9Constants.sol | 4 + .../contracts/LSP9Vault/LSP9Errors.sol | 4 + .../contracts/LSP9Vault/LSP9Vault.sol | 4 + .../contracts/LSP9Vault/LSP9VaultCore.sol | 4 + .../contracts/LSP9Vault/LSP9VaultInit.sol | 4 + .../LSP9Vault/LSP9VaultInitAbstract.sol | 4 + .../contracts/UniversalProfile.sol | 4 + .../contracts/UniversalProfileInit.sol | 4 + .../UniversalProfileInitAbstract.sol | 4 + 99 files changed, 589 insertions(+) create mode 100644 packages/lsp-smart-contracts/contracts/LSP10ReceivedVaults/LSP10Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP10ReceivedVaults/LSP10Utils.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP12IssuedAssets/LSP12Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/LSP14Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/LSP14Errors.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Errors.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Extendable.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Extension.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Utils.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP17Extensions/Extension4337.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Errors.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Utils.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP20CallVerification/ILSP20CallVerifier.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP20CallVerification/LSP20CallVerification.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP20CallVerification/LSP20Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP20CallVerification/LSP20Errors.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/ILSP23LinkedContractsFactory.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/IPostDeploymentModule.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/LSP23Errors.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/LSP23LinkedContractsFactory.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/README.md create mode 100644 packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/UniversalProfileInitPostDeploymentModule.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/UniversalProfilePostDeploymentModule.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/deployment-UP-init-module.md create mode 100644 packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/deployment-UP-module.md create mode 100644 packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/ILSP25ExecuteRelayCall.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/LSP25Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/LSP25Errors.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP3ProfileMetadata/LSP3Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataCore.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP5ReceivedAssets/LSP5Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP5ReceivedAssets/LSP5Utils.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP6KeyManager/ILSP6KeyManager.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Errors.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteRelayCallModule.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6OwnershipModule.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Utils.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7Errors.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8BurnableInitAbstract.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP9Vault/ILSP9Vault.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9Constants.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9Errors.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9Vault.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9VaultCore.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9VaultInit.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9VaultInitAbstract.sol create mode 100644 packages/lsp-smart-contracts/contracts/UniversalProfile.sol create mode 100644 packages/lsp-smart-contracts/contracts/UniversalProfileInit.sol create mode 100644 packages/lsp-smart-contracts/contracts/UniversalProfileInitAbstract.sol diff --git a/packages/lsp-smart-contracts/contracts/LSP10ReceivedVaults/LSP10Constants.sol b/packages/lsp-smart-contracts/contracts/LSP10ReceivedVaults/LSP10Constants.sol new file mode 100644 index 000000000..25ded8e48 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP10ReceivedVaults/LSP10Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp10-contracts/contracts/LSP10Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP10ReceivedVaults/LSP10Utils.sol b/packages/lsp-smart-contracts/contracts/LSP10ReceivedVaults/LSP10Utils.sol new file mode 100644 index 000000000..ad8ba98f4 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP10ReceivedVaults/LSP10Utils.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp10-contracts/contracts/LSP10Utils.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP12IssuedAssets/LSP12Constants.sol b/packages/lsp-smart-contracts/contracts/LSP12IssuedAssets/LSP12Constants.sol new file mode 100644 index 000000000..12f76b536 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP12IssuedAssets/LSP12Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp12-contracts/contracts/LSP12Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol b/packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol new file mode 100644 index 000000000..ecd0cf5f9 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp14-contracts/contracts/ILSP14Ownable2Step.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/LSP14Constants.sol b/packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/LSP14Constants.sol new file mode 100644 index 000000000..6155d1249 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/LSP14Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp14-contracts/contracts/LSP14Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/LSP14Errors.sol b/packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/LSP14Errors.sol new file mode 100644 index 000000000..f2181e6ff --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/LSP14Errors.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp14-contracts/contracts/LSP14Errors.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol b/packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol new file mode 100644 index 000000000..f0cb16816 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp14-contracts/contracts/LSP14Ownable2Step.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol b/packages/lsp-smart-contracts/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol new file mode 100644 index 000000000..0693d5e67 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp16-contracts/contracts/LSP16UniversalFactory.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Constants.sol b/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Constants.sol new file mode 100644 index 000000000..9d7da33a9 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp17contractextension-contracts/contracts/LSP17Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Errors.sol b/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Errors.sol new file mode 100644 index 000000000..a84a4b87b --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Errors.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp17contractextension-contracts/contracts/LSP17Errors.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Extendable.sol b/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Extendable.sol new file mode 100644 index 000000000..a322d8fea --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Extendable.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp17contractextension-contracts/contracts/LSP17Extendable.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Extension.sol b/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Extension.sol new file mode 100644 index 000000000..b856ae93a --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Extension.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp17contractextension-contracts/contracts/LSP17Extension.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Utils.sol b/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Utils.sol new file mode 100644 index 000000000..ef3f287f9 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Utils.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp17contractextension-contracts/contracts/LSP17Utils.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP17Extensions/Extension4337.sol b/packages/lsp-smart-contracts/contracts/LSP17Extensions/Extension4337.sol new file mode 100644 index 000000000..51815c2c5 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP17Extensions/Extension4337.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp17-contracts/contracts/Extension4337.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol b/packages/lsp-smart-contracts/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol new file mode 100644 index 000000000..0c3c2cf2a --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp17-contracts/contracts/OnERC721ReceivedExtension.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol new file mode 100644 index 000000000..a5da4d4ca --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp1-contracts/contracts/ILSP1UniversalReceiver.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol new file mode 100644 index 000000000..eef9463a9 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp1-contracts/contracts/ILSP1UniversalReceiverDelegate.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Constants.sol b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Constants.sol new file mode 100644 index 000000000..7b7e45b39 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp1-contracts/contracts/LSP1Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Errors.sol b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Errors.sol new file mode 100644 index 000000000..e60bb80f7 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Errors.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp1delegate-contracts/contracts/LSP1Errors.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol new file mode 100644 index 000000000..ce57e7b80 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp1delegate-contracts/contracts/LSP1UniversalReceiverDelegateUP.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol new file mode 100644 index 000000000..c6910b037 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp1delegate-contracts/contracts/LSP1UniversalReceiverDelegateVault.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Utils.sol b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Utils.sol new file mode 100644 index 000000000..b699543ba --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP1UniversalReceiver/LSP1Utils.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp1-contracts/contracts/LSP1Utils.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP20CallVerification/ILSP20CallVerifier.sol b/packages/lsp-smart-contracts/contracts/LSP20CallVerification/ILSP20CallVerifier.sol new file mode 100644 index 000000000..5231c8715 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP20CallVerification/ILSP20CallVerifier.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp20-contracts/contracts/ILSP20CallVerifier.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP20CallVerification/LSP20CallVerification.sol b/packages/lsp-smart-contracts/contracts/LSP20CallVerification/LSP20CallVerification.sol new file mode 100644 index 000000000..c659b4cdc --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP20CallVerification/LSP20CallVerification.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp20-contracts/contracts/LSP20CallVerification.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP20CallVerification/LSP20Constants.sol b/packages/lsp-smart-contracts/contracts/LSP20CallVerification/LSP20Constants.sol new file mode 100644 index 000000000..b0cbaa677 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP20CallVerification/LSP20Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp20-contracts/contracts/LSP20Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP20CallVerification/LSP20Errors.sol b/packages/lsp-smart-contracts/contracts/LSP20CallVerification/LSP20Errors.sol new file mode 100644 index 000000000..40a513afa --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP20CallVerification/LSP20Errors.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp20-contracts/contracts/LSP20Errors.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/ILSP23LinkedContractsFactory.sol b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/ILSP23LinkedContractsFactory.sol new file mode 100644 index 000000000..eadc44d56 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/ILSP23LinkedContractsFactory.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp23-contracts/contracts/ILSP23LinkedContractsFactory.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/IPostDeploymentModule.sol b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/IPostDeploymentModule.sol new file mode 100644 index 000000000..280808e51 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/IPostDeploymentModule.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp23-contracts/contracts/IPostDeploymentModule.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/LSP23Errors.sol b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/LSP23Errors.sol new file mode 100644 index 000000000..7a1a33628 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/LSP23Errors.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp23-contracts/contracts/LSP23Errors.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/LSP23LinkedContractsFactory.sol b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/LSP23LinkedContractsFactory.sol new file mode 100644 index 000000000..e498c7946 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/LSP23LinkedContractsFactory.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp23-contracts/contracts/LSP23LinkedContractsFactory.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/README.md b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/README.md new file mode 100644 index 000000000..1232d6e66 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/README.md @@ -0,0 +1,23 @@ +# LSP23 Linked Contracts Deployment Module + +This folder contains modules related to the deployment of LSP23 Linked Contracts. The modules are essential for initializing and post-deploying actions for Universal Profiles. + +## Modules + +- **UniversalProfileInitPostDeploymentModule**: This module is responsible for the initial setup after the deployment of a Universal Profile Init contract. + + - **Standardized Address**: `0x000000000066093407b6704B89793beFfD0D8F00` + - **Standardized Salt**: `0x12a6712f113536d8b01d99f72ce168c7e10901240d73e80eeb821d01aa4c2b1a` + - [More Details](./deployment-UP-init-module.md) + +- **UniversalProfilePostDeploymentModule**: This module is responsible for the initial setup after the deployment of a Universal Profile contract. + - **Standardized Address**: `0x0000005aD606bcFEF9Ea6D0BbE5b79847054BcD7` + - **Standardized Salt**: `0x42ff55d7957589c62da54a4368b10a2bc549f2038bbb6880ec6b3e0ecae2ba58` + - [More Details](./deployment-UP-module.md) + +## Setup + +Before deploying any of these modules, make sure that the following contracts are already deployed on the same network: + +- [Nick's Factory contract](https://github.com/Arachnid/deterministic-deployment-proxy/tree/master) +- [LSP23 Linked Contracts Factory](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-23-LinkedContractsFactory.md#lsp23linkedcontractsfactory-deployment) diff --git a/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/UniversalProfileInitPostDeploymentModule.sol b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/UniversalProfileInitPostDeploymentModule.sol new file mode 100644 index 000000000..336f3645e --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/UniversalProfileInitPostDeploymentModule.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp23-contracts/contracts/modules/UniversalProfileInitPostDeploymentModule.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/UniversalProfilePostDeploymentModule.sol b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/UniversalProfilePostDeploymentModule.sol new file mode 100644 index 000000000..eacb0ba87 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/UniversalProfilePostDeploymentModule.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp23-contracts/contracts/modules/UniversalProfilePostDeploymentModule.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/deployment-UP-init-module.md b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/deployment-UP-init-module.md new file mode 100644 index 000000000..13c2fc307 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/deployment-UP-init-module.md @@ -0,0 +1,92 @@ +# Setup + +Before the deployment of the `UniversalProfileInitPostDeploymentModule` on any network, people should make sure that the [Nick's Factory contract](https://github.com/Arachnid/deterministic-deployment-proxy/tree/master) is deployed on the same network. +You also need to make sure that the LSP23 Linked Contracts Factory is deployed on the same network. Please refer to [LSP23 Linked Contracts Deployment Factory LIP](https://github.com/lukso-network/LIPs/LSPs/LSP-23-LinkedContractsFactory.md#lsp23linkedcontractsfactory-deployment) in order to deploy it. + +# Deployment of the Universal Profile Init Post Deployment Module + +## Standardized Address + +`0x000000000066093407b6704B89793beFfD0D8F00` + +## Standardized Salt + +`0x12a6712f113536d8b01d99f72ce168c7e10901240d73e80eeb821d01aa4c2b1a` + +## Standardized Bytecode + +```solidity +0x60806040523480156200001157600080fd5b506200001c6200002c565b620000266200002c565b620000ed565b600054610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000eb576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61497980620000fd6000396000f3fe6080604052600436106101635760003560e01c8063715018a6116100c0578063c4d66de811610074578063e30c397811610059578063e30c397814610451578063ead3fbdf1461020d578063f2fde38b1461047c5761019e565b8063c4d66de81461041e578063dedff9c6146104315761019e565b80637f23690c116100a55780637f23690c146103a65780638da5cb5b146103b9578063979024211461040b5761019e565b8063715018a61461037c57806379ba5097146103915761019e565b806344c028fe1161011757806354f6127f116100fc57806354f6127f146103295780636963d438146103495780636bb56a14146103695761019e565b806344c028fe146102f65780634f04d60a146103165761019e565b80631626ba7e116101485780631626ba7e1461026557806328c4d14e146102b657806331858452146102d65761019e565b806301bfba611461020d57806301ffc9a7146102355761019e565b3661019e57341561019c57604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b005b600036606034156101d757604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b60043610156101f55750604080516020810190915260008152610202565b6101ff838361049c565b90505b915050805190602001f35b34801561021957600080fd5b5061022260c881565b6040519081526020015b60405180910390f35b34801561024157600080fd5b50610255610250366004613a93565b610677565b604051901515815260200161022c565b34801561027157600080fd5b50610285610280366004613bca565b61080c565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161022c565b3480156102c257600080fd5b5061019c6102d1366004613c7c565b610ac3565b6102e96102e4366004613de7565b610c2a565b60405161022c9190613fb2565b610309610304366004613fc5565b610cf4565b60405161022c919061401a565b61019c61032436600461402d565b610d95565b34801561033557600080fd5b506103096103443660046140a1565b610f19565b34801561035557600080fd5b506102e96103643660046140ba565b610f24565b61030961037736600461412f565b61109a565b34801561038857600080fd5b5061019c6112a2565b34801561039d57600080fd5b5061019c6113a7565b61019c6103b4366004613bca565b6114b1565b3480156103c557600080fd5b5060005462010000900473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161022c565b61019c61041936600461417b565b611552565b61019c61042c3660046141d5565b611681565b34801561043d57600080fd5b506102e961044c3660046141f0565b611815565b34801561045d57600080fd5b5060035473ffffffffffffffffffffffffffffffffffffffff166103e6565b34801561048857600080fd5b5061019c6104973660046141d5565b6118c0565b606060006104cd6000357fffffffff0000000000000000000000000000000000000000000000000000000016611b4f565b90506000357fffffffff0000000000000000000000000000000000000000000000000000000016158015610515575073ffffffffffffffffffffffffffffffffffffffff8116155b15610530575050604080516020810190915260008152610671565b73ffffffffffffffffffffffffffffffffffffffff81166105a8576040517fbb370b2b0000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000006000351660048201526024015b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff16868633346040516020016105d99493929190614225565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261061191614268565b6000604051808303816000865af19150503d806000811461064e576040519150601f19603f3d011682016040523d82523d6000602084013e610653565b606091505b50915091508115610668579250610671915050565b80518060208301fd5b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f1626ba7e00000000000000000000000000000000000000000000000000000000148061070a57507fffffffff0000000000000000000000000000000000000000000000000000000082167f24871b3d00000000000000000000000000000000000000000000000000000000145b8061075657507fffffffff0000000000000000000000000000000000000000000000000000000082167f6bb56a1400000000000000000000000000000000000000000000000000000000145b806107a257507fffffffff0000000000000000000000000000000000000000000000000000000082167f94be599900000000000000000000000000000000000000000000000000000000145b806107ee57507fffffffff0000000000000000000000000000000000000000000000000000000082167f1a0eb6a500000000000000000000000000000000000000000000000000000000145b806107fd57506107fd82611bbf565b80610671575061067182611c15565b6000805462010000900473ffffffffffffffffffffffffffffffffffffffff16803b156109e0576000808273ffffffffffffffffffffffffffffffffffffffff16631626ba7e60e01b8787604051602401610868929190614284565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516108f19190614268565b600060405180830381855afa9150503d806000811461092c576040519150601f19603f3d011682016040523d82523d6000602084013e610931565b606091505b50915091506000828015610946575081516020145b8015610986575081517f1626ba7e0000000000000000000000000000000000000000000000000000000090610984908401602090810190850161429d565b145b9050806109b3577fffffffff000000000000000000000000000000000000000000000000000000006109d5565b7f1626ba7e000000000000000000000000000000000000000000000000000000005b945050505050610671565b6000806109ed8686611c78565b90925090506000816004811115610a0657610a066142b6565b14610a3757507fffffffff000000000000000000000000000000000000000000000000000000009250610671915050565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610a90577fffffffff00000000000000000000000000000000000000000000000000000000610ab2565b7f1626ba7e000000000000000000000000000000000000000000000000000000005b9350505050610671565b5092915050565b600080610ad28385018561417b565b915091508573ffffffffffffffffffffffffffffffffffffffff166344c028fe600430600086868b604051602401610b0c939291906142e5565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f4f04d60a000000000000000000000000000000000000000000000000000000001790525160e086901b7fffffffff00000000000000000000000000000000000000000000000000000000168152610bbc949392919060040161435a565b6000604051808303816000875af1158015610bdb573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610c219190810190614395565b50505050505050565b60603415610c6057604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633819003610c9b57610c9386868686611cbd565b915050610cec565b6000610ca682611e4d565b90506000610cb688888888611cbd565b90508115610ce757610ce78382604051602001610cd39190613fb2565b604051602081830303815290604052612060565b925050505b949350505050565b60603415610d2a57604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633819003610d5d57610c9386868686612233565b6000610d6882611e4d565b90506000610d7888888888612233565b90508115610ce757610ce78382604051602001610cd3919061401a565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610eba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152606860248201527f556e6976657273616c50726f66696c65496e6974506f73744465706c6f796d6560448201527f6e744d6f64756c653a2073657444617461416e645472616e736665724f776e6560648201527f7273686970206f6e6c7920616c6c6f776564207468726f7567682064656c656760848201527f6174652063616c6c00000000000000000000000000000000000000000000000060a482015260c40161059f565b60005b8351811015610f0a57610f02848281518110610edb57610edb614403565b6020026020010151848381518110610ef557610ef5614403565b60200260200101516123d5565b600101610ebd565b50610f1481612449565b505050565b6060610671826124ef565b60608167ffffffffffffffff811115610f3f57610f3f613ab0565b604051908082528060200260200182016040528015610f7257816020015b6060815260200190600190039081610f5d5790505b50905060005b82811015610abc5760008030868685818110610f9657610f96614403565b9050602002810190610fa89190614432565b604051610fb6929190614497565b600060405180830381855af49150503d8060008114610ff1576040519150601f19603f3d011682016040523d82523d6000602084013e610ff6565b606091505b509150915081611072578051156110105780518082602001fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4c5350303a20626174636843616c6c7320726576657274656400000000000000604482015260640161059f565b8084848151811061108557611085614403565b60209081029190910101525050600101610f78565b606034156110d057604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b60006110fb7f0cfc51aec37c55a4d0b1a65c6255c4bf2fbdf6277f3cc0730c45b828b6db8b476124ef565b905060606014825110611170576000611113836144a7565b60601c9050611142817f6bb56a1400000000000000000000000000000000000000000000000000000000612591565b1561116e5761116b73ffffffffffffffffffffffffffffffffffffffff82168888883334612660565b91505b505b600061119c7f0cfc51aec37c55a4d0b10000000000000000000000000000000000000000000088612800565b905060006111a9826124ef565b90506060601482511061121e5760006111c1836144a7565b60601c90506111f0817f6bb56a1400000000000000000000000000000000000000000000000000000000612591565b1561121c5761121973ffffffffffffffffffffffffffffffffffffffff82168b8b8b3334612660565b91505b505b83816040516020016112319291906144f7565b604051602081830303815290604052955088343373ffffffffffffffffffffffffffffffffffffffff167f9c3ba68eb5742b8e3961aea0afc7371a71bf433c8a67a831803b64c064a178c28b8b8b60405161128e93929190614565565b60405180910390a450505050509392505050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16338190036112d4576112d161287c565b50565b60006112df82611e4d565b9050600061130960005473ffffffffffffffffffffffffffffffffffffffff620100009091041690565b905061131361287c565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16611388576040805160208101909152600081526113889073ffffffffffffffffffffffffffffffffffffffff8316907fa4e59c931d14f7c8a7a35027f92ee40b5f2886b9fdcdb78f30bc5ecce5a2f814906129b8565b8115610f1457610f148360405180602001604052806000815250612060565b60035474010000000000000000000000000000000000000000900460ff16156113fc576040517f5758dd0700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16611423612aa0565b6040805160208101909152600081526114759073ffffffffffffffffffffffffffffffffffffffff8316907fa4e59c931d14f7c8a7a35027f92ee40b5f2886b9fdcdb78f30bc5ecce5a2f814906129b8565b6040805160208101909152600081526112d19033907fceca317f109c43507871523e82dc2a3cc64dfa18f12da0b6db14f6e23f995538906129b8565b34156114e557604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b60005462010000900473ffffffffffffffffffffffffffffffffffffffff163381900361151657610f1483836123d5565b600061152182611e4d565b905061152d84846123d5565b801561154c5761154c8260405180602001604052806000815250612060565b50505050565b341561158657604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b80518251146115c1576040517f3bcc897900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16338190036116115760005b835181101561154c57611609848281518110610edb57610edb614403565b6001016115eb565b600061161c82611e4d565b905060005b84518110156116615761165985828151811061163f5761163f614403565b6020026020010151858381518110610ef557610ef5614403565b600101611621565b50801561154c5761154c8260405180602001604052806000815250612060565b600054610100900460ff16158080156116a15750600054600160ff909116105b806116bb5750303b1580156116bb575060005460ff166001145b611747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161059f565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156117a557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6117ae82612b7a565b801561181157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6060815167ffffffffffffffff81111561183157611831613ab0565b60405190808252806020026020018201604052801561186457816020015b606081526020019060019003908161184f5790505b50905060005b82518110156118ba5761189583828151811061188857611888614403565b60200260200101516124ef565b8282815181106118a7576118a7614403565b602090810291909101015260010161186a565b50919050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633819003611a0757600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000017905561192f82612c7c565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a36040805160208101909152600081526119db9073ffffffffffffffffffffffffffffffffffffffff8416907fe17117c9d2665d1dbeb479ed8058bbebde3c50ac50e2e65619f60006caac6926906129b8565b600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690555050565b6000611a1282611e4d565b600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790559050611a5c83612c7c565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a3604080516020810190915260008152611b089073ffffffffffffffffffffffffffffffffffffffff8516907fe17117c9d2665d1dbeb479ed8058bbebde3c50ac50e2e65619f60006caac6926906129b8565b600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690558015610f1457610f148260405180602001604052806000815250612060565b600080611b9e7fcee78b4094da86011096000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008516612800565b90506000611bab826124ef565b611bb4906144a7565b60601c949350505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fa918fa6b000000000000000000000000000000000000000000000000000000001480610671575061067182612d17565b600080611c417f01ffc9a700000000000000000000000000000000000000000000000000000000611b4f565b905073ffffffffffffffffffffffffffffffffffffffff8116611c675750600092915050565b611c718184612591565b9392505050565b6000808251604103611cae5760208301516040840151606085015160001a611ca287828585612d6d565b94509450505050611cb6565b506000905060025b9250929050565b606083518551141580611cde575082518451141580611cde57508151835114155b15611d15576040517f3ff55f4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8451600003611d50576040517fe9ad2b5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000855167ffffffffffffffff811115611d6c57611d6c613ab0565b604051908082528060200260200182016040528015611d9f57816020015b6060815260200190600190039081611d8a5790505b50905060005b8651811015611e4357611e1e878281518110611dc357611dc3614403565b6020026020010151878381518110611ddd57611ddd614403565b6020026020010151878481518110611df757611df7614403565b6020026020010151878581518110611e1157611e11614403565b6020026020010151612233565b828281518110611e3057611e30614403565b6020908102919091010152600101611da5565b5095945050505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff16639bf04b1160e01b3334600036604051602401611e89949392919061458b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051611f129190614268565b6000604051808303816000865af19150503d8060008114611f4f576040519150601f19603f3d011682016040523d82523d6000602084013e611f54565b606091505b5091509150611f6560008383612e5c565b600081806020019051810190611f7b91906145c1565b90507fffffff000000000000000000000000000000000000000000000000000000000081167f9bf04b000000000000000000000000000000000000000000000000000000000014611ffd576000826040517fd088ec4000000000000000000000000000000000000000000000000000000000815260040161059f9291906145de565b7f01000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000600383901a60f81b1614612054576000612057565b60015b95945050505050565b6000808373ffffffffffffffffffffffffffffffffffffffff1663d3fc45d360e01b333460003660405160200161209a94939291906145f9565b60405160208183030381529060405280519060200120856040516024016120c2929190614284565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252905161214b9190614268565b6000604051808303816000865af19150503d8060008114612188576040519150601f19603f3d011682016040523d82523d6000602084013e61218d565b606091505b509150915061219e60018383612e5c565b80517fd3fc45d300000000000000000000000000000000000000000000000000000000906121d590830160209081019084016145c1565b7fffffffff00000000000000000000000000000000000000000000000000000000161461154c576001816040517fd088ec4000000000000000000000000000000000000000000000000000000000815260040161059f9291906145de565b60608461224c57612245848484612ee5565b9050610cec565b600185036122ac5773ffffffffffffffffffffffffffffffffffffffff8416156122a2576040517f3041824a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612245838361305c565b6002850361230c5773ffffffffffffffffffffffffffffffffffffffff841615612302576040517f3041824a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61224583836131d5565b6003850361235657821561234c576040517f72f2bc6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61224584836132f8565b600485036123a0578215612396576040517f5ac8313500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6122458483613420565b6040517f7583b3bc0000000000000000000000000000000000000000000000000000000081526004810186905260240161059f565b60008281526001602052604090206123ed82826146da565b50817fece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b26101008351111561242e576124298360006101006134fe565b612430565b825b60405161243d919061401a565b60405180910390a25050565b60005473ffffffffffffffffffffffffffffffffffffffff8281166201000090920416146112d1576000805473ffffffffffffffffffffffffffffffffffffffff838116620100008181027fffffffffffffffffffff0000000000000000000000000000000000000000ffff851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600081815260016020526040902080546060919061250c9061463f565b80601f01602080910402602001604051908101604052809291908181526020018280546125389061463f565b80156125855780601f1061255a57610100808354040283529160200191612585565b820191906000526020600020905b81548152906001019060200180831161256857829003601f168201915b50505050509050919050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015612649575060208210155b80156126555750600081115b979650505050505050565b60606000636bb56a1460e01b878787604051602401612681939291906147f4565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909516949094179093525161270e92879187910161480e565b60405160208183030381529060405290506000808973ffffffffffffffffffffffffffffffffffffffff16836040516127479190614268565b6000604051808303816000865af19150503d8060008114612784576040519150601f19603f3d011682016040523d82523d6000602084013e612789565b606091505b50915091506127ce82826040518060400160405280602081526020017f43616c6c20746f20756e6976657273616c5265636569766572206661696c6564815250613678565b5080516000036127de57806127f2565b808060200190518101906127f29190614395565b9a9950505050505050505050565b604080517fffffffffffffffffffff00000000000000000000000000000000000000000000841660208201526000602a82018190527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008416602c83015291829101604051602081830303815290604052905080610cec90614860565b60025443906000906128909060c8906148d1565b9050600061289f60c8836148d1565b9050808311806128af5750600254155b1561290f576002839055600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556040517f81b7f830f1f0084db6497c486cbe6974c86488dcc4e3738eab94ab6d6b1653e790600090a1505050565b81831015612953576040517f8b9bf507000000000000000000000000000000000000000000000000000000008152600481018390526024810182905260440161059f565b61295d6000612449565b60006002819055600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556040517fd1f66c3d2bc1993a86be5e3d33709d98f0442381befcedd29f578b9b2506b1ce9190a1505050565b6129e2837f6bb56a1400000000000000000000000000000000000000000000000000000000612591565b15610f14576040517f6bb56a1400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690636bb56a1490612a3b9085908590600401614284565b6000604051808303816000875af1158015612a5a573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261154c9190810190614395565b60035473ffffffffffffffffffffffffffffffffffffffff163314612b47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4c535031343a2063616c6c6572206973206e6f74207468652070656e64696e6760448201527f4f776e6572000000000000000000000000000000000000000000000000000000606482015260840161059f565b612b5033612449565b600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b600054610100900460ff16612c11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161059f565b612c1a81613691565b6112d17feafec4d89fa9619884b600005ef83ad9559033e6e941db7d7c495acdce61634760001b6040518060400160405280600481526020017f5ef83ad9000000000000000000000000000000000000000000000000000000008152506123d5565b3073ffffffffffffffffffffffffffffffffffffffff821603612ccb576040517f43b248cd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790556000600255565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f629aa694000000000000000000000000000000000000000000000000000000001480610671575061067182613765565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612da45750600090506003612e53565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612df8573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116612e4c57600060019250925050612e53565b9150600090505b94509492505050565b81612e6b57612e6b83826137fc565b602081511080612eaa575060006020612e8383614860565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000911b1614155b15610f145782816040517fd088ec4000000000000000000000000000000000000000000000000000000000815260040161059f9291906145de565b606082471015612f2a576040517f0df9a8f80000000000000000000000000000000000000000000000000000000081524760048201526024810184905260440161059f565b8273ffffffffffffffffffffffffffffffffffffffff851660007f4810874456b8e6487bd861375cf6abd8e1c8bb5858c8ce36a86a04dabfac199e612f6e866148e4565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200160405180910390a46000808573ffffffffffffffffffffffffffffffffffffffff168585604051612fcb9190614268565b60006040518083038185875af1925050503d8060008114613008576040519150601f19603f3d011682016040523d82523d6000602084013e61300d565b606091505b509150915061305282826040518060400160405280601681526020017f455243373235583a20556e6b6e6f776e204572726f7200000000000000000000815250613678565b9695505050505050565b6060824710156130a1576040517f0df9a8f80000000000000000000000000000000000000000000000000000000081524760048201526024810184905260440161059f565b81516000036130dc576040517fb81cd8d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082516020840185f0905073ffffffffffffffffffffffffffffffffffffffff8116613135576040517f0b07489b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838173ffffffffffffffffffffffffffffffffffffffff1660017fa1fb700aaee2ae4a2ff6f91ce7eba292f89c2f5488b8ec4c5c5c8150692595c36000801b60405161318391815260200190565b60405180910390a46040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606083901b16602082015260340160405160208183030381529060405291505092915050565b60608151600003613212576040517fb81cd8d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061322b83602085516132269190614930565b613842565b90506000613248846000602087516132439190614930565b6134fe565b905060006132578684846138c2565b9050858173ffffffffffffffffffffffffffffffffffffffff1660027fa1fb700aaee2ae4a2ff6f91ce7eba292f89c2f5488b8ec4c5c5c8150692595c3866040516132a491815260200190565b60405180910390a46040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606083901b166020820152603401604051602081830303815290604052935050505092915050565b6060600073ffffffffffffffffffffffffffffffffffffffff841660037f4810874456b8e6487bd861375cf6abd8e1c8bb5858c8ce36a86a04dabfac199e61333f866148e4565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200160405180910390a46000808473ffffffffffffffffffffffffffffffffffffffff168460405161339b9190614268565b600060405180830381855afa9150503d80600081146133d6576040519150601f19603f3d011682016040523d82523d6000602084013e6133db565b606091505b509150915061205782826040518060400160405280601681526020017f455243373235583a20556e6b6e6f776e204572726f7200000000000000000000815250613678565b6060600073ffffffffffffffffffffffffffffffffffffffff841660047f4810874456b8e6487bd861375cf6abd8e1c8bb5858c8ce36a86a04dabfac199e613467866148e4565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200160405180910390a46000808473ffffffffffffffffffffffffffffffffffffffff16846040516134c39190614268565b600060405180830381855af49150503d80600081146133d6576040519150601f19603f3d011682016040523d82523d6000602084013e6133db565b60608161350c81601f6148d1565b1015613574576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015260640161059f565b61357e82846148d1565b845110156135e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e6473000000000000000000000000000000604482015260640161059f565b606082158015613607576040519150600082526020820160405261366f565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015613640578051835260209283019201613628565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b60608315613687575081611c71565b611c718383613a21565b600054610100900460ff16613728576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161059f565b341561375c57604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b6112d181612449565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7545acac00000000000000000000000000000000000000000000000000000000148061067157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610671565b80511561380c5780518082602001fd5b6040517f8c6a8ae3000000000000000000000000000000000000000000000000000000008152821515600482015260240161059f565b600061384f8260206148d1565b835110156138b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f746f427974657333325f6f75744f66426f756e64730000000000000000000000604482015260640161059f565b50016020015190565b60008347101561392e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e6365000000604482015260640161059f565b8151600003613999576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f604482015260640161059f565b8282516020840186f5905073ffffffffffffffffffffffffffffffffffffffff8116611c71576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f7900000000000000604482015260640161059f565b815115613a315781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059f919061401a565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146112d157600080fd5b600060208284031215613aa557600080fd5b8135611c7181613a65565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613b2657613b26613ab0565b604052919050565b600067ffffffffffffffff821115613b4857613b48613ab0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613b8557600080fd5b8135613b98613b9382613b2e565b613adf565b818152846020838601011115613bad57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613bdd57600080fd5b82359150602083013567ffffffffffffffff811115613bfb57600080fd5b613c0785828601613b74565b9150509250929050565b803573ffffffffffffffffffffffffffffffffffffffff81168114613c3557600080fd5b919050565b60008083601f840112613c4c57600080fd5b50813567ffffffffffffffff811115613c6457600080fd5b602083019150836020828501011115611cb657600080fd5b60008060008060608587031215613c9257600080fd5b613c9b85613c11565b9350613ca960208601613c11565b9250604085013567ffffffffffffffff811115613cc557600080fd5b613cd187828801613c3a565b95989497509550505050565b600067ffffffffffffffff821115613cf757613cf7613ab0565b5060051b60200190565b600082601f830112613d1257600080fd5b81356020613d22613b9383613cdd565b82815260059290921b84018101918181019086841115613d4157600080fd5b8286015b84811015613d5c5780358352918301918301613d45565b509695505050505050565b600082601f830112613d7857600080fd5b81356020613d88613b9383613cdd565b82815260059290921b84018101918181019086841115613da757600080fd5b8286015b84811015613d5c57803567ffffffffffffffff811115613dcb5760008081fd5b613dd98986838b0101613b74565b845250918301918301613dab565b60008060008060808587031215613dfd57600080fd5b843567ffffffffffffffff80821115613e1557600080fd5b613e2188838901613d01565b9550602091508187013581811115613e3857600080fd5b8701601f81018913613e4957600080fd5b8035613e57613b9382613cdd565b81815260059190911b8201840190848101908b831115613e7657600080fd5b928501925b82841015613e9b57613e8c84613c11565b82529285019290850190613e7b565b97505050506040870135915080821115613eb457600080fd5b613ec088838901613d01565b93506060870135915080821115613ed657600080fd5b50613ee387828801613d67565b91505092959194509250565b60005b83811015613f0a578181015183820152602001613ef2565b50506000910152565b60008151808452613f2b816020860160208601613eef565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600081518084526020808501808196508360051b8101915082860160005b85811015613fa5578284038952613f93848351613f13565b98850198935090840190600101613f7b565b5091979650505050505050565b602081526000611c716020830184613f5d565b60008060008060808587031215613fdb57600080fd5b84359350613feb60208601613c11565b925060408501359150606085013567ffffffffffffffff81111561400e57600080fd5b613ee387828801613b74565b602081526000611c716020830184613f13565b60008060006060848603121561404257600080fd5b833567ffffffffffffffff8082111561405a57600080fd5b61406687838801613d01565b9450602086013591508082111561407c57600080fd5b5061408986828701613d67565b92505061409860408501613c11565b90509250925092565b6000602082840312156140b357600080fd5b5035919050565b600080602083850312156140cd57600080fd5b823567ffffffffffffffff808211156140e557600080fd5b818501915085601f8301126140f957600080fd5b81358181111561410857600080fd5b8660208260051b850101111561411d57600080fd5b60209290920196919550909350505050565b60008060006040848603121561414457600080fd5b83359250602084013567ffffffffffffffff81111561416257600080fd5b61416e86828701613c3a565b9497909650939450505050565b6000806040838503121561418e57600080fd5b823567ffffffffffffffff808211156141a657600080fd5b6141b286838701613d01565b935060208501359150808211156141c857600080fd5b50613c0785828601613d67565b6000602082840312156141e757600080fd5b611c7182613c11565b60006020828403121561420257600080fd5b813567ffffffffffffffff81111561421957600080fd5b610cec84828501613d01565b8385823760609290921b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016919092019081526014810191909152603401919050565b6000825161427a818460208701613eef565b9190910192915050565b828152604060208201526000610cec6040830184613f13565b6000602082840312156142af57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b606080825284519082018190526000906020906080840190828801845b8281101561431e57815184529284019290840190600101614302565b505050838103828501526143328187613f5d565b9250505073ffffffffffffffffffffffffffffffffffffffff83166040830152949350505050565b84815273ffffffffffffffffffffffffffffffffffffffff841660208201528260408201526080606082015260006130526080830184613f13565b6000602082840312156143a757600080fd5b815167ffffffffffffffff8111156143be57600080fd5b8201601f810184136143cf57600080fd5b80516143dd613b9382613b2e565b8181528560208385010111156143f257600080fd5b612057826020830160208601613eef565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261446757600080fd5b83018035915067ffffffffffffffff82111561448257600080fd5b602001915036819003821315611cb657600080fd5b8183823760009101908152919050565b6000815160208301517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000808216935060148310156144ef5780818460140360031b1b83161693505b505050919050565b60408152600061450a6040830185613f13565b82810360208401526120578185613f13565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60408152600061457960408301858761451c565b82810360208401526130528185613f13565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152600061305260608301848661451c565b6000602082840312156145d357600080fd5b8151611c7181613a65565b8215158152604060208201526000610cec6040830184613f13565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008560601b16815283601482015281836034830137600091016034019081529392505050565b600181811c9082168061465357607f821691505b6020821081036118ba577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b601f821115610f1457600081815260208120601f850160051c810160208610156146b35750805b601f850160051c820191505b818110156146d2578281556001016146bf565b505050505050565b815167ffffffffffffffff8111156146f4576146f4613ab0565b61470881614702845461463f565b8461468c565b602080601f83116001811461475b57600084156147255750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556146d2565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156147a857888601518255948401946001909101908401614789565b50858210156147e457878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b83815260406020820152600061205760408301848661451c565b60008451614820818460208901613eef565b60609490941b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001691909301908152601481019190915260340192915050565b805160208083015191908110156118ba577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610671576106716148a2565b6000815160208301517fffffffff00000000000000000000000000000000000000000000000000000000808216935060048310156144ef5760049290920360031b82901b161692915050565b81810381811115610671576106716148a256fea26469706673582212204c716f85d1145bcbe75de9c2eb2914430942e4f65ea5e7afda664b1551460c7f64736f6c63430008110033 +``` + +## Universal Profile Init Post Deployment Module Source Code + +This is an exact copy of the code of the [`UniversalProfileInitPostDeploymentModule` smart contract]. + +- The source code is generated with `solc` compiler version `0.8.17` and with `9999999` optimization runs. +- The imported contracts are part of the `4.9.2` version of the `@openzeppelin/contracts` package. +- Navigate to [lsp-smart-contract](https://github.com/lukso-network/lsp-smart-contracts) repo and checkout to `b8eca3c5696acf85239130ef67edec9e8c134bfa` commit to obtain the exact copy of the code, change the compiler settings in `hardhat.config.ts` and compile to produce the same bytecode. + +```solidity +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +import { OPERATION_4_DELEGATECALL } from "@erc725/smart-contracts/contracts/constants.sol"; + +import { UniversalProfileInit } from "../../UniversalProfileInit.sol"; + +contract UniversalProfileInitPostDeploymentModule is UniversalProfileInit { + constructor() { + _disableInitializers(); + } + + function setDataAndTransferOwnership( + bytes32[] memory dataKeys, + bytes[] memory dataValues, + address newOwner + ) public payable { + // check that the msg.sender is the owner + require( + msg.sender == owner(), + "UniversalProfileInitPostDeploymentModule: setDataAndTransferOwnership only allowed through delegate call" + ); + + // update the dataKeys and dataValues in the UniversalProfile contract + for (uint256 i = 0; i < dataKeys.length; ) { + _setData(dataKeys[i], dataValues[i]); + + unchecked { + ++i; + } + } + + // transfer the ownership of the UniversalProfile contract to the newOwner + _setOwner(newOwner); + } + + function executePostDeployment( + address universalProfile, + address keyManager, + bytes calldata setDataBatchBytes + ) public { + // retrieve the dataKeys and dataValues to setData from the initializationCalldata bytes + (bytes32[] memory dataKeys, bytes[] memory dataValues) = abi.decode( + setDataBatchBytes, + (bytes32[], bytes[]) + ); + + // call the execute function with delegate_call on the universalProfile contract to setData and transferOwnership + UniversalProfileInit(payable(universalProfile)).execute( + OPERATION_4_DELEGATECALL, + address(this), + 0, + abi.encodeWithSignature( + "setDataAndTransferOwnership(bytes32[],bytes[],address)", + dataKeys, + dataValues, + keyManager + ) + ); + } +} +``` diff --git a/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/deployment-UP-module.md b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/deployment-UP-module.md new file mode 100644 index 000000000..d046f4a4a --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP23LinkedContractsFactory/modules/deployment-UP-module.md @@ -0,0 +1,90 @@ +# Setup + +Before the deployment of the `UniversalProfilePostDeploymentModule` on any network, people should make sure that the [Nick's Factory contract](https://github.com/Arachnid/deterministic-deployment-proxy/tree/master) is deployed on the same network. +You also need to make sure that the LSP23 Linked Contracts Factory is deployed on the same network. Please refer to [LSP23 Linked Contracts Deployment Factory LIP](https://github.com/lukso-network/LIPs/LSPs/LSP-23-LinkedContractsFactory.md#lsp23linkedcontractsfactory-deployment) in order to deploy it. + +# Deployment of the Universal Profile Post Deployment Module + +## Standardized Address + +`0x0000005aD606bcFEF9Ea6D0BbE5b79847054BcD7` + +## Standardized Salt + +`0x42ff55d7957589c62da54a4368b10a2bc549f2038bbb6880ec6b3e0ecae2ba58 ` + +## Standardized Bytecode + +```solidity +0x60806040523480156200001157600080fd5b5060008034156200004a57604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b6200006081620000b060201b620019381760201c565b506040805180820190915260048152635ef83ad960e01b6020820152620000a9907feafec4d89fa9619884b600005ef83ad9559033e6e941db7d7c495acdce6163479062000117565b50620004a4565b6000546001600160a01b038281169116146200011457600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a3505b50565b600082815260016020526040902062000131828262000360565b50817fece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b26101008351111562000181576200017b8360006101006200019e60201b620019cf1760201c565b62000183565b825b6040516200019291906200042c565b60405180910390a25050565b606081620001ae81601f6200047c565b1015620001f35760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064015b60405180910390fd5b620001ff82846200047c565b84511015620002455760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401620001ea565b606082158015620002665760405191506000825260208201604052620002b2565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015620002a157805183526020928301920162000287565b5050858452601f01601f1916604052505b50949350505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620002e657607f821691505b6020821081036200030757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200035b57600081815260208120601f850160051c81016020861015620003365750805b601f850160051c820191505b81811015620003575782815560010162000342565b5050505b505050565b81516001600160401b038111156200037c576200037c620002bb565b62000394816200038d8454620002d1565b846200030d565b602080601f831160018114620003cc5760008415620003b35750858301515b600019600386901b1c1916600185901b17855562000357565b600085815260208120601f198616915b82811015620003fd57888601518255948401946001909101908401620003dc565b50858210156200041c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208083528351808285015260005b818110156200045b578581018301518582016040015282016200043d565b506000604082860101526040601f19601f8301168501019250505092915050565b808201808211156200049e57634e487b7160e01b600052601160045260246000fd5b92915050565b61457880620004b46000396000f3fe6080604052600436106101485760003560e01c80636bb56a14116100c05780639790242111610074578063e30c397811610059578063e30c39781461041d578063ead3fbdf146101f2578063f2fde38b1461044857610183565b806397902421146103ea578063dedff9c6146103fd57610183565b806379ba5097116100a557806379ba5097146103765780637f23690c1461038b5780638da5cb5b1461039e57610183565b80636bb56a141461034e578063715018a61461036157610183565b806331858452116101175780634f04d60a116100fc5780634f04d60a146102fb57806354f6127f1461030e5780636963d4381461032e57610183565b806331858452146102bb57806344c028fe146102db57610183565b806301bfba61146101f257806301ffc9a71461021a5780631626ba7e1461024a57806328c4d14e1461029b57610183565b3661018357341561018157604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b005b600036606034156101bc57604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b60043610156101da57506040805160208101909152600081526101e7565b6101e48383610468565b90505b915050805190602001f35b3480156101fe57600080fd5b5061020760c881565b6040519081526020015b60405180910390f35b34801561022657600080fd5b5061023a610235366004613692565b610643565b6040519015158152602001610211565b34801561025657600080fd5b5061026a6102653660046137c9565b6107d8565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610211565b3480156102a757600080fd5b506101816102b636600461387b565b610aa9565b6102ce6102c93660046139e6565b610c10565b6040516102119190613bb1565b6102ee6102e9366004613bc4565b610cd4565b6040516102119190613c19565b610181610309366004613c2c565b610d6f565b34801561031a57600080fd5b506102ee610329366004613ca0565b610ec1565b34801561033a57600080fd5b506102ce610349366004613cb9565b610ecc565b6102ee61035c366004613d2e565b611042565b34801561036d57600080fd5b5061018161124a565b34801561038257600080fd5b5061018161133c565b6101816103993660046137c9565b611440565b3480156103aa57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610211565b6101816103f8366004613d7a565b6114db565b34801561040957600080fd5b506102ce610418366004613dd4565b611604565b34801561042957600080fd5b5060035473ffffffffffffffffffffffffffffffffffffffff166103c5565b34801561045457600080fd5b50610181610463366004613e09565b6116af565b606060006104996000357fffffffff0000000000000000000000000000000000000000000000000000000016611b4b565b90506000357fffffffff00000000000000000000000000000000000000000000000000000000161580156104e1575073ffffffffffffffffffffffffffffffffffffffff8116155b156104fc57505060408051602081019091526000815261063d565b73ffffffffffffffffffffffffffffffffffffffff8116610574576040517fbb370b2b0000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000006000351660048201526024015b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff16868633346040516020016105a59493929190613e24565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526105dd91613e67565b6000604051808303816000865af19150503d806000811461061a576040519150601f19603f3d011682016040523d82523d6000602084013e61061f565b606091505b5091509150811561063457925061063d915050565b80518060208301fd5b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f1626ba7e0000000000000000000000000000000000000000000000000000000014806106d657507fffffffff0000000000000000000000000000000000000000000000000000000082167f24871b3d00000000000000000000000000000000000000000000000000000000145b8061072257507fffffffff0000000000000000000000000000000000000000000000000000000082167f6bb56a1400000000000000000000000000000000000000000000000000000000145b8061076e57507fffffffff0000000000000000000000000000000000000000000000000000000082167f94be599900000000000000000000000000000000000000000000000000000000145b806107ba57507fffffffff0000000000000000000000000000000000000000000000000000000082167f1a0eb6a500000000000000000000000000000000000000000000000000000000145b806107c957506107c982611bbb565b8061063d575061063d82611c11565b6000806107fa60005473ffffffffffffffffffffffffffffffffffffffff1690565b905073ffffffffffffffffffffffffffffffffffffffff81163b156109c6576000808273ffffffffffffffffffffffffffffffffffffffff16631626ba7e60e01b878760405160240161084e929190613e83565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516108d79190613e67565b600060405180830381855afa9150503d8060008114610912576040519150601f19603f3d011682016040523d82523d6000602084013e610917565b606091505b5091509150600082801561092c575081516020145b801561096c575081517f1626ba7e000000000000000000000000000000000000000000000000000000009061096a9084016020908101908501613e9c565b145b905080610999577fffffffff000000000000000000000000000000000000000000000000000000006109bb565b7f1626ba7e000000000000000000000000000000000000000000000000000000005b94505050505061063d565b6000806109d38686611c6d565b909250905060008160048111156109ec576109ec613eb5565b14610a1d57507fffffffff00000000000000000000000000000000000000000000000000000000925061063d915050565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610a76577fffffffff00000000000000000000000000000000000000000000000000000000610a98565b7f1626ba7e000000000000000000000000000000000000000000000000000000005b935050505061063d565b5092915050565b600080610ab883850185613d7a565b915091508573ffffffffffffffffffffffffffffffffffffffff166344c028fe600430600086868b604051602401610af293929190613ee4565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f4f04d60a000000000000000000000000000000000000000000000000000000001790525160e086901b7fffffffff00000000000000000000000000000000000000000000000000000000168152610ba29493929190600401613f59565b6000604051808303816000875af1158015610bc1573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610c079190810190613f94565b50505050505050565b60603415610c4657604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b60005473ffffffffffffffffffffffffffffffffffffffff1633819003610c7b57610c7386868686611cb2565b915050610ccc565b6000610c8682611e42565b90506000610c9688888888611cb2565b90508115610cc757610cc78382604051602001610cb39190613bb1565b604051602081830303815290604052612055565b925050505b949350505050565b60603415610d0a57604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b60005473ffffffffffffffffffffffffffffffffffffffff1633819003610d3757610c7386868686612228565b6000610d4282611e42565b90506000610d5288888888612228565b90508115610cc757610cc78382604051602001610cb39190613c19565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152606860248201527f556e6976657273616c50726f66696c65496e6974506f73744465706c6f796d6560448201527f6e744d6f64756c653a2073657444617461416e645472616e736665724f776e6560648201527f7273686970206f6e6c7920616c6c6f776564207468726f7567682064656c656760848201527f6174652063616c6c00000000000000000000000000000000000000000000000060a482015260c40161056b565b60005b8351811015610eb257610eaa848281518110610e8357610e83614002565b6020026020010151848381518110610e9d57610e9d614002565b60200260200101516123ca565b600101610e65565b50610ebc81611938565b505050565b606061063d8261243e565b60608167ffffffffffffffff811115610ee757610ee76136af565b604051908082528060200260200182016040528015610f1a57816020015b6060815260200190600190039081610f055790505b50905060005b82811015610aa25760008030868685818110610f3e57610f3e614002565b9050602002810190610f509190614031565b604051610f5e929190614096565b600060405180830381855af49150503d8060008114610f99576040519150601f19603f3d011682016040523d82523d6000602084013e610f9e565b606091505b50915091508161101a57805115610fb85780518082602001fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4c5350303a20626174636843616c6c7320726576657274656400000000000000604482015260640161056b565b8084848151811061102d5761102d614002565b60209081029190910101525050600101610f20565b6060341561107857604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b60006110a37f0cfc51aec37c55a4d0b1a65c6255c4bf2fbdf6277f3cc0730c45b828b6db8b4761243e565b9050606060148251106111185760006110bb836140a6565b60601c90506110ea817f6bb56a14000000000000000000000000000000000000000000000000000000006124e0565b156111165761111373ffffffffffffffffffffffffffffffffffffffff821688888833346125af565b91505b505b60006111447f0cfc51aec37c55a4d0b1000000000000000000000000000000000000000000008861274f565b905060006111518261243e565b9050606060148251106111c6576000611169836140a6565b60601c9050611198817f6bb56a14000000000000000000000000000000000000000000000000000000006124e0565b156111c4576111c173ffffffffffffffffffffffffffffffffffffffff82168b8b8b33346125af565b91505b505b83816040516020016111d99291906140f6565b604051602081830303815290604052955088343373ffffffffffffffffffffffffffffffffffffffff167f9c3ba68eb5742b8e3961aea0afc7371a71bf433c8a67a831803b64c064a178c28b8b8b60405161123693929190614164565b60405180910390a450505050509392505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633819003611276576112736127cb565b50565b600061128182611e42565b905060006112a460005473ffffffffffffffffffffffffffffffffffffffff1690565b90506112ae6127cb565b60005473ffffffffffffffffffffffffffffffffffffffff1661131d5760408051602081019091526000815261131d9073ffffffffffffffffffffffffffffffffffffffff8316907fa4e59c931d14f7c8a7a35027f92ee40b5f2886b9fdcdb78f30bc5ecce5a2f81490612907565b8115610ebc57610ebc8360405180602001604052806000815250612055565b60035474010000000000000000000000000000000000000000900460ff1615611391576040517f5758dd0700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005473ffffffffffffffffffffffffffffffffffffffff166113b26129ef565b6040805160208101909152600081526114049073ffffffffffffffffffffffffffffffffffffffff8316907fa4e59c931d14f7c8a7a35027f92ee40b5f2886b9fdcdb78f30bc5ecce5a2f81490612907565b6040805160208101909152600081526112739033907fceca317f109c43507871523e82dc2a3cc64dfa18f12da0b6db14f6e23f99553890612907565b341561147457604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b60005473ffffffffffffffffffffffffffffffffffffffff163381900361149f57610ebc83836123ca565b60006114aa82611e42565b90506114b684846123ca565b80156114d5576114d58260405180602001604052806000815250612055565b50505050565b341561150f57604051349033907f7e71433ddf847725166244795048ecf3e3f9f35628254ecbf73605666423349390600090a35b805182511461154a576040517f3bcc897900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005473ffffffffffffffffffffffffffffffffffffffff16338190036115945760005b83518110156114d55761158c848281518110610e8357610e83614002565b60010161156e565b600061159f82611e42565b905060005b84518110156115e4576115dc8582815181106115c2576115c2614002565b6020026020010151858381518110610e9d57610e9d614002565b6001016115a4565b5080156114d5576114d58260405180602001604052806000815250612055565b6060815167ffffffffffffffff811115611620576116206136af565b60405190808252806020026020018201604052801561165357816020015b606081526020019060019003908161163e5790505b50905060005b82518110156116a95761168483828151811061167757611677614002565b602002602001015161243e565b82828151811061169657611696614002565b6020908102919091010152600101611659565b50919050565b60005473ffffffffffffffffffffffffffffffffffffffff16338190036117f057600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000017905561171882612ac9565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a36040805160208101909152600081526117c49073ffffffffffffffffffffffffffffffffffffffff8416907fe17117c9d2665d1dbeb479ed8058bbebde3c50ac50e2e65619f60006caac692690612907565b600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690555050565b60006117fb82611e42565b600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055905061184583612ac9565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a36040805160208101909152600081526118f19073ffffffffffffffffffffffffffffffffffffffff8516907fe17117c9d2665d1dbeb479ed8058bbebde3c50ac50e2e65619f60006caac692690612907565b600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690558015610ebc57610ebc8260405180602001604052806000815250612055565b60005473ffffffffffffffffffffffffffffffffffffffff828116911614611273576000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060816119dd81601f6141b9565b1015611a45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015260640161056b565b611a4f82846141b9565b84511015611ab9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e6473000000000000000000000000000000604482015260640161056b565b606082158015611ad85760405191506000825260208201604052611b40565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015611b11578051835260209283019201611af9565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b5090505b9392505050565b600080611b9a7fcee78b4094da86011096000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000851661274f565b90506000611ba78261243e565b611bb0906140a6565b60601c949350505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fa918fa6b00000000000000000000000000000000000000000000000000000000148061063d575061063d82612b64565b600080611c3d7f01ffc9a700000000000000000000000000000000000000000000000000000000611b4b565b905073ffffffffffffffffffffffffffffffffffffffff8116611c635750600092915050565b611b4481846124e0565b6000808251604103611ca35760208301516040840151606085015160001a611c9787828585612bba565b94509450505050611cab565b506000905060025b9250929050565b606083518551141580611cd3575082518451141580611cd357508151835114155b15611d0a576040517f3ff55f4d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8451600003611d45576040517fe9ad2b5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000855167ffffffffffffffff811115611d6157611d616136af565b604051908082528060200260200182016040528015611d9457816020015b6060815260200190600190039081611d7f5790505b50905060005b8651811015611e3857611e13878281518110611db857611db8614002565b6020026020010151878381518110611dd257611dd2614002565b6020026020010151878481518110611dec57611dec614002565b6020026020010151878581518110611e0657611e06614002565b6020026020010151612228565b828281518110611e2557611e25614002565b6020908102919091010152600101611d9a565b5095945050505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff16639bf04b1160e01b3334600036604051602401611e7e94939291906141cc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051611f079190613e67565b6000604051808303816000865af19150503d8060008114611f44576040519150601f19603f3d011682016040523d82523d6000602084013e611f49565b606091505b5091509150611f5a60008383612ca9565b600081806020019051810190611f709190614202565b90507fffffff000000000000000000000000000000000000000000000000000000000081167f9bf04b000000000000000000000000000000000000000000000000000000000014611ff2576000826040517fd088ec4000000000000000000000000000000000000000000000000000000000815260040161056b92919061421f565b7f01000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000600383901a60f81b161461204957600061204c565b60015b95945050505050565b6000808373ffffffffffffffffffffffffffffffffffffffff1663d3fc45d360e01b333460003660405160200161208f949392919061423a565b60405160208183030381529060405280519060200120856040516024016120b7929190613e83565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516121409190613e67565b6000604051808303816000865af19150503d806000811461217d576040519150601f19603f3d011682016040523d82523d6000602084013e612182565b606091505b509150915061219360018383612ca9565b80517fd3fc45d300000000000000000000000000000000000000000000000000000000906121ca9083016020908101908401614202565b7fffffffff0000000000000000000000000000000000000000000000000000000016146114d5576001816040517fd088ec4000000000000000000000000000000000000000000000000000000000815260040161056b92919061421f565b6060846122415761223a848484612d32565b9050610ccc565b600185036122a15773ffffffffffffffffffffffffffffffffffffffff841615612297576040517f3041824a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61223a8383612ea9565b600285036123015773ffffffffffffffffffffffffffffffffffffffff8416156122f7576040517f3041824a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61223a8383613022565b6003850361234b578215612341576040517f72f2bc6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61223a8483613145565b6004850361239557821561238b576040517f5ac8313500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61223a848361326d565b6040517f7583b3bc0000000000000000000000000000000000000000000000000000000081526004810186905260240161056b565b60008281526001602052604090206123e2828261431b565b50817fece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2610100835111156124235761241e8360006101006119cf565b612425565b825b6040516124329190613c19565b60405180910390a25050565b600081815260016020526040902080546060919061245b90614280565b80601f016020809104026020016040519081016040528092919081815260200182805461248790614280565b80156124d45780601f106124a9576101008083540402835291602001916124d4565b820191906000526020600020905b8154815290600101906020018083116124b757829003601f168201915b50505050509050919050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015612598575060208210155b80156125a45750600081115b979650505050505050565b60606000636bb56a1460e01b8787876040516024016125d093929190614435565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909516949094179093525161265d92879187910161444f565b60405160208183030381529060405290506000808973ffffffffffffffffffffffffffffffffffffffff16836040516126969190613e67565b6000604051808303816000865af19150503d80600081146126d3576040519150601f19603f3d011682016040523d82523d6000602084013e6126d8565b606091505b509150915061271d82826040518060400160405280602081526020017f43616c6c20746f20756e6976657273616c5265636569766572206661696c656481525061334b565b50805160000361272d5780612741565b808060200190518101906127419190613f94565b9a9950505050505050505050565b604080517fffffffffffffffffffff00000000000000000000000000000000000000000000841660208201526000602a82018190527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008416602c83015291829101604051602081830303815290604052905080610ccc906144a1565b60025443906000906127df9060c8906141b9565b905060006127ee60c8836141b9565b9050808311806127fe5750600254155b1561285e576002839055600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556040517f81b7f830f1f0084db6497c486cbe6974c86488dcc4e3738eab94ab6d6b1653e790600090a1505050565b818310156128a2576040517f8b9bf507000000000000000000000000000000000000000000000000000000008152600481018390526024810182905260440161056b565b6128ac6000611938565b60006002819055600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556040517fd1f66c3d2bc1993a86be5e3d33709d98f0442381befcedd29f578b9b2506b1ce9190a1505050565b612931837f6bb56a14000000000000000000000000000000000000000000000000000000006124e0565b15610ebc576040517f6bb56a1400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690636bb56a149061298a9085908590600401613e83565b6000604051808303816000875af11580156129a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526114d59190810190613f94565b60035473ffffffffffffffffffffffffffffffffffffffff163314612a96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4c535031343a2063616c6c6572206973206e6f74207468652070656e64696e6760448201527f4f776e6572000000000000000000000000000000000000000000000000000000606482015260840161056b565b612a9f33611938565b600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b3073ffffffffffffffffffffffffffffffffffffffff821603612b18576040517f43b248cd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790556000600255565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f629aa69400000000000000000000000000000000000000000000000000000000148061063d575061063d82613364565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612bf15750600090506003612ca0565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612c45573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116612c9957600060019250925050612ca0565b9150600090505b94509492505050565b81612cb857612cb883826133fb565b602081511080612cf7575060006020612cd0836144a1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000911b1614155b15610ebc5782816040517fd088ec4000000000000000000000000000000000000000000000000000000000815260040161056b92919061421f565b606082471015612d77576040517f0df9a8f80000000000000000000000000000000000000000000000000000000081524760048201526024810184905260440161056b565b8273ffffffffffffffffffffffffffffffffffffffff851660007f4810874456b8e6487bd861375cf6abd8e1c8bb5858c8ce36a86a04dabfac199e612dbb866144e3565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200160405180910390a46000808573ffffffffffffffffffffffffffffffffffffffff168585604051612e189190613e67565b60006040518083038185875af1925050503d8060008114612e55576040519150601f19603f3d011682016040523d82523d6000602084013e612e5a565b606091505b5091509150612e9f82826040518060400160405280601681526020017f455243373235583a20556e6b6e6f776e204572726f720000000000000000000081525061334b565b9695505050505050565b606082471015612eee576040517f0df9a8f80000000000000000000000000000000000000000000000000000000081524760048201526024810184905260440161056b565b8151600003612f29576040517fb81cd8d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082516020840185f0905073ffffffffffffffffffffffffffffffffffffffff8116612f82576040517f0b07489b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838173ffffffffffffffffffffffffffffffffffffffff1660017fa1fb700aaee2ae4a2ff6f91ce7eba292f89c2f5488b8ec4c5c5c8150692595c36000801b604051612fd091815260200190565b60405180910390a46040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606083901b16602082015260340160405160208183030381529060405291505092915050565b6060815160000361305f576040517fb81cd8d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006130788360208551613073919061452f565b613441565b9050600061309584600060208751613090919061452f565b6119cf565b905060006130a48684846134c1565b9050858173ffffffffffffffffffffffffffffffffffffffff1660027fa1fb700aaee2ae4a2ff6f91ce7eba292f89c2f5488b8ec4c5c5c8150692595c3866040516130f191815260200190565b60405180910390a46040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606083901b166020820152603401604051602081830303815290604052935050505092915050565b6060600073ffffffffffffffffffffffffffffffffffffffff841660037f4810874456b8e6487bd861375cf6abd8e1c8bb5858c8ce36a86a04dabfac199e61318c866144e3565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200160405180910390a46000808473ffffffffffffffffffffffffffffffffffffffff16846040516131e89190613e67565b600060405180830381855afa9150503d8060008114613223576040519150601f19603f3d011682016040523d82523d6000602084013e613228565b606091505b509150915061204c82826040518060400160405280601681526020017f455243373235583a20556e6b6e6f776e204572726f720000000000000000000081525061334b565b6060600073ffffffffffffffffffffffffffffffffffffffff841660047f4810874456b8e6487bd861375cf6abd8e1c8bb5858c8ce36a86a04dabfac199e6132b4866144e3565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200160405180910390a46000808473ffffffffffffffffffffffffffffffffffffffff16846040516133109190613e67565b600060405180830381855af49150503d8060008114613223576040519150601f19603f3d011682016040523d82523d6000602084013e613228565b6060831561335a575081611b44565b611b448383613620565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7545acac00000000000000000000000000000000000000000000000000000000148061063d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461063d565b80511561340b5780518082602001fd5b6040517f8c6a8ae3000000000000000000000000000000000000000000000000000000008152821515600482015260240161056b565b600061344e8260206141b9565b835110156134b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f746f427974657333325f6f75744f66426f756e64730000000000000000000000604482015260640161056b565b50016020015190565b60008347101561352d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e6365000000604482015260640161056b565b8151600003613598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f604482015260640161056b565b8282516020840186f5905073ffffffffffffffffffffffffffffffffffffffff8116611b44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f7900000000000000604482015260640161056b565b8151156136305781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056b9190613c19565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461127357600080fd5b6000602082840312156136a457600080fd5b8135611b4481613664565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613725576137256136af565b604052919050565b600067ffffffffffffffff821115613747576137476136af565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261378457600080fd5b81356137976137928261372d565b6136de565b8181528460208386010111156137ac57600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156137dc57600080fd5b82359150602083013567ffffffffffffffff8111156137fa57600080fd5b61380685828601613773565b9150509250929050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461383457600080fd5b919050565b60008083601f84011261384b57600080fd5b50813567ffffffffffffffff81111561386357600080fd5b602083019150836020828501011115611cab57600080fd5b6000806000806060858703121561389157600080fd5b61389a85613810565b93506138a860208601613810565b9250604085013567ffffffffffffffff8111156138c457600080fd5b6138d087828801613839565b95989497509550505050565b600067ffffffffffffffff8211156138f6576138f66136af565b5060051b60200190565b600082601f83011261391157600080fd5b81356020613921613792836138dc565b82815260059290921b8401810191818101908684111561394057600080fd5b8286015b8481101561395b5780358352918301918301613944565b509695505050505050565b600082601f83011261397757600080fd5b81356020613987613792836138dc565b82815260059290921b840181019181810190868411156139a657600080fd5b8286015b8481101561395b57803567ffffffffffffffff8111156139ca5760008081fd5b6139d88986838b0101613773565b8452509183019183016139aa565b600080600080608085870312156139fc57600080fd5b843567ffffffffffffffff80821115613a1457600080fd5b613a2088838901613900565b9550602091508187013581811115613a3757600080fd5b8701601f81018913613a4857600080fd5b8035613a56613792826138dc565b81815260059190911b8201840190848101908b831115613a7557600080fd5b928501925b82841015613a9a57613a8b84613810565b82529285019290850190613a7a565b97505050506040870135915080821115613ab357600080fd5b613abf88838901613900565b93506060870135915080821115613ad557600080fd5b50613ae287828801613966565b91505092959194509250565b60005b83811015613b09578181015183820152602001613af1565b50506000910152565b60008151808452613b2a816020860160208601613aee565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600081518084526020808501808196508360051b8101915082860160005b85811015613ba4578284038952613b92848351613b12565b98850198935090840190600101613b7a565b5091979650505050505050565b602081526000611b446020830184613b5c565b60008060008060808587031215613bda57600080fd5b84359350613bea60208601613810565b925060408501359150606085013567ffffffffffffffff811115613c0d57600080fd5b613ae287828801613773565b602081526000611b446020830184613b12565b600080600060608486031215613c4157600080fd5b833567ffffffffffffffff80821115613c5957600080fd5b613c6587838801613900565b94506020860135915080821115613c7b57600080fd5b50613c8886828701613966565b925050613c9760408501613810565b90509250925092565b600060208284031215613cb257600080fd5b5035919050565b60008060208385031215613ccc57600080fd5b823567ffffffffffffffff80821115613ce457600080fd5b818501915085601f830112613cf857600080fd5b813581811115613d0757600080fd5b8660208260051b8501011115613d1c57600080fd5b60209290920196919550909350505050565b600080600060408486031215613d4357600080fd5b83359250602084013567ffffffffffffffff811115613d6157600080fd5b613d6d86828701613839565b9497909650939450505050565b60008060408385031215613d8d57600080fd5b823567ffffffffffffffff80821115613da557600080fd5b613db186838701613900565b93506020850135915080821115613dc757600080fd5b5061380685828601613966565b600060208284031215613de657600080fd5b813567ffffffffffffffff811115613dfd57600080fd5b610ccc84828501613900565b600060208284031215613e1b57600080fd5b611b4482613810565b8385823760609290921b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016919092019081526014810191909152603401919050565b60008251613e79818460208701613aee565b9190910192915050565b828152604060208201526000610ccc6040830184613b12565b600060208284031215613eae57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b606080825284519082018190526000906020906080840190828801845b82811015613f1d57815184529284019290840190600101613f01565b50505083810382850152613f318187613b5c565b9250505073ffffffffffffffffffffffffffffffffffffffff83166040830152949350505050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152826040820152608060608201526000612e9f6080830184613b12565b600060208284031215613fa657600080fd5b815167ffffffffffffffff811115613fbd57600080fd5b8201601f81018413613fce57600080fd5b8051613fdc6137928261372d565b818152856020838501011115613ff157600080fd5b61204c826020830160208601613aee565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261406657600080fd5b83018035915067ffffffffffffffff82111561408157600080fd5b602001915036819003821315611cab57600080fd5b8183823760009101908152919050565b6000815160208301517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000808216935060148310156140ee5780818460140360031b1b83161693505b505050919050565b6040815260006141096040830185613b12565b828103602084015261204c8185613b12565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60408152600061417860408301858761411b565b8281036020840152612e9f8185613b12565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561063d5761063d61418a565b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152606060408201526000612e9f60608301848661411b565b60006020828403121561421457600080fd5b8151611b4481613664565b8215158152604060208201526000610ccc6040830184613b12565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008560601b16815283601482015281836034830137600091016034019081529392505050565b600181811c9082168061429457607f821691505b6020821081036116a9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b601f821115610ebc57600081815260208120601f850160051c810160208610156142f45750805b601f850160051c820191505b8181101561431357828155600101614300565b505050505050565b815167ffffffffffffffff811115614335576143356136af565b614349816143438454614280565b846142cd565b602080601f83116001811461439c57600084156143665750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555614313565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156143e9578886015182559484019460019091019084016143ca565b508582101561442557878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b83815260406020820152600061204c60408301848661411b565b60008451614461818460208901613aee565b60609490941b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001691909301908152601481019190915260340192915050565b805160208083015191908110156116a9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b6000815160208301517fffffffff00000000000000000000000000000000000000000000000000000000808216935060048310156140ee5760049290920360031b82901b161692915050565b8181038181111561063d5761063d61418a56fea2646970667358221220709024acd2bc0a3533c747974ab8f11d519f7708b55eb0107adc4574f225e7d964736f6c63430008110033 +``` + +## Universal Profile Post Deployment Module Source Code + +This is an exact copy of the code of the [`UniversalProfilePostDeploymentModule` smart contract]. + +- The source code is generated with `solc` compiler version `0.8.17` and with `9999999` optimization runs. +- The imported contracts are part of the `4.9.2` version of the `@openzeppelin/contracts` package. +- Navigate to [lsp-smart-contract](https://github.com/lukso-network/lsp-smart-contracts) repo and checkout to `b8eca3c5696acf85239130ef67edec9e8c134bfa` commit to obtain the exact copy of the code, change the compiler settings in `hardhat.config.ts` and compile to produce the same bytecode. + +```solidity +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +import { OPERATION_4_DELEGATECALL } from "@erc725/smart-contracts/contracts/constants.sol"; + +import { UniversalProfile } from "../../UniversalProfile.sol"; + +contract UniversalProfilePostDeploymentModule is UniversalProfile { + constructor() UniversalProfile(address(0)) {} + + function setDataAndTransferOwnership( + bytes32[] memory dataKeys, + bytes[] memory dataValues, + address newOwner + ) public payable { + // check that the msg.sender is the owner + require( + msg.sender == owner(), + "UniversalProfilePostDeploymentModule: setDataAndTransferOwnership only allowed through delegate call" + ); + + // update the dataKeys and dataValues in the UniversalProfile contract + for (uint256 i = 0; i < dataKeys.length; ) { + _setData(dataKeys[i], dataValues[i]); + + unchecked { + ++i; + } + } + + // transfer the ownership of the UniversalProfile contract to the newOwner + _setOwner(newOwner); + } + + function executePostDeployment( + address universalProfile, + address keyManager, + bytes calldata setDataBatchBytes + ) public { + // retrieve the dataKeys and dataValues to setData from the initializationCalldata bytes + (bytes32[] memory dataKeys, bytes[] memory dataValues) = abi.decode( + setDataBatchBytes, + (bytes32[], bytes[]) + ); + + // call the execute function with delegate_call on the universalProfile contract to setData and transferOwnership + UniversalProfile(payable(universalProfile)).execute( + OPERATION_4_DELEGATECALL, + address(this), + 0, + abi.encodeWithSignature( + "setDataAndTransferOwnership(bytes32[],bytes[],address)", + dataKeys, + dataValues, + keyManager + ) + ); + } +} +``` diff --git a/packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/ILSP25ExecuteRelayCall.sol b/packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/ILSP25ExecuteRelayCall.sol new file mode 100644 index 000000000..96b6b4fc6 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/ILSP25ExecuteRelayCall.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache 2.0 +pragma solidity ^0.8.0; + +import "@lukso/lsp25-contracts/contracts/ILSP25ExecuteRelayCall.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/LSP25Constants.sol b/packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/LSP25Constants.sol new file mode 100644 index 000000000..660defe76 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/LSP25Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp25-contracts/contracts/LSP25Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/LSP25Errors.sol b/packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/LSP25Errors.sol new file mode 100644 index 000000000..98f2ee9f7 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/LSP25Errors.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp25-contracts/contracts/LSP25Errors.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol b/packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol new file mode 100644 index 000000000..6f77c265e --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp25-contracts/contracts/LSP25MultiChannelNonce.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP3ProfileMetadata/LSP3Constants.sol b/packages/lsp-smart-contracts/contracts/LSP3ProfileMetadata/LSP3Constants.sol new file mode 100644 index 000000000..44f8afdfd --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP3ProfileMetadata/LSP3Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp3-contracts/contracts/LSP3Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol b/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol new file mode 100644 index 000000000..2cf9cf500 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp4-contracts/contracts/LSP4Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol b/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol new file mode 100644 index 000000000..12f6b47a5 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp4-contracts/contracts/LSP4DigitalAssetMetadata.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataCore.sol b/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataCore.sol new file mode 100644 index 000000000..f10ae841f --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataCore.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp4-contracts/contracts/LSP4DigitalAssetMetadataCore.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol new file mode 100644 index 000000000..4040975a0 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp4-contracts/contracts/LSP4DigitalAssetMetadataInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol b/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol new file mode 100644 index 000000000..9e09cda39 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp4-contracts/contracts/LSP4Errors.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP5ReceivedAssets/LSP5Constants.sol b/packages/lsp-smart-contracts/contracts/LSP5ReceivedAssets/LSP5Constants.sol new file mode 100644 index 000000000..f72e21d65 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP5ReceivedAssets/LSP5Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp5-contracts/contracts/LSP5Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP5ReceivedAssets/LSP5Utils.sol b/packages/lsp-smart-contracts/contracts/LSP5ReceivedAssets/LSP5Utils.sol new file mode 100644 index 000000000..e6a2a4962 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP5ReceivedAssets/LSP5Utils.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp5-contracts/contracts/LSP5Utils.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP6KeyManager/ILSP6KeyManager.sol b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/ILSP6KeyManager.sol new file mode 100644 index 000000000..92ba02e8e --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/ILSP6KeyManager.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp6-contracts/contracts/ILSP6KeyManager.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Constants.sol b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Constants.sol new file mode 100644 index 000000000..ae7cea264 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp6-contracts/contracts/LSP6Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Errors.sol b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Errors.sol new file mode 100644 index 000000000..81976ef36 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Errors.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp6-contracts/contracts/LSP6Errors.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol new file mode 100644 index 000000000..68d156bef --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.5; + +import "@lukso/lsp6-contracts/contracts/LSP6KeyManager.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol new file mode 100644 index 000000000..827d7d211 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.5; + +import "@lukso/lsp6-contracts/contracts/LSP6KeyManagerCore.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol new file mode 100644 index 000000000..014ca1844 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.5; + +import "@lukso/lsp6-contracts/contracts/LSP6KeyManagerInit.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol new file mode 100644 index 000000000..4cc758c98 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.5; + +import "@lukso/lsp6-contracts/contracts/LSP6KeyManagerInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol new file mode 100644 index 000000000..a7136791d --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.5; + +import "@lukso/lsp6-contracts/contracts/LSP6Modules/LSP6ExecuteModule.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteRelayCallModule.sol b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteRelayCallModule.sol new file mode 100644 index 000000000..816d696d5 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteRelayCallModule.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.5; + +import "@lukso/lsp6-contracts/contracts/LSP6Modules/LSP6ExecuteRelayCallModule.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6OwnershipModule.sol b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6OwnershipModule.sol new file mode 100644 index 000000000..2a6b0b44f --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6OwnershipModule.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.5; + +import "@lukso/lsp6-contracts/contracts/LSP6Modules/LSP6OwnershipModule.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol new file mode 100644 index 000000000..329c25b86 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.5; + +import "@lukso/lsp6-contracts/contracts/LSP6Modules/LSP6SetDataModule.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Utils.sol b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Utils.sol new file mode 100644 index 000000000..1b6bbd0fe --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6Utils.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp6-contracts/contracts/LSP6Utils.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol new file mode 100644 index 000000000..1ccad2701 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/ILSP7DigitalAsset.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7Constants.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7Constants.sol new file mode 100644 index 000000000..9ebc74a5c --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/LSP7Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol new file mode 100644 index 000000000..a8c32db1f --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/LSP7DigitalAsset.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol new file mode 100644 index 000000000..8a888e9ea --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/LSP7DigitalAssetCore.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol new file mode 100644 index 000000000..e8e32e8da --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/LSP7DigitalAssetInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7Errors.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7Errors.sol new file mode 100644 index 000000000..ee111d7e5 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/LSP7Errors.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/LSP7Errors.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol new file mode 100644 index 000000000..e63ba46c3 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/extensions/LSP7Burnable.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol new file mode 100644 index 000000000..e9fa18b3b --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/extensions/LSP7BurnableInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol new file mode 100644 index 000000000..7514dc4cf --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/extensions/LSP7CappedSupply.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol new file mode 100644 index 000000000..9bfe846f9 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/extensions/LSP7CappedSupplyInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol new file mode 100644 index 000000000..7510435be --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/presets/ILSP7Mintable.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol new file mode 100644 index 000000000..1082b0cda --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/presets/LSP7Mintable.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol new file mode 100644 index 000000000..2ec70c86c --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/presets/LSP7MintableInit.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol new file mode 100644 index 000000000..63ff5f63a --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp7-contracts/contracts/presets/LSP7MintableInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol new file mode 100644 index 000000000..b7b3c68f5 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp8-contracts/contracts/ILSP8IdentifiableDigitalAsset.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol new file mode 100644 index 000000000..383060c98 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp8-contracts/contracts/LSP8Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol new file mode 100644 index 000000000..5305923ed --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp8-contracts/contracts/LSP8Errors.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol new file mode 100644 index 000000000..cababdd31 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp8-contracts/contracts/LSP8IdentifiableDigitalAsset.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol new file mode 100644 index 000000000..41b3df98e --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp8-contracts/contracts/LSP8IdentifiableDigitalAssetCore.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol new file mode 100644 index 000000000..87de808ab --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp8-contracts/contracts/LSP8IdentifiableDigitalAssetInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol new file mode 100644 index 000000000..147948911 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp8-contracts/contracts/extensions/LSP8Burnable.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8BurnableInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8BurnableInitAbstract.sol new file mode 100644 index 000000000..8c1d6733d --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8BurnableInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp8-contracts/contracts/extensions/LSP8BurnableInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol new file mode 100644 index 000000000..02cf69e4f --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp8-contracts/contracts/extensions/LSP8CappedSupply.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol new file mode 100644 index 000000000..d9fa08771 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp8-contracts/contracts/extensions/LSP8CappedSupplyInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol new file mode 100644 index 000000000..21049f210 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp8-contracts/contracts/extensions/LSP8Enumerable.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol new file mode 100644 index 000000000..c1b915ad9 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp8-contracts/contracts/extensions/LSP8EnumerableInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol new file mode 100644 index 000000000..1c63371ab --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp8-contracts/contracts/presets/ILSP8Mintable.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol new file mode 100644 index 000000000..8fcf6a3ae --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp8-contracts/contracts/presets/LSP8Mintable.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol new file mode 100644 index 000000000..cdde50dad --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp8-contracts/contracts/presets/LSP8MintableInit.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol new file mode 100644 index 000000000..33d02bef2 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import "@lukso/lsp8-contracts/contracts/presets/LSP8MintableInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP9Vault/ILSP9Vault.sol b/packages/lsp-smart-contracts/contracts/LSP9Vault/ILSP9Vault.sol new file mode 100644 index 000000000..fd5bd5506 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP9Vault/ILSP9Vault.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp9-contracts/contracts/ILSP9Vault.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9Constants.sol b/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9Constants.sol new file mode 100644 index 000000000..a2054a219 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9Constants.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp9-contracts/contracts/LSP9Constants.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9Errors.sol b/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9Errors.sol new file mode 100644 index 000000000..a1b452f25 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9Errors.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp9-contracts/contracts/LSP9Errors.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9Vault.sol b/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9Vault.sol new file mode 100644 index 000000000..aeef2dd13 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9Vault.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp9-contracts/contracts/LSP9Vault.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9VaultCore.sol b/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9VaultCore.sol new file mode 100644 index 000000000..7e6c3a360 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9VaultCore.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp9-contracts/contracts/LSP9VaultCore.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9VaultInit.sol b/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9VaultInit.sol new file mode 100644 index 000000000..7402b06bc --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9VaultInit.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp9-contracts/contracts/LSP9VaultInit.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9VaultInitAbstract.sol b/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9VaultInitAbstract.sol new file mode 100644 index 000000000..9f4ded8c3 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP9Vault/LSP9VaultInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp9-contracts/contracts/LSP9VaultInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/UniversalProfile.sol b/packages/lsp-smart-contracts/contracts/UniversalProfile.sol new file mode 100644 index 000000000..a9be238f5 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/UniversalProfile.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/universalprofile-contracts/UniversalProfile.sol"; diff --git a/packages/lsp-smart-contracts/contracts/UniversalProfileInit.sol b/packages/lsp-smart-contracts/contracts/UniversalProfileInit.sol new file mode 100644 index 000000000..e578248c0 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/UniversalProfileInit.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/universalprofile-contracts/UniversalProfileInit.sol"; diff --git a/packages/lsp-smart-contracts/contracts/UniversalProfileInitAbstract.sol b/packages/lsp-smart-contracts/contracts/UniversalProfileInitAbstract.sol new file mode 100644 index 000000000..26184033d --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/UniversalProfileInitAbstract.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/universalprofile-contracts/UniversalProfileInitAbstract.sol"; From 947a424856c8cd25b621907ed04b2db91330f202 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 07:43:20 -0700 Subject: [PATCH 11/21] test: fix Benchmark tests for ethers v6 syntax --- gas_benchmark_result.json | 204 ++++++++++++++ .../tests/Benchmark.test.ts | 250 +++++++++--------- 2 files changed, 332 insertions(+), 122 deletions(-) create mode 100644 gas_benchmark_result.json diff --git a/gas_benchmark_result.json b/gas_benchmark_result.json new file mode 100644 index 000000000..e21f05d3e --- /dev/null +++ b/gas_benchmark_result.json @@ -0,0 +1,204 @@ +{ + "deployment_costs": { + "UniversalProfile": "", + "KeyManager": "", + "LSP1DelegateUP": "", + "LSP7Mintable": "", + "LSP8Mintable": "" + }, + "runtime_costs": { + "EOA_owner": { + "execute": { + "case_1": { + "description": "Transfer 1 LYX to an EOA without data", + "gas_cost": "" + }, + "case_2": { + "description": "Transfer 1 LYX to a UP without data", + "gas_cost": "" + }, + "case_3": { + "description": "Transfer 1 LYX to an EOA with 256 bytes of data", + "gas_cost": "" + }, + "case_4": { + "description": "Transfer 1 LYX to a UP with 256 bytes of data", + "gas_cost": "" + }, + "case_5": { + "description": "Transfer 0.1 LYX to 3x EOA without data", + "gas_cost": "" + }, + "case_6": { + "description": "Transfer 0.1 LYX to 3x UP without data", + "gas_cost": "" + }, + "case_7": { + "description": "Transfer 0.1 LYX to 3x EOA with 256 bytes of data", + "gas_cost": "" + }, + "case_8": { + "description": "Transfer 0.1 LYX to 3x UPs with 256 bytes of data", + "gas_cost": "" + } + }, + "setData": { + "case_1": { + "description": "Set a 20 bytes long value", + "gas_cost": "" + }, + "case_2": { + "description": "Set a 60 bytes long value", + "gas_cost": "" + }, + "case_3": { + "description": "Set a 160 bytes long value", + "gas_cost": "" + }, + "case_4": { + "description": "Set a 300 bytes long value", + "gas_cost": "" + }, + "case_5": { + "description": "Set a 600 bytes long value", + "gas_cost": "" + }, + "case_6": { + "description": "Change the value of a data key already set", + "gas_cost": "" + }, + "case_7": { + "description": "Remove the value of a data key already set", + "gas_cost": "" + }, + "case_8": { + "description": "Set 2 data keys of 20 bytes long value", + "gas_cost": "" + }, + "case_9": { + "description": "Set 2 data keys of 100 bytes long value", + "gas_cost": "" + }, + "case_10": { + "description": "Set 3 data keys of 20 bytes long value", + "gas_cost": "" + }, + "case_11": { + "description": "Change the value of three data keys already set of 20 bytes long value", + "gas_cost": "" + }, + "case_12": { + "description": "Remove the value of three data keys already set", + "gas_cost": "" + } + }, + "tokens": { + "case_1": { + "description": "Minting a LSP7Token to a UP (No Delegate) from an EOA", + "gas_cost": "" + }, + "case_2": { + "description": "Minting a LSP7Token to an EOA from an EOA", + "gas_cost": "" + }, + "case_3": { + "description": "Transferring an LSP7Token from a UP to another UP (No Delegate)", + "gas_cost": "" + }, + "case_4": { + "description": "Minting a LSP8Token to a UP (No Delegate) from an EOA ", + "gas_cost": "" + }, + "case_5": { + "description": "Minting a LSP8Token to an EOA from an EOA ", + "gas_cost": "" + }, + "case_6": { + "description": "Transferring an LSP8Token from a UP to another UP (No Delegate)", + "gas_cost": "" + } + } + }, + "KeyManager_owner": { + "execute": { + "case_1": { + "description": "LYX transfer --> to an EOA", + "main_controller": "", + "restricted_controller": "" + }, + "case_2": { + "description": "LYX transfer --> to a UP", + "main_controller": "", + "restricted_controller": "" + }, + "case_3": { + "description": "LSP7 token transfer --> to an EOA", + "main_controller": "", + "restricted_controller": "" + }, + "case_4": { + "description": "LSP7 token transfer --> to a UP", + "main_controller": "", + "restricted_controller": "" + }, + "case_5": { + "description": "LSP8 NFT transfer --> to an EOA", + "main_controller": "", + "restricted_controller": "" + }, + "case_6": { + "description": "LSP8 NFT transfer --> to a UP", + "main_controller": "", + "restricted_controller": "" + } + }, + "setData": { + "case_1": { + "description": "Update Profile details (LSP3Profile Metadata)", + "main_controller": "", + "restricted_controller": "" + }, + "case_2": { + "description": "Add a new controller with permission to `SET_DATA` + 3x allowed data keys:
`AddressPermissions[]`
+ `AddressPermissions[index]`
+ `AddressPermissions:Permissions:`
+ `AddressPermissions:AllowedERC725YDataKeys: 1. decrease `AddressPermissions[]` Array length
2. remove the controller address at `AddressPermissions[index]`
3. set \"0x\" for the controller permissions under AddressPermissions:Permissions:", + "main_controller": "", + "restricted_controller": "" + }, + "case_5": { + "description": "Write 5x new LSP12 Issued Assets", + "main_controller": "", + "restricted_controller": "" + }, + "case_6": { + "description": "Update 3x data keys (first 3)", + "main_controller": "", + "restricted_controller": "" + }, + "case_7": { + "description": "Update 3x data keys (middle 3)", + "main_controller": "", + "restricted_controller": "" + }, + "case_8": { + "description": "Update 3x data keys (last 3)", + "main_controller": "", + "restricted_controller": "" + }, + "case_9": { + "description": "Set 2 x new data keys + add 3x new controllers", + "main_controller": "", + "restricted_controller": "" + } + } + } + } +} \ No newline at end of file diff --git a/packages/lsp-smart-contracts/tests/Benchmark.test.ts b/packages/lsp-smart-contracts/tests/Benchmark.test.ts index 157c8fbab..98f4427ed 100644 --- a/packages/lsp-smart-contracts/tests/Benchmark.test.ts +++ b/packages/lsp-smart-contracts/tests/Benchmark.test.ts @@ -11,7 +11,9 @@ import { UniversalProfile, UniversalProfile__factory, LSP6KeyManager__factory, -} from '../../../types'; + LSP8Mintable__factory, + LSP8Mintable, +} from '../types'; import { ERC725YDataKeys, INTERFACE_IDS } from '../constants'; import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; @@ -49,7 +51,7 @@ const buildLSP6TestContext = async (initialFunding?: bigint): Promise { accounts[0].address, ); - const universalProfileDeployTransaction = universalProfile.deployTransaction; + const universalProfileDeployTransaction = universalProfile.deploymentTransaction(); const universalProfileDeploymentReceipt = await universalProfileDeployTransaction.wait(); - gasBenchmark['deployment_costs']['UniversalProfile'] = - universalProfileDeploymentReceipt.gasUsed.toNumber(); + gasBenchmark['deployment_costs']['UniversalProfile'] = ethers.toNumber( + universalProfileDeploymentReceipt.gasUsed, + ); // Key Manager const keyManager = await new LSP6KeyManager__factory(accounts[0]).deploy( - universalProfile.address, + universalProfile.target, ); - const keyManagerDeployTransaction = keyManager.deployTransaction; + const keyManagerDeployTransaction = keyManager.deploymentTransaction(); const keyManagerDeploymentReceipt = await keyManagerDeployTransaction?.wait(); - gasBenchmark['deployment_costs']['KeyManager'] = - keyManagerDeploymentReceipt?.gasUsed.toNumber(); + gasBenchmark['deployment_costs']['KeyManager'] = ethers.toNumber( + keyManagerDeploymentReceipt?.gasUsed, + ); // LSP1 Delegate const lsp1Delegate = await new LSP1UniversalReceiverDelegateUP__factory(accounts[0]).deploy(); - const lsp1DelegateDeployTransaction = lsp1Delegate.deployTransaction; + const lsp1DelegateDeployTransaction = lsp1Delegate.deploymentTransaction(); const lsp1DelegateDeploymentReceipt = await lsp1DelegateDeployTransaction.wait(); - gasBenchmark['deployment_costs']['LSP1DelegateUP'] = - lsp1DelegateDeploymentReceipt.gasUsed.toNumber(); + gasBenchmark['deployment_costs']['LSP1DelegateUP'] = ethers.toNumber( + lsp1DelegateDeploymentReceipt.gasUsed, + ); // LSP7 Token (Mintable preset) const lsp7Mintable = await new LSP7Mintable__factory(accounts[0]).deploy( @@ -126,10 +131,12 @@ describe('⛽📊 Gas Benchmark', () => { false, ); - const lsp7DeployTransaction = lsp7Mintable.deployTransaction; + const lsp7DeployTransaction = lsp7Mintable.deploymentTransaction(); const lsp7DeploymentReceipt = await lsp7DeployTransaction.wait(); - gasBenchmark['deployment_costs']['LSP7Mintable'] = lsp7DeploymentReceipt.gasUsed.toNumber(); + gasBenchmark['deployment_costs']['LSP7Mintable'] = ethers.toNumber( + lsp7DeploymentReceipt.gasUsed, + ); // LSP8 NFT (Mintable preset) const lsp8Mintable = await new LSP8Mintable__factory(accounts[0]).deploy( @@ -140,10 +147,12 @@ describe('⛽📊 Gas Benchmark', () => { LSP8_TOKEN_ID_FORMAT.NUMBER, ); - const lsp8DeployTransaction = lsp8Mintable.deployTransaction; + const lsp8DeployTransaction = lsp8Mintable.deploymentTransaction(); const lsp8DeploymentReceipt = await lsp8DeployTransaction.wait(); - gasBenchmark['deployment_costs']['LSP8Mintable'] = lsp8DeploymentReceipt.gasUsed.toNumber(); + gasBenchmark['deployment_costs']['LSP8Mintable'] = ethers.toNumber( + lsp8DeploymentReceipt.gasUsed, + ); }); }); @@ -169,7 +178,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['execute']['case_1']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Transfer 1 LYX to a UP without data', async () => { @@ -185,7 +194,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['execute']['case_2']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Transfer 1 LYX to an EOA with 256 bytes of data', async () => { @@ -201,7 +210,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['execute']['case_3']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Transfer 1 LYX to a UP with 256 bytes of data', async () => { @@ -211,13 +220,13 @@ describe('⛽📊 Gas Benchmark', () => { OPERATION_TYPES.CALL, await context.universalProfile.getAddress(), ethers.parseEther('1'), - ethers.utils.hexConcat(['0x00000000', generateRandomData(252)]), + ethers.concat(['0x00000000', generateRandomData(252)]), ); const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['execute']['case_4']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); }); @@ -257,7 +266,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['execute']['case_5']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Transfer 0.1 LYX to 3x UP without data', async () => { @@ -265,7 +274,7 @@ describe('⛽📊 Gas Benchmark', () => { .connect(context.mainController) .executeBatch( [OPERATION_TYPES.CALL, OPERATION_TYPES.CALL, OPERATION_TYPES.CALL], - [universalProfile1.address, universalProfile2.address, universalProfile3.address], + [universalProfile1.target, universalProfile2.target, universalProfile3.target], [ethers.parseEther('0.1'), ethers.parseEther('0.1'), ethers.parseEther('0.1')], ['0x', '0x', '0x'], ); @@ -273,7 +282,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['execute']['case_6']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Transfer 0.1 LYX to 3x EOA with 256 bytes of data', async () => { @@ -293,20 +302,17 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['execute']['case_7']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Transfer 0.1 LYX to 3x UP with 256 bytes of data', async () => { - const random256BytesData = ethers.utils.hexConcat([ - '0x00000000', - generateRandomData(252), - ]); + const random256BytesData = ethers.concat(['0x00000000', generateRandomData(252)]); const tx = await context.universalProfile .connect(context.mainController) .executeBatch( [OPERATION_TYPES.CALL, OPERATION_TYPES.CALL, OPERATION_TYPES.CALL], - [universalProfile1.address, universalProfile2.address, universalProfile3.address], + [universalProfile1.target, universalProfile2.target, universalProfile3.target], [ethers.parseEther('0.1'), ethers.parseEther('0.1'), ethers.parseEther('0.1')], [random256BytesData, random256BytesData, random256BytesData], ); @@ -314,7 +320,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['execute']['case_8']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); }); }); @@ -334,7 +340,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['setData']['case_1']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Set a 60 bytes long value', async () => { @@ -346,7 +352,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['setData']['case_2']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Set a 160 bytes long value', async () => { @@ -358,7 +364,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['setData']['case_3']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Set a 300 bytes long value', async () => { @@ -370,7 +376,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['setData']['case_4']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Set a 600 bytes long value', async () => { @@ -382,7 +388,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['setData']['case_5']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Change the value of a data key already set', async () => { @@ -397,7 +403,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['setData']['case_6']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Remove the value of a data key already set', async () => { @@ -411,7 +417,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['setData']['case_7']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); }); @@ -432,7 +438,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['setData']['case_8']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Set 2 data keys of 100 bytes long value', async () => { @@ -447,7 +453,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['setData']['case_9']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Set 3 data keys of 20 bytes long value', async () => { @@ -468,7 +474,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['setData']['case_10']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Change the value of three data keys already set of 20 bytes long value', async () => { @@ -491,7 +497,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['setData']['case_11']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('Remove the value of three data keys already set', async () => { @@ -514,7 +520,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['setData']['case_12']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); }); }); @@ -561,7 +567,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['tokens']['case_1']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('when minting LSP7Token to a EOA without data', async () => { @@ -570,7 +576,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['tokens']['case_2']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('when transferring LSP7Token from a UP to a UP without data', async () => { @@ -584,12 +590,12 @@ describe('⛽📊 Gas Benchmark', () => { const tx = await context.universalProfile .connect(context.mainController) - .execute(OPERATION_TYPES.CALL, lsp7Token.address, 0, lsp7TransferPayload); + .execute(OPERATION_TYPES.CALL, lsp7Token.target, 0, lsp7TransferPayload); const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['tokens']['case_3']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); }); @@ -612,7 +618,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['tokens']['case_4']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('when minting LSP8Token to a EOA without data', async () => { @@ -621,7 +627,7 @@ describe('⛽📊 Gas Benchmark', () => { const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['tokens']['case_5']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); it('when transferring LSP8Token from a UP to a UP without data', async () => { @@ -635,12 +641,12 @@ describe('⛽📊 Gas Benchmark', () => { const tx = await context.universalProfile .connect(context.mainController) - .execute(OPERATION_TYPES.CALL, lsp8Token.address, 0, lsp8TransferPayload); + .execute(OPERATION_TYPES.CALL, lsp8Token.target, 0, lsp8TransferPayload); const receipt = await tx.wait(); gasBenchmark['runtime_costs']['EOA_owner']['tokens']['case_6']['gas_cost'] = - receipt.gasUsed.toNumber(); + ethers.toNumber(receipt.gasUsed); }); }); }); @@ -682,7 +688,7 @@ describe('⛽📊 Gas Benchmark', () => { await setupKeyManager( context, [ERC725YDataKeys.LSP1.LSP1UniversalReceiverDelegate], - [lsp1Delegate.address], + [await lsp1Delegate.getAddress()], ); // deploy a LSP7 token @@ -721,19 +727,19 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['execute']['case_1'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('transfers some LYXes to a UP', async () => { const lyxAmount = ethers.parseEther('3'); // prettier-ignore - const tx = await context.universalProfile.connect(context.mainController).execute(OPERATION_TYPES.CALL, aliceUP.address, lyxAmount, "0x"); + const tx = await context.universalProfile.connect(context.mainController).execute(OPERATION_TYPES.CALL, aliceUP.target, lyxAmount, "0x"); const receipt = await tx.wait(); gasBenchmark['runtime_costs']['KeyManager_owner']['execute']['case_2'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('transfers some tokens (LSP7) to an EOA (no data)', async () => { @@ -742,7 +748,7 @@ describe('⛽📊 Gas Benchmark', () => { // prettier-ignore const tx = await context.universalProfile.connect(context.mainController).execute( OPERATION_TYPES.CALL, - lsp7MetaCoin.address, + lsp7MetaCoin.target, 0, lsp7MetaCoin.interface.encodeFunctionData("transfer", [ await context.universalProfile.getAddress(), @@ -756,7 +762,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['execute']['case_3'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('transfer some tokens (LSP7) to a UP (no data)', async () => { @@ -765,11 +771,11 @@ describe('⛽📊 Gas Benchmark', () => { // prettier-ignore const tx = await context.universalProfile.connect(context.mainController).execute( OPERATION_TYPES.CALL, - lsp7MetaCoin.address, + lsp7MetaCoin.target, 0, lsp7MetaCoin.interface.encodeFunctionData("transfer", [ await context.universalProfile.getAddress(), - aliceUP.address, + aliceUP.target, tokenAmount, true, "0x", @@ -779,7 +785,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['execute']['case_4'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('transfer a NFT (LSP8) to a EOA (no data)', async () => { @@ -788,7 +794,7 @@ describe('⛽📊 Gas Benchmark', () => { // prettier-ignore const tx = await context.universalProfile.connect(context.mainController).execute( OPERATION_TYPES.CALL, - lsp8MetaNFT.address, + lsp8MetaNFT.target, 0, lsp8MetaNFT.interface.encodeFunctionData("transfer", [ await context.universalProfile.getAddress(), @@ -802,7 +808,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['execute']['case_5'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('transfer a NFT (LSP8) to a UP (no data)', async () => { @@ -811,11 +817,11 @@ describe('⛽📊 Gas Benchmark', () => { // prettier-ignore const tx = await context.universalProfile.connect(context.mainController).execute( OPERATION_TYPES.CALL, - lsp8MetaNFT.address, + lsp8MetaNFT.target, 0, lsp8MetaNFT.interface.encodeFunctionData("transfer", [ await context.universalProfile.getAddress(), - aliceUP.address, + aliceUP.target, nftId, false, "0x", @@ -825,7 +831,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['execute']['case_6'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); }); @@ -941,20 +947,20 @@ describe('⛽📊 Gas Benchmark', () => { ERC725YDataKeys.LSP6["AddressPermissions:AllowedCalls"] + canTransferTwoNFTs.address.substring(2), ], [ - lsp1Delegate.address, + await lsp1Delegate.getAddress(), PERMISSIONS.TRANSFERVALUE, PERMISSIONS.CALL, PERMISSIONS.CALL, - combineAllowedCalls([CALLTYPE.VALUE, CALLTYPE.VALUE], [allowedAddressToTransferValue, aliceUP.address], ["0xffffffff", "0xffffffff"], ["0xffffffff", "0xffffffff"]), + combineAllowedCalls([CALLTYPE.VALUE, CALLTYPE.VALUE], [allowedAddressToTransferValue, await aliceUP.getAddress()], ["0xffffffff", "0xffffffff"], ["0xffffffff", "0xffffffff"]), combineAllowedCalls( [CALLTYPE.CALL, CALLTYPE.CALL], - [lsp7MetaCoin.address, lsp7LyxDai.address], + [await lsp7MetaCoin.getAddress(), await lsp7LyxDai.getAddress()], [INTERFACE_IDS.LSP7DigitalAsset, INTERFACE_IDS.LSP7DigitalAsset], ["0xffffffff", "0xffffffff"] ), combineAllowedCalls( [CALLTYPE.CALL, CALLTYPE.CALL], - [lsp8MetaNFT.address, lsp8LyxPunks.address], + [await lsp8MetaNFT.getAddress(), await lsp8LyxPunks.getAddress()], [INTERFACE_IDS.LSP8IdentifiableDigitalAsset, INTERFACE_IDS.LSP8IdentifiableDigitalAsset], ["0xffffffff", "0xffffffff"] ) @@ -972,7 +978,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['execute']['case_1'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('transfer some LYXes to a UP - restricted to 2 x allowed address only (an EOA + a UP) (TRANSFERVALUE + 2x AllowedCalls)', async () => { @@ -981,12 +987,12 @@ describe('⛽📊 Gas Benchmark', () => { const tx = await context.universalProfile .connect(canTransferValueToOneAddress) - .execute(OPERATION_TYPES.CALL, aliceUP.address, lyxAmount, '0x'); + .execute(OPERATION_TYPES.CALL, aliceUP.target, lyxAmount, '0x'); const receipt = await tx.wait(); gasBenchmark['runtime_costs']['KeyManager_owner']['execute']['case_2'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('transfers some tokens (LSP7) to an EOA - restricted to LSP7 + 2x allowed contracts only (CALL + 2x AllowedCalls) (no data)', async () => { @@ -995,7 +1001,7 @@ describe('⛽📊 Gas Benchmark', () => { // prettier-ignore const tx = await context.universalProfile.connect(canTransferTwoTokens).execute( OPERATION_TYPES.CALL, - lsp7MetaCoin.address, + lsp7MetaCoin.target, 0, lsp7MetaCoin.interface.encodeFunctionData("transfer", [ await context.universalProfile.getAddress(), @@ -1009,7 +1015,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['execute']['case_3'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('transfers some tokens (LSP7) to an other UP - restricted to LSP7 + 2x allowed contracts only (CALL + 2x AllowedCalls) (no data)', async () => { @@ -1018,11 +1024,11 @@ describe('⛽📊 Gas Benchmark', () => { // prettier-ignore const tx = await context.universalProfile.connect(canTransferTwoTokens).execute( OPERATION_TYPES.CALL, - lsp7MetaCoin.address, + lsp7MetaCoin.target, 0, lsp7MetaCoin.interface.encodeFunctionData("transfer", [ await context.universalProfile.getAddress(), - aliceUP.address, + aliceUP.target, tokenAmount, true, "0x", @@ -1032,7 +1038,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['execute']['case_4'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('transfers a NFT (LSP8) to an EOA - restricted to LSP8 + 2x allowed contracts only (CALL + 2x AllowedCalls) (no data)', async () => { @@ -1041,7 +1047,7 @@ describe('⛽📊 Gas Benchmark', () => { // prettier-ignore const tx = await context.universalProfile.connect(canTransferTwoNFTs).execute( OPERATION_TYPES.CALL, - lsp8MetaNFT.address, + lsp8MetaNFT.target, 0, lsp8MetaNFT.interface.encodeFunctionData("transfer", [ await context.universalProfile.getAddress(), @@ -1055,7 +1061,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['execute']['case_5'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('transfers a NFT (LSP8) to an other UP - restricted to LSP8 + 2x allowed contracts only (CALL + 2x AllowedCalls) (no data)', async () => { @@ -1064,11 +1070,11 @@ describe('⛽📊 Gas Benchmark', () => { // prettier-ignore const tx = await context.universalProfile.connect(canTransferTwoNFTs).execute( OPERATION_TYPES.CALL, - lsp8MetaNFT.address, + lsp8MetaNFT.target, 0, lsp8MetaNFT.interface.encodeFunctionData("transfer", [ await context.universalProfile.getAddress(), - aliceUP.address, + aliceUP.target, nftId, false, "0x", @@ -1078,7 +1084,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['execute']['case_6'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); }); }); @@ -1123,7 +1129,7 @@ describe('⛽📊 Gas Benchmark', () => { const permissionValues = [ // Set some JSONURL for LSP3Profile metadata to test gas cost of updating your profile details '0x6f357c6a70546a2accab18748420b63c63b5af4cf710848ae83afc0c51dd8ad17fb5e8b3697066733a2f2f516d65637247656a555156587057347a53393438704e76636e51724a314b69416f4d36626466725663575a736e35', - ethers.zeroPadValue(ethers.toBigInt(3).toHexString(), 16), + ethers.zeroPadValue(ethers.toBeHex(3), 16), context.mainController.address, ]; @@ -1145,7 +1151,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_1'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it(`Give permissions to a controller @@ -1163,14 +1169,14 @@ describe('⛽📊 Gas Benchmark', () => { // prettier-ignore const dataKeys = [ ERC725YDataKeys.LSP6["AddressPermissions[]"].length, - ERC725YDataKeys.LSP6["AddressPermissions[]"].index + ethers.zeroPadValue(ethers.utils.hexStripZeros(AddressPermissionsArrayLength), 16).substring(2), + ERC725YDataKeys.LSP6["AddressPermissions[]"].index + ethers.zeroPadValue(ethers.stripZerosLeft(AddressPermissionsArrayLength), 16).substring(2), ERC725YDataKeys.LSP6["AddressPermissions:Permissions"] + newController.address.substring(2), ERC725YDataKeys.LSP6["AddressPermissions:AllowedERC725YDataKeys"] + newController.address.substring(2), ]; // prettier-ignore const dataValues = [ - ethers.zeroPadValue(ethers.toBigInt(AddressPermissionsArrayLength).add(1).toHexString(), 16), + ethers.zeroPadValue(ethers.toBeHex(ethers.toBigInt(AddressPermissionsArrayLength) + BigInt(1)), 16), newController.address, combinePermissions(PERMISSIONS.SETDATA), encodeCompactBytesArray([ @@ -1190,7 +1196,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_2'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Update permissions of previous controller. Allow it now to `SUPER_SETDATA`', async () => { @@ -1212,7 +1218,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_3'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it(`Remove a controller @@ -1230,14 +1236,14 @@ describe('⛽📊 Gas Benchmark', () => { // prettier-ignore const dataKeys = [ ERC725YDataKeys.LSP6["AddressPermissions[]"].length, - ERC725YDataKeys.LSP6["AddressPermissions[]"].index + ethers.zeroPadValue(ethers.utils.hexStripZeros(AddressPermissionsArrayLength), 16).substring(2), + ERC725YDataKeys.LSP6["AddressPermissions[]"].index + ethers.zeroPadValue(ethers.stripZerosLeft(AddressPermissionsArrayLength), 16).substring(2), ERC725YDataKeys.LSP6["AddressPermissions:Permissions"] + newController.address.substring(2), ERC725YDataKeys.LSP6["AddressPermissions:AllowedERC725YDataKeys"] + newController.address.substring(2), ]; // prettier-ignore const dataValues = [ - ethers.zeroPadValue(ethers.toBigInt(AddressPermissionsArrayLength).sub(1).toHexString(), 16), + ethers.zeroPadValue(ethers.toBeHex(ethers.toBigInt(AddressPermissionsArrayLength) - BigInt(1)), 16), "0x", "0x", "0x", @@ -1251,7 +1257,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_4'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Write 5x new LSP12 Issued Assets', async () => { @@ -1288,7 +1294,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_5'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Updates 1x data key', async () => { @@ -1303,7 +1309,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_5'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Updates 3x data keys (first x3)', async () => { @@ -1318,7 +1324,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_6'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Update 3x data keys (middle x3)', async () => { @@ -1333,7 +1339,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_7'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Update 3x data keys (last x3)', async () => { @@ -1348,20 +1354,20 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_8'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Set 2x data keys + add 3x new controllers (including setting the array length + indexes under AddressPermissions[index]) - 12 data keys in total', async () => { - const addressPermissionsArrayLength = ethers - .toBigInt( + const addressPermissionsArrayLength = ethers.toNumber( + ethers.toBigInt( await context.universalProfile.getData( ERC725YDataKeys.LSP6['AddressPermissions[]'].length, ), - ) - .toNumber(); + ), + ); const newArrayLengthUint128Hex = ethers.zeroPadValue( - ethers.toBigInt(addressPermissionsArrayLength).add(3).toHexString(), + ethers.toBeHex(ethers.toBigInt(addressPermissionsArrayLength) + BigInt(3)), 16, ); @@ -1421,7 +1427,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_9'][ 'main_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); }); @@ -1461,7 +1467,7 @@ describe('⛽📊 Gas Benchmark', () => { const permissionValues = [ // Set some JSONURL for LSP3Profile metadata to test gas cost of updating your profile details '0x6f357c6a70546a2accab18748420b63c63b5af4cf710848ae83afc0c51dd8ad17fb5e8b3697066733a2f2f516d65637247656a555156587057347a53393438704e76636e51724a314b69416f4d36626466725663575a736e35', - ethers.zeroPadValue(ethers.toBigInt(6).toHexString(), 16), + ethers.zeroPadValue(ethers.toBeHex(6), 16), context.mainController.address, PERMISSIONS.SETDATA, encodeCompactBytesArray([ @@ -1497,7 +1503,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_1'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it(`Give permissions to a controller @@ -1515,14 +1521,14 @@ describe('⛽📊 Gas Benchmark', () => { // prettier-ignore const dataKeys = [ ERC725YDataKeys.LSP6["AddressPermissions[]"].length, - ERC725YDataKeys.LSP6["AddressPermissions[]"].index + ethers.zeroPadValue(ethers.utils.hexStripZeros(AddressPermissionsArrayLength), 16).substring(2), + ERC725YDataKeys.LSP6["AddressPermissions[]"].index + ethers.zeroPadValue(ethers.stripZerosLeft(AddressPermissionsArrayLength), 16).substring(2), ERC725YDataKeys.LSP6["AddressPermissions:Permissions"] + newController.address.substring(2), ERC725YDataKeys.LSP6["AddressPermissions:AllowedERC725YDataKeys"] + newController.address.substring(2), ]; // prettier-ignore const dataValues = [ - ethers.zeroPadValue(ethers.toBigInt(AddressPermissionsArrayLength).add(1).toHexString(), 16), + ethers.zeroPadValue(ethers.toBeHex(ethers.toBigInt(AddressPermissionsArrayLength) + BigInt(1)), 16), newController.address, combinePermissions(PERMISSIONS.SETDATA), encodeCompactBytesArray([ @@ -1542,7 +1548,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_2'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Update permissions of previous controller. Allow it now to `SUPER_SETDATA`', async () => { @@ -1564,7 +1570,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_3'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it(`Remove a controller @@ -1582,14 +1588,14 @@ describe('⛽📊 Gas Benchmark', () => { // prettier-ignore const dataKeys = [ ERC725YDataKeys.LSP6["AddressPermissions[]"].length, - ERC725YDataKeys.LSP6["AddressPermissions[]"].index + ethers.zeroPadValue(ethers.toBigInt(AddressPermissionsArrayLength).sub(1).toHexString(), 16).substring(2), + ERC725YDataKeys.LSP6["AddressPermissions[]"].index + ethers.zeroPadValue(ethers.toBeHex(ethers.toBigInt(AddressPermissionsArrayLength) - BigInt(1)), 16).substring(2), ERC725YDataKeys.LSP6["AddressPermissions:Permissions"] + newController.address.substring(2), ERC725YDataKeys.LSP6["AddressPermissions:AllowedERC725YDataKeys"] + newController.address.substring(2), ]; // prettier-ignore const dataValues = [ - ethers.zeroPadValue(ethers.toBigInt(AddressPermissionsArrayLength).sub(1).toHexString(), 16), + ethers.zeroPadValue(ethers.toBeHex(ethers.toBigInt(AddressPermissionsArrayLength) - BigInt(1)), 16), "0x", "0x", "0x", @@ -1603,7 +1609,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_4'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Write 5x new LSP12 Issued Assets', async () => { @@ -1640,7 +1646,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_5'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Updates 1x data key', async () => { @@ -1655,7 +1661,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_5'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Updates 3x data keys (first x3)', async () => { @@ -1670,7 +1676,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_6'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Update 3x data keys (middle x3)', async () => { @@ -1685,7 +1691,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_7'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Update 3x data keys (last x3)', async () => { @@ -1700,20 +1706,20 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_8'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); it('Set 2x data keys + add 3x new controllers (including setting the array length + indexes under AddressPermissions[index]) - 12 data keys in total', async () => { - const addressPermissionsArrayLength = ethers - .toBigInt( + const addressPermissionsArrayLength = ethers.toNumber( + ethers.toBigInt( await context.universalProfile.getData( ERC725YDataKeys.LSP6['AddressPermissions[]'].length, ), - ) - .toNumber(); + ), + ); const newArrayLengthUint128Hex = ethers.zeroPadValue( - ethers.toBigInt(addressPermissionsArrayLength).add(3).toHexString(), + ethers.toBeHex(ethers.toBigInt(addressPermissionsArrayLength) + BigInt(3)), 16, ); @@ -1773,7 +1779,7 @@ describe('⛽📊 Gas Benchmark', () => { gasBenchmark['runtime_costs']['KeyManager_owner']['setData']['case_9'][ 'restricted_controller' - ] = receipt.gasUsed.toNumber(); + ] = ethers.toNumber(receipt.gasUsed); }); }); }); From b39b2b485fbbd965d46d1354d406a1eba9eeb1bb Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 07:46:11 -0700 Subject: [PATCH 12/21] chore: fix some Solidity import path compiler errors --- .../lsp-smart-contracts/contracts/Imports.sol | 43 ------------------- .../LSP2ERC725YJSONSchema/LSP2Utils.sol | 4 ++ .../contracts/UniversalProfile.sol | 2 +- .../contracts/UniversalProfileInit.sol | 2 +- .../UniversalProfileInitAbstract.sol | 2 +- .../lsp-smart-contracts/contracts/Version.sol | 17 -------- 6 files changed, 7 insertions(+), 63 deletions(-) delete mode 100644 packages/lsp-smart-contracts/contracts/Imports.sol create mode 100644 packages/lsp-smart-contracts/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol delete mode 100644 packages/lsp-smart-contracts/contracts/Version.sol diff --git a/packages/lsp-smart-contracts/contracts/Imports.sol b/packages/lsp-smart-contracts/contracts/Imports.sol deleted file mode 100644 index 1a5f4a3c8..000000000 --- a/packages/lsp-smart-contracts/contracts/Imports.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -pragma solidity ^0.8.4; - -// solhint-disable no-unused-import -import { - UniversalProfileInit -} from "@lukso/universalprofile-contracts/contracts/UniversalProfileInit.sol"; -import { - LSP1UniversalReceiverDelegateUP -} from "@lukso/lsp1delegate-contracts/contracts/LSP1UniversalReceiverDelegateUP.sol"; -import { - LSP1UniversalReceiverDelegateVault -} from "@lukso/lsp1delegate-contracts/contracts/LSP1UniversalReceiverDelegateVault.sol"; - -import { - LSP7Mintable -} from "@lukso/lsp7-contracts/contracts/presets/LSP7Mintable.sol"; -import { - LSP7MintableInit -} from "@lukso/lsp7-contracts/contracts/presets/LSP7MintableInit.sol"; -import { - LSP8Mintable -} from "@lukso/lsp8-contracts/contracts/presets/LSP8Mintable.sol"; -import { - LSP8MintableInit -} from "@lukso/lsp8-contracts/contracts/presets/LSP8MintableInit.sol"; -import {LSP9Vault} from "@lukso/lsp9-contracts/contracts/LSP9Vault.sol"; -import {LSP9VaultInit} from "@lukso/lsp9-contracts/contracts/LSP9VaultInit.sol"; -import { - LSP23LinkedContractsFactory -} from "@lukso/lsp23-contracts/contracts/LSP23LinkedContractsFactory.sol"; -import { - UniversalProfileInitPostDeploymentModule -} from "@lukso/lsp23-contracts/contracts/modules/UniversalProfileInitPostDeploymentModule.sol"; -import { - UniversalProfilePostDeploymentModule -} from "@lukso/lsp23-contracts/contracts/modules/UniversalProfilePostDeploymentModule.sol"; -import { - IPostDeploymentModule -} from "@lukso/lsp23-contracts/contracts/IPostDeploymentModule.sol"; -import { - Extension4337 -} from "@lukso/lsp17-contracts/contracts/Extension4337.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol b/packages/lsp-smart-contracts/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol new file mode 100644 index 000000000..7cfd5e777 --- /dev/null +++ b/packages/lsp-smart-contracts/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.4; + +import "@lukso/lsp2-contracts/contracts/LSP2Utils.sol"; diff --git a/packages/lsp-smart-contracts/contracts/UniversalProfile.sol b/packages/lsp-smart-contracts/contracts/UniversalProfile.sol index a9be238f5..07e4e7598 100644 --- a/packages/lsp-smart-contracts/contracts/UniversalProfile.sol +++ b/packages/lsp-smart-contracts/contracts/UniversalProfile.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.4; -import "@lukso/universalprofile-contracts/UniversalProfile.sol"; +import "@lukso/universalprofile-contracts/contracts/UniversalProfile.sol"; diff --git a/packages/lsp-smart-contracts/contracts/UniversalProfileInit.sol b/packages/lsp-smart-contracts/contracts/UniversalProfileInit.sol index e578248c0..88085216d 100644 --- a/packages/lsp-smart-contracts/contracts/UniversalProfileInit.sol +++ b/packages/lsp-smart-contracts/contracts/UniversalProfileInit.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.4; -import "@lukso/universalprofile-contracts/UniversalProfileInit.sol"; +import "@lukso/universalprofile-contracts/contracts/UniversalProfileInit.sol"; diff --git a/packages/lsp-smart-contracts/contracts/UniversalProfileInitAbstract.sol b/packages/lsp-smart-contracts/contracts/UniversalProfileInitAbstract.sol index 26184033d..0d21a346a 100644 --- a/packages/lsp-smart-contracts/contracts/UniversalProfileInitAbstract.sol +++ b/packages/lsp-smart-contracts/contracts/UniversalProfileInitAbstract.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.4; -import "@lukso/universalprofile-contracts/UniversalProfileInitAbstract.sol"; +import "@lukso/universalprofile-contracts/contracts/UniversalProfileInitAbstract.sol"; diff --git a/packages/lsp-smart-contracts/contracts/Version.sol b/packages/lsp-smart-contracts/contracts/Version.sol deleted file mode 100644 index 9227ca267..000000000 --- a/packages/lsp-smart-contracts/contracts/Version.sol +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -pragma solidity ^0.8.4; - -abstract contract Version { - /** - * @dev Get the version of the contract. - * @notice Contract version. - * - * @return The version of the the contract. - */ - // DO NOT CHANGE - // Comments block below is used by release-please to automatically update the version in this file. - // x-release-please-start-version - string public constant VERSION = "0.12.1"; - - // x-release-please-end -} From 6faa0126a8721e78293a6cae2e2686120e62f8b4 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 07:46:23 -0700 Subject: [PATCH 13/21] build: update `package-lock.json` --- package-lock.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package-lock.json b/package-lock.json index 46f35f9ec..d8efb1989 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20917,6 +20917,7 @@ } }, "packages/lsp-smart-contracts": { + "name": "@lukso/lsp-smart-contracts", "version": "0.12.1", "license": "Apache-2.0", "dependencies": { From bddec41870171901eaeabea6ce323abb20ce3a1f Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 07:56:32 -0700 Subject: [PATCH 14/21] test: update foundry tests setting for `@lukso/lsp-smart-contracts` --- .github/workflows/foundry-tests.yml | 6 +++--- foundry.toml | 23 ++++++++++++++--------- packages/lsp-smart-contracts/package.json | 2 +- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/foundry-tests.yml b/.github/workflows/foundry-tests.yml index cbfbe8a99..4e61c5f43 100644 --- a/.github/workflows/foundry-tests.yml +++ b/.github/workflows/foundry-tests.yml @@ -4,8 +4,8 @@ on: pull_request: # compare gas diff only when editing Solidity smart contract code paths: - - "contracts/**/*.sol" - - "tests/foundry/**/*.sol" + - "packages/**/*.sol" + - "packages/lsp-smart-contracts/tests/foundry/**/*.sol" jobs: foundry-tests: @@ -24,7 +24,7 @@ jobs: run: npm ci - name: NPM build - run: npx hardhat compile + run: npm run build - name: Run Foundry tests run: npm run test:foundry diff --git a/foundry.toml b/foundry.toml index 33efc9459..a180557c9 100644 --- a/foundry.toml +++ b/foundry.toml @@ -12,16 +12,21 @@ runs = 10_000 max_test_rejects = 200_000 [profile.lsp2] -src = 'packages/LSP2ERC725YJSONSchema/contracts' -test = 'packages/LSP2ERC725YJSONSchema/foundry' -out = 'packages/LSP2ERC725YJSONSchema/contracts/foundry_artifacts' +src = 'packages/lsp2-contracts/contracts' +test = 'packages/lsp2-contracts/foundry' +out = 'packages/lsp2-contracts/contracts/foundry_artifacts' [profile.lsp6] -src = 'packages/LSP6KeyManager/contracts' -test = 'packages/LSP6KeyManager/foundry' -out = 'packages/LSP6KeyManager/contracts/foundry_artifacts' +src = 'packages/lsp6-contracts/contracts' +test = 'packages/lsp6-contracts/foundry' +out = 'packages/lsp6-contracts/contracts/foundry_artifacts' [profile.lsp16] -src = 'packages/LSP16UniversalFactory/contracts' -test = 'packages/LSP16UniversalFactory/foundry' -out = 'packages/LSP16UniversalFactory/contracts/foundry_artifacts' +src = 'packages/lsp16-contracts/contracts' +test = 'packages/lsp16-contracts/foundry' +out = 'packages/lsp16-contracts/contracts/foundry_artifacts' + +[profile.lsp_smart_contracts] +src = 'packages/lsp-smart-contracts/contracts' +test = 'packages/lsp-smart-contracts/foundry' +out = 'packages/lsp-smart-contracts/contracts/foundry_artifacts' diff --git a/packages/lsp-smart-contracts/package.json b/packages/lsp-smart-contracts/package.json index c75f65ff0..a880b7620 100644 --- a/packages/lsp-smart-contracts/package.json +++ b/packages/lsp-smart-contracts/package.json @@ -59,7 +59,7 @@ "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'", "package": "hardhat prepare-package", "test": "hardhat test --no-compile tests/**/*.test.ts", - "test:foundry": "forge test --no-match-test Skip -vvv --gas-report > gasreport.ansi", + "test:foundry": "FOUNDRY_PROFILE=lsp_smart_contracts forge test --no-match-test Skip -vvv --gas-report > gasreport.ansi", "test:coverage": "hardhat coverage" }, "dependencies": { From fc2781cbab413c656d6d4a0dba73a947f86b2277 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 08:00:44 -0700 Subject: [PATCH 15/21] chore: add missing environnement variable in `turbo.json` --- turbo.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/turbo.json b/turbo.json index db4d836f6..df7d2978b 100644 --- a/turbo.json +++ b/turbo.json @@ -13,7 +13,10 @@ }, "clean": {}, "lint": { - "env": ["CONTRACT_VERIFICATION_TESTNET_PK"] + "env": [ + "CONTRACT_VERIFICATION_TESTNET_PK", + "CONTRACT_VERIFICATION_MAINNET_PK" + ] }, "lint:solidity": {}, "package": {}, From 8dcc06bf525a5a828cd2243b09a1d17824d164b2 Mon Sep 17 00:00:00 2001 From: b00ste Date: Wed, 28 Feb 2024 20:37:27 +0200 Subject: [PATCH 16/21] test: repair tests that import helpers from root --- .../LSP17Extendable.behaviour.ts | 3 - .../tests/LSP16UniversalFactory.test.ts | 82 +++++++++++++------ .../tests/LSP2UtilsLibrary.test.ts | 15 +++- .../tests/LSP25MultiChannelNonce.test.ts | 20 ++++- 4 files changed, 90 insertions(+), 30 deletions(-) diff --git a/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts index 315295025..c38c45a84 100644 --- a/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts @@ -27,9 +27,6 @@ import { RequireCallbackToken__factory, RevertFallbackExtension, RevertFallbackExtension__factory, - NameExtension, - NameExtension__factory, - AgeExtension__factory, } from '../../../../types'; // helpers diff --git a/packages/lsp16-contracts/tests/LSP16UniversalFactory.test.ts b/packages/lsp16-contracts/tests/LSP16UniversalFactory.test.ts index 7195284ba..1f023fd3d 100644 --- a/packages/lsp16-contracts/tests/LSP16UniversalFactory.test.ts +++ b/packages/lsp16-contracts/tests/LSP16UniversalFactory.test.ts @@ -14,7 +14,6 @@ import { NonPayableContract__factory, ImplementationTester, ImplementationTester__factory, - FallbackContract, FallbackInitializer, FallbackInitializer__factory, ContractNoConstructor__factory, @@ -23,10 +22,10 @@ import { FallbackContract__factory, } from '../types'; -import web3 from 'web3'; - -import { provider, AddressOffset } from '../../../tests/utils/helpers'; import { UniversalProfile } from '../../../types'; +import { AbiCoder, concat } from 'ethers'; + +const abiCoder = new AbiCoder(); const AccountBytecode = Account__factory.bytecode; const NonPayableConstructorBytecode = NonPayableContract__factory.bytecode; @@ -103,7 +102,10 @@ describe('UniversalFactory contract', () => { const randomAddress = ethers.Wallet.createRandom(); // Set the Owner as the ZeroAddress - const UPBytecode = AccountBytecode + AddressOffset + randomAddress.address.substring(2); + const UPBytecode = concat([ + AccountBytecode, + abiCoder.encode(['address'], [randomAddress.address]), + ]); const bytecodeHash = ethers.solidityPackedKeccak256(['bytes'], [UPBytecode]); @@ -126,7 +128,10 @@ describe('UniversalFactory contract', () => { const randomAddress = ethers.Wallet.createRandom(); - const UPBytecode = AccountBytecode + AddressOffset + randomAddress.address.substr(2); + const UPBytecode = concat([ + AccountBytecode, + abiCoder.encode(['address'], [randomAddress.address]), + ]); const bytecodeHash = ethers.solidityPackedKeccak256(['bytes'], [UPBytecode]); @@ -153,7 +158,10 @@ describe('UniversalFactory contract', () => { const salt1 = ethers.solidityPackedKeccak256(['string'], ['Salt1']); const salt2 = ethers.solidityPackedKeccak256(['string'], ['Salt2']); - const UPBytecode = AccountBytecode + AddressOffset + ethers.ZeroAddress.substr(2); + const UPBytecode = concat([ + AccountBytecode, + abiCoder.encode(['address'], [ethers.ZeroAddress]), + ]); const bytecodeHash = ethers.solidityPackedKeccak256(['bytes'], [UPBytecode]); @@ -179,12 +187,17 @@ describe('UniversalFactory contract', () => { it('should calculate a different address of a contract if the bytecode changed', async () => { const salt = ethers.solidityPackedKeccak256(['string'], ['Salt']); - const UPBytecode1 = AccountBytecode + AddressOffset + ethers.ZeroAddress.substr(2); + const UPBytecode1 = concat([ + AccountBytecode, + abiCoder.encode(['address'], [ethers.ZeroAddress]), + ]); const bytecodeHash1 = ethers.solidityPackedKeccak256(['bytes'], [UPBytecode1]); - const UPBytecode2 = - AccountBytecode + AddressOffset + 'cafecafecafecafecafecafecafecafecafecafe'; + const UPBytecode2 = concat([ + AccountBytecode, + abiCoder.encode(['address'], ['0xcafecafecafecafecafecafecafecafecafecafe']), + ]); const bytecodeHash2 = ethers.solidityPackedKeccak256(['bytes'], [UPBytecode2]); @@ -212,7 +225,10 @@ describe('UniversalFactory contract', () => { const randomAddress = ethers.Wallet.createRandom(); - const UPBytecode = AccountBytecode + AddressOffset + randomAddress.address.substring(2); + const UPBytecode = concat([ + AccountBytecode, + abiCoder.encode(['address'], [randomAddress.address]), + ]); await context.universalFactory.deployCreate2(UPBytecode, salt); @@ -224,8 +240,10 @@ describe('UniversalFactory contract', () => { it('should revert when sending value while deploying a non payable non-initializable contract', async () => { const salt = ethers.solidityPackedKeccak256(['string'], ['OtherSalt']); - const KMBytecode = - NonPayableConstructorBytecode + AddressOffset + ethers.ZeroAddress.substr(2); + const KMBytecode = concat([ + NonPayableConstructorBytecode, + abiCoder.encode(['address'], [ethers.ZeroAddress]), + ]); await expect( context.universalFactory.deployCreate2(KMBytecode, salt, { @@ -251,15 +269,17 @@ describe('UniversalFactory contract', () => { value: valueSent, }); - const balance = await provider.getBalance(contractCreated); + const balance = await ethers.provider.getBalance(contractCreated); expect(balance).to.equal(valueSent); }); it('should deploy an un-initializable contract and get the owner successfully', async () => { const salt = ethers.solidityPackedKeccak256(['string'], ['Salt']); - const UPBytecode = - AccountBytecode + AddressOffset + context.accounts.deployer3.address.substr(2); + const UPBytecode = concat([ + AccountBytecode, + abiCoder.encode(['address'], [context.accounts.deployer3.address]), + ]); const contractCreatedAddress = await context.universalFactory.deployCreate2.staticCall( UPBytecode, @@ -318,7 +338,10 @@ describe('UniversalFactory contract', () => { const salt1 = ethers.solidityPackedKeccak256(['string'], ['Salt1']); const salt2 = ethers.solidityPackedKeccak256(['string'], ['Salt2']); - const UPBytecode = AccountBytecode + AddressOffset + ethers.ZeroAddress.substr(2); + const UPBytecode = concat([ + AccountBytecode, + abiCoder.encode(['address'], [ethers.ZeroAddress]), + ]); const bytecodeHash = ethers.solidityPackedKeccak256(['bytes'], [UPBytecode]); @@ -348,7 +371,10 @@ describe('UniversalFactory contract', () => { it('should calculate a different address of a contract if the initializeCalldata changed', async () => { const salt = ethers.solidityPackedKeccak256(['string'], ['Salt']); - const UPBytecode = AccountBytecode + AddressOffset + ethers.ZeroAddress.substr(2); + const UPBytecode = concat([ + AccountBytecode, + abiCoder.encode(['address'], [ethers.ZeroAddress]), + ]); const bytecodeHash = ethers.solidityPackedKeccak256(['bytes'], [UPBytecode]); @@ -379,7 +405,10 @@ describe('UniversalFactory contract', () => { it('should calculate a different address of a contract if the bytecode changed', async () => { const salt = ethers.solidityPackedKeccak256(['string'], ['Salt']); - const UPBytecode1 = AccountBytecode + AddressOffset + ethers.ZeroAddress.substr(2); + const UPBytecode1 = concat([ + AccountBytecode, + abiCoder.encode(['address'], [ethers.ZeroAddress]), + ]); const initializeCallData = accountBaseContract.interface.encodeFunctionData('initialize', [ context.accounts.deployer1.address, @@ -387,8 +416,10 @@ describe('UniversalFactory contract', () => { const bytecodeHash1 = ethers.solidityPackedKeccak256(['bytes'], [UPBytecode1]); - const UPBytecode2 = - AccountBytecode + AddressOffset + 'cafecafecafecafecafecafecafecafecafecafe'; + const UPBytecode2 = concat([ + AccountBytecode, + abiCoder.encode(['address'], ['0xcafecafecafecafecafecafecafecafecafecafe']), + ]); const bytecodeHash2 = ethers.solidityPackedKeccak256(['bytes'], [UPBytecode2]); @@ -438,7 +469,10 @@ describe('UniversalFactory contract', () => { it('should revert when deploying an initializable contract with sending value unmatched to the msgValue arguments', async () => { const salt = ethers.solidityPackedKeccak256(['string'], ['Salt']); - const UPBytecode = AccountBytecode + AddressOffset + ethers.ZeroAddress.substr(2); + const UPBytecode = concat([ + AccountBytecode, + abiCoder.encode(['address'], [ethers.ZeroAddress]), + ]); const initializeCallData = accountBaseContract.interface.encodeFunctionData('initialize', [ context.accounts.deployer1.address, @@ -517,7 +551,7 @@ describe('UniversalFactory contract', () => { { value: sumValueSent }, ); - const balance = await provider.getBalance(contractCreated); + const balance = await ethers.provider.getBalance(contractCreated); expect(balance).to.equal(sumValueSent); }); @@ -884,7 +918,7 @@ describe('UniversalFactory contract', () => { value: valueSent, }); - const balance = await provider.getBalance(contractCreated); + const balance = await ethers.provider.getBalance(contractCreated); expect(balance).to.equal(valueSent); }); diff --git a/packages/lsp2-contracts/tests/LSP2UtilsLibrary.test.ts b/packages/lsp2-contracts/tests/LSP2UtilsLibrary.test.ts index 3b93fd750..2920a232a 100644 --- a/packages/lsp2-contracts/tests/LSP2UtilsLibrary.test.ts +++ b/packages/lsp2-contracts/tests/LSP2UtilsLibrary.test.ts @@ -2,8 +2,19 @@ import { expect } from 'chai'; import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { LSP2UtilsLibraryTester, LSP2UtilsLibraryTester__factory } from '../types'; - -import { encodeCompactBytesArray } from '../../../tests/utils/helpers'; +import { BytesLike } from 'ethers'; + +function encodeCompactBytesArray(inputKeys: BytesLike[]) { + let compactBytesArray = '0x'; + for (let i = 0; i < inputKeys.length; i++) { + compactBytesArray += + ethers + .zeroPadValue(ethers.toBeHex(inputKeys[i].toString().substring(2).length / 2), 2) + .substring(2) + inputKeys[i].toString().substring(2); + } + + return compactBytesArray; +} describe('LSP2Utils', () => { let accounts: SignerWithAddress[]; diff --git a/packages/lsp25-contracts/tests/LSP25MultiChannelNonce.test.ts b/packages/lsp25-contracts/tests/LSP25MultiChannelNonce.test.ts index 607d6253d..01dfc5121 100644 --- a/packages/lsp25-contracts/tests/LSP25MultiChannelNonce.test.ts +++ b/packages/lsp25-contracts/tests/LSP25MultiChannelNonce.test.ts @@ -1,11 +1,29 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; import { LSP25_VERSION } from '../constants'; -import { LOCAL_PRIVATE_KEYS } from '../../../tests/utils/helpers'; import { EIP191Signer } from '@lukso/eip191-signer.js'; import { LSP25MultiChannelNonceTester, LSP25MultiChannelNonceTester__factory } from '../types'; +/** + * Private keys for the accounts used in the tests. + * These are the private keys for the accounts generated by the hardhat node (local blockchain). + * The private keys are used to sign messages with lsp6-signers.js library. + * + * WARNING! These private keys and their related accounts are publicly known and should never be used in production. + * Any funds sent to them on Mainnet or any other live network WILL BE LOST. + */ +const LOCAL_PRIVATE_KEYS = { + ACCOUNT0: '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80', + ACCOUNT1: '0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d', + ACCOUNT2: '0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a', + ACCOUNT3: '0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6', + ACCOUNT4: '0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a', + ACCOUNT5: '0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba', + ACCOUNT6: '0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e', + ACCOUNT7: '0x030ab56c9834360e1c0dba6b9a955b6e127f3166cda462c2472f67e1ba773053', +}; + describe('LSP25MultiChannelNonce', () => { let contract: LSP25MultiChannelNonceTester; let account; From e8765a060d7dee66c802414d733cc94c5b55f790 Mon Sep 17 00:00:00 2001 From: b00ste Date: Wed, 28 Feb 2024 20:48:44 +0200 Subject: [PATCH 17/21] chore: fix types imports in tests --- .../LSP11BasicSocialRecovery.behaviour.ts | 2 +- .../LSP11BasicSocialRecovery.test.ts | 6 +----- .../LSP11BasicSocialRecoveryInit.test.ts | 2 +- .../tests/LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts | 2 +- .../LSP17ContractExtension/LSP17Extendable.behaviour.ts | 2 +- .../tests/LSP17ContractExtension/LSP17Extendable.test.ts | 2 +- .../LSP17ExtendableTokens.behaviour.ts | 2 +- .../tests/LSP17Extensions/Extension4337/4337.test.ts | 2 +- .../LSP1UniversalReceiver.behaviour.ts | 2 +- .../LSP1UniversalReceiverDelegateUP.behaviour.ts | 2 +- .../LSP1UniversalReceiverDelegateUP.test.ts | 6 +----- .../LSP1UniversalReceiverDelegateVault.behaviour.ts | 2 +- .../LSP1UniversalReceiverDelegateVault.test.ts | 2 +- .../LSP20CallVerification.behaviour.ts | 2 +- .../tests/LSP20CallVerification/LSP20WithLSP14.behaviour.ts | 2 +- .../LSP6/Admin/PermissionChangeOwner.test.ts | 2 +- .../LSP6/Interactions/AllowedAddresses.test.ts | 2 +- .../LSP6/Interactions/AllowedFunctions.test.ts | 2 +- .../LSP6/Interactions/AllowedStandards.test.ts | 2 +- .../LSP6/Interactions/ERC725XExecuteBatch.test.ts | 2 +- .../LSP6/Interactions/OtherScenarios.test.ts | 2 +- .../LSP6/Interactions/PermissionCall.test.ts | 2 +- .../LSP6/Interactions/PermissionDelegateCall.test.ts | 2 +- .../LSP6/Interactions/PermissionDeploy.test.ts | 2 +- .../LSP6/Interactions/PermissionStaticCall.test.ts | 2 +- .../LSP6/Interactions/PermissionTransferValue.test.ts | 2 +- .../LSP6/Interactions/Security.test.ts | 2 +- .../tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts | 2 +- .../LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts | 2 +- .../LSP6/SetData/PermissionSetData.test.ts | 2 +- .../LSP23LinkedContractsDeployment.test.ts | 2 +- .../tests/LSP23LinkedContractsDeployment/helpers.ts | 4 ++-- .../LSP4DigitalAssetMetadata.behaviour.ts | 2 +- .../LSP6KeyManager/Admin/PermissionChangeOwner.test.ts | 2 +- .../LSP6KeyManager/Interactions/AllowedAddresses.test.ts | 2 +- .../LSP6KeyManager/Interactions/AllowedFunctions.test.ts | 2 +- .../LSP6KeyManager/Interactions/AllowedStandards.test.ts | 2 +- .../tests/LSP6KeyManager/Interactions/BatchExecute.test.ts | 6 +----- .../Interactions/InvalidExecutePayloads.test.ts | 2 +- .../LSP6KeyManager/Interactions/PermissionCall.test.ts | 2 +- .../Interactions/PermissionDelegateCall.test.ts | 2 +- .../LSP6KeyManager/Interactions/PermissionDeploy.test.ts | 2 +- .../Interactions/PermissionStaticCall.test.ts | 2 +- .../Interactions/PermissionTransferValue.test.ts | 2 +- .../tests/LSP6KeyManager/LSP6ControlledToken.test.ts | 2 +- .../tests/LSP6KeyManager/LSP6KeyManager.test.ts | 2 +- .../tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts | 2 +- .../tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts | 2 +- .../tests/LSP6KeyManager/Relay/MultiChannelNonce.test.ts | 2 +- .../tests/LSP6KeyManager/SetData/PermissionSetData.test.ts | 2 +- .../tests/LSP6KeyManager/internals/AllowedCalls.internal.ts | 2 +- .../tests/LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts | 2 +- .../tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts | 2 +- .../tests/LSP7DigitalAsset/LSP7Mintable.behaviour.ts | 2 +- .../LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts | 5 +---- .../LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts | 2 +- .../tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts | 2 +- .../LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts | 2 +- .../LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts | 2 +- .../tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts | 2 +- .../LSP8CappedSupply.behaviour.ts | 2 +- .../LSP8Enumerable.behaviour.ts | 2 +- .../LSP8IdentifiableDigitalAsset.behaviour.ts | 2 +- .../LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts | 2 +- .../proxy/LSP8BurnableInit.test.ts | 2 +- .../proxy/LSP8CappedSupplyInit.test.ts | 5 +---- .../proxy/LSP8EnumerableInit.test.ts | 2 +- .../proxy/LSP8IdentifiableDigitalAssetInit.test.ts | 6 +----- .../proxy/LSP8MintableInit.test.ts | 2 +- .../standard/LSP8Burnable.test.ts | 2 +- .../standard/LSP8CappedSupply.test.ts | 2 +- .../standard/LSP8Enumerable.test.ts | 2 +- .../standard/LSP8IdentifiableDigitalAsset.test.ts | 2 +- .../standard/LSP8Mintable.test.ts | 2 +- .../tests/LSP9Vault/LSP9Vault.behaviour.ts | 2 +- .../lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.test.ts | 2 +- .../tests/LSP9Vault/LSP9VaultInit.test.ts | 2 +- packages/lsp-smart-contracts/tests/Mocks/ABIEncoder.test.ts | 2 +- .../tests/Mocks/ERC165Interfaces.test.ts | 2 +- .../tests/Mocks/KeyManagerExecutionCosts.test.ts | 6 +----- .../lsp-smart-contracts/tests/Mocks/LSP1TypeIDs.test.ts | 2 +- .../LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts | 2 +- .../LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts | 2 +- .../Reentrancy/LSP20/ERC725XExecuteToERC725XExecute.test.ts | 2 +- .../LSP20/ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts | 2 +- .../LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts | 2 +- .../tests/Reentrancy/LSP20/reentrancyHelpers.ts | 2 +- .../tests/Reentrancy/LSP6/LSP6Reentrancy.test.ts | 2 +- .../SingleExecuteRelayCallToSingleExecuteRelayCall.test.ts | 2 +- .../LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts | 2 +- .../tests/Reentrancy/LSP6/reentrancyHelpers.ts | 2 +- .../lsp-smart-contracts/tests/Reentrancy/Reentrancy.test.ts | 2 +- .../tests/Reentrancy/ReentrancyInit.test.ts | 2 +- packages/lsp-smart-contracts/tests/utils/context.ts | 6 +----- packages/lsp-smart-contracts/tests/utils/fixtures.ts | 2 +- 95 files changed, 96 insertions(+), 126 deletions(-) diff --git a/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.behaviour.ts index e6b2f4a11..a5c3b3edb 100644 --- a/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.behaviour.ts @@ -2,7 +2,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { LSP11BasicSocialRecovery, LSP6KeyManager, UniversalProfile } from '../../../../types'; +import { LSP11BasicSocialRecovery, LSP6KeyManager, UniversalProfile } from '../../types'; import { ERC725YDataKeys, INTERFACE_IDS } from '../../constants'; import { ALL_PERMISSIONS } from '@lukso/lsp6-contracts'; diff --git a/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts b/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts index 6d6795988..728d6ede4 100644 --- a/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.test.ts @@ -1,8 +1,4 @@ -import { - LSP11BasicSocialRecovery__factory, - LSP6KeyManager, - UniversalProfile, -} from '../../../../types'; +import { LSP11BasicSocialRecovery__factory, LSP6KeyManager, UniversalProfile } from '../../types'; import { getNamedAccounts, diff --git a/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts b/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts index 2c56f6243..686f84632 100644 --- a/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts @@ -5,7 +5,7 @@ import { UniversalProfile, LSP11BasicSocialRecoveryInit__factory, LSP11BasicSocialRecovery, -} from '../../../../types'; +} from '../../types'; import { getNamedAccounts, diff --git a/packages/lsp-smart-contracts/tests/LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts index 8684c67e3..47c2f3fa4 100644 --- a/packages/lsp-smart-contracts/tests/LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP14Ownable2Step/LSP14Ownable2Step.behaviour.ts @@ -6,7 +6,7 @@ import { LSP9Vault, UPWithInstantAcceptOwnership__factory, UPWithInstantAcceptOwnership, -} from '../../../../types'; +} from '../../types'; // constants import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; diff --git a/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts index c38c45a84..d748737d5 100644 --- a/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.behaviour.ts @@ -27,7 +27,7 @@ import { RequireCallbackToken__factory, RevertFallbackExtension, RevertFallbackExtension__factory, -} from '../../../../types'; +} from '../../types'; // helpers import { abiCoder, provider } from '../utils/helpers'; diff --git a/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.test.ts b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.test.ts index a2396e952..d109eeeb6 100644 --- a/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17Extendable.test.ts @@ -8,7 +8,7 @@ import { EmitEventExtension__factory, RevertErrorsTestExtension, RevertErrorsTestExtension__factory, -} from '../../../../types'; +} from '../../types'; describe('LSP17Extendable - Basic Implementation', () => { let accounts; diff --git a/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17ExtendableTokens.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17ExtendableTokens.behaviour.ts index 29f4268d0..d5f2511bc 100644 --- a/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17ExtendableTokens.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP17ContractExtension/LSP17ExtendableTokens.behaviour.ts @@ -22,7 +22,7 @@ import { NameExtension, AgeExtension__factory, AgeExtension, -} from '../../../../types'; +} from '../../types'; // helpers import { abiCoder, provider } from '../utils/helpers'; diff --git a/packages/lsp-smart-contracts/tests/LSP17Extensions/Extension4337/4337.test.ts b/packages/lsp-smart-contracts/tests/LSP17Extensions/Extension4337/4337.test.ts index fdf4fefd2..b4b5113e9 100644 --- a/packages/lsp-smart-contracts/tests/LSP17Extensions/Extension4337/4337.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP17Extensions/Extension4337/4337.test.ts @@ -10,7 +10,7 @@ import { UniversalProfile, UniversalProfile__factory, Extension4337__factory, -} from '../../../../../types'; +} from '../../../types'; import { deployEntryPoint, getBalance, isDeployed } from '../helpers/utils'; import { ERC725YDataKeys } from '../../../constants'; import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; diff --git a/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiver.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiver.behaviour.ts index 09e8b3357..06a894e93 100644 --- a/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiver.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiver.behaviour.ts @@ -8,7 +8,7 @@ import { UniversalReceiverTester, UniversalReceiverDelegateRevert__factory, UniversalReceiverDelegateRevert, -} from '../../../../types'; +} from '../../types'; // helpers import { abiCoder, LSP1_HOOK_PLACEHOLDER } from '../utils/helpers'; diff --git a/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts index 93cf727de..6a643edfc 100644 --- a/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts @@ -24,7 +24,7 @@ import { LSP7MintWhenDeployed, GenericExecutorWithBalanceOfFunction, GenericExecutorWithBalanceOfFunction__factory, -} from '../../../../types'; +} from '../../types'; // helpers import { ARRAY_LENGTH, LSP1_HOOK_PLACEHOLDER, abiCoder } from '../utils/helpers'; diff --git a/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.test.ts b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.test.ts index f0a51ecb2..5ae070d8f 100644 --- a/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.test.ts @@ -1,9 +1,5 @@ import { ethers } from 'hardhat'; -import { - LSP1UniversalReceiverDelegateUP, - UniversalProfile, - LSP6KeyManager, -} from '../../../../types'; +import { LSP1UniversalReceiverDelegateUP, UniversalProfile, LSP6KeyManager } from '../../types'; import { setupProfileWithKeyManagerWithURD } from '../utils/fixtures'; diff --git a/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts index 1c0c50a19..63183f41c 100644 --- a/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.behaviour.ts @@ -14,7 +14,7 @@ import { LSP7MintWhenDeployed__factory, LSP7MintWhenDeployed, LSP1UniversalReceiverDelegateVault__factory, -} from '../../../../types'; +} from '../../types'; import { ARRAY_LENGTH, LSP1_HOOK_PLACEHOLDER, abiCoder } from '../utils/helpers'; diff --git a/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts index c80860e76..aae85aa2a 100644 --- a/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts @@ -5,7 +5,7 @@ import { LSP1UniversalReceiverDelegateVault__factory, UniversalProfile__factory, LSP9Vault__factory, -} from '../../../../types'; +} from '../../types'; import { LSP1TestContext, diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts index 260d7062a..956136121 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts @@ -27,7 +27,7 @@ import { BothCallReturnSuccessValue__factory, SecondCallReturnExpandedSuccessValue, SecondCallReturnExpandedSuccessValue__factory, -} from '../../../../types'; +} from '../../types'; // constants import { LSP1_TYPE_IDS } from '../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20WithLSP14.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20WithLSP14.behaviour.ts index d51e805a8..f628d8e3c 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20WithLSP14.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP20WithLSP14.behaviour.ts @@ -6,7 +6,7 @@ import { UPWithInstantAcceptOwnership__factory, UPWithInstantAcceptOwnership, LSP0ERC725Account, -} from '../../../../types'; +} from '../../types'; // constants import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeOwner.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeOwner.test.ts index d6c8a6346..ae922613f 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeOwner.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Admin/PermissionChangeOwner.test.ts @@ -8,7 +8,7 @@ import { ERC725YDataKeys } from '../../../../constants'; import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; import { PERMISSIONS } from '@lukso/lsp6-contracts'; -import { LSP6KeyManager, LSP6KeyManager__factory } from '../../../../../../types'; +import { LSP6KeyManager, LSP6KeyManager__factory } from '../../types'; // setup import { LSP6TestContext } from '../../../utils/context'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedAddresses.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedAddresses.test.ts index 6a527b7b3..0e99cbf28 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedAddresses.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedAddresses.test.ts @@ -2,7 +2,7 @@ import { expect } from 'chai'; import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { TargetContract, TargetContract__factory } from '../../../../../../types'; +import { TargetContract, TargetContract__factory } from '../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedFunctions.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedFunctions.test.ts index 30a407354..f11605ed1 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedFunctions.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedFunctions.test.ts @@ -9,7 +9,7 @@ import { LSP7Mintable__factory, LSP8Mintable, LSP8Mintable__factory, -} from '../../../../../../types'; +} from '../../types'; // constants import { ERC725YDataKeys, INTERFACE_IDS } from '../../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedStandards.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedStandards.test.ts index ed76ce8a6..4e9e71387 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedStandards.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/AllowedStandards.test.ts @@ -11,7 +11,7 @@ import { LSP7Mintable__factory, UniversalProfile, UniversalProfile__factory, -} from '../../../../../../types'; +} from '../../types'; // constants import { ERC725YDataKeys, INTERFACE_IDS } from '../../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/ERC725XExecuteBatch.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/ERC725XExecuteBatch.test.ts index a42bd3630..549c9b124 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/ERC725XExecuteBatch.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/ERC725XExecuteBatch.test.ts @@ -15,7 +15,7 @@ import { LSP7MintableInit, LSP7MintableInit__factory, LSP7Mintable__factory, -} from '../../../../../../types'; +} from '../../types'; export const shouldBehaveLikeBatchExecute = ( buildContext: (initialFunding?: bigint) => Promise, diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/OtherScenarios.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/OtherScenarios.test.ts index 031dbf2b9..eac90fb33 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/OtherScenarios.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/OtherScenarios.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { TargetContract__factory, TargetContract } from '../../../../../../types'; +import { TargetContract__factory, TargetContract } from '../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionCall.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionCall.test.ts index 1e11fa55d..0d88a54b3 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionCall.test.ts @@ -9,7 +9,7 @@ import { FallbackRevert__factory, TargetContract, TargetContract__factory, -} from '../../../../../../types'; +} from '../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDelegateCall.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDelegateCall.test.ts index b0083ad60..c937c9f22 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDelegateCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDelegateCall.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { ERC725YDelegateCall, ERC725YDelegateCall__factory } from '../../../../../../types'; +import { ERC725YDelegateCall, ERC725YDelegateCall__factory } from '../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDeploy.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDeploy.test.ts index 8ffd2d68d..63fd4a5fa 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDeploy.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionDeploy.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { calculateCreate2 } from 'eth-create2-calculator'; -import { TargetContract__factory } from '../../../../../../types'; +import { TargetContract__factory } from '../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionStaticCall.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionStaticCall.test.ts index 060e6a1cc..3f5eec98d 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionStaticCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionStaticCall.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { TargetContract, TargetContract__factory } from '../../../../../../types'; +import { TargetContract, TargetContract__factory } from '../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts index 54f4ca443..cc2d96d5e 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/PermissionTransferValue.test.ts @@ -16,7 +16,7 @@ import { UniversalProfile, FallbackContract__factory, FallbackContract, -} from '../../../../../../types'; +} from '../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/Security.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/Security.test.ts index 9de0e62be..b518c2690 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/Security.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/Interactions/Security.test.ts @@ -12,7 +12,7 @@ import { TargetContract, TargetContract__factory, UniversalReceiverDelegateDataUpdater__factory, -} from '../../../../../../types'; +} from '../../types'; // constants import { ERC725YDataKeys, LSP1_TYPE_IDS } from '../../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts index fddbe9bfe..96de6a820 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; -import { UniversalProfile__factory, LSP6KeyManager__factory } from '../../../../../types'; +import { UniversalProfile__factory, LSP6KeyManager__factory } from '../../../types'; import { LSP6TestContext } from '../../utils/context'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts index 13b81e28d..e91a5aae3 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts @@ -5,7 +5,7 @@ import { UniversalProfileInit__factory, LSP6KeyManagerInit__factory, LSP6KeyManagerInit, -} from '../../../../../types'; +} from '../../../types'; import { LSP6TestContext } from '../../utils/context'; import { deployProxy } from '../../utils/fixtures'; diff --git a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetData/PermissionSetData.test.ts b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetData/PermissionSetData.test.ts index 836a09dd0..89b252508 100644 --- a/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetData/PermissionSetData.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP20CallVerification/LSP6/SetData/PermissionSetData.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { encodeData, ERC725JSONSchema } from '@erc725/erc725.js'; -import { ExecutorLSP20, ExecutorLSP20__factory } from '../../../../../../types'; +import { ExecutorLSP20, ExecutorLSP20__factory } from '../../types'; // constants import { ERC725YDataKeys } from '../../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts b/packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts index 5ed288d50..9c2089ce3 100644 --- a/packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/LSP23LinkedContractsDeployment.test.ts @@ -6,7 +6,7 @@ import { LSP6KeyManager, UniversalProfile, ILSP23LinkedContractsFactory, -} from '../../../../types'; +} from '../../types'; import { ERC725YDataKeys } from '../../constants'; import { diff --git a/packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/helpers.ts b/packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/helpers.ts index 125129fca..40192d1b3 100644 --- a/packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/helpers.ts +++ b/packages/lsp-smart-contracts/tests/LSP23LinkedContractsDeployment/helpers.ts @@ -1,13 +1,13 @@ import { ethers } from 'hardhat'; import { BytesLike } from 'ethers'; -import { PromiseOrValue } from '../../../../types/common'; +import { PromiseOrValue } from '../../types/common'; import { UniversalProfileInit__factory, LSP6KeyManagerInit__factory, LSP23LinkedContractsFactory__factory, UniversalProfileInitPostDeploymentModule__factory, UniversalProfilePostDeploymentModule__factory, -} from '../../../../types'; +} from '../../types'; export async function calculateProxiesAddresses( salt: PromiseOrValue, diff --git a/packages/lsp-smart-contracts/tests/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.behaviour.ts index 60af4ed9f..91c752f8d 100644 --- a/packages/lsp-smart-contracts/tests/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.behaviour.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; // LSP7 + LSP8 -import { LSP7DigitalAsset, LSP8IdentifiableDigitalAsset, LSP9Vault } from '../../../../types'; +import { LSP7DigitalAsset, LSP8IdentifiableDigitalAsset, LSP9Vault } from '../../types'; // constants import { ERC725YDataKeys } from '../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionChangeOwner.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionChangeOwner.test.ts index 8fc5e5226..55413cb7c 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionChangeOwner.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Admin/PermissionChangeOwner.test.ts @@ -9,7 +9,7 @@ import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; import { PERMISSIONS } from '@lukso/lsp6-contracts'; import { LSP25_VERSION } from '@lukso/lsp25-contracts'; -import { LSP6KeyManager, LSP6KeyManager__factory } from '../../../../../types'; +import { LSP6KeyManager, LSP6KeyManager__factory } from '../../../types'; // setup import { LSP6TestContext } from '../../utils/context'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedAddresses.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedAddresses.test.ts index 394e8bb78..26b608954 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedAddresses.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedAddresses.test.ts @@ -2,7 +2,7 @@ import { expect } from 'chai'; import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { TargetContract, TargetContract__factory } from '../../../../../types'; +import { TargetContract, TargetContract__factory } from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts index 127f91543..ce5343853 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedFunctions.test.ts @@ -10,7 +10,7 @@ import { LSP8Mintable__factory, TargetContract, TargetContract__factory, -} from '../../../../../types'; +} from '../../../types'; // constants import { ERC725YDataKeys, INTERFACE_IDS } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedStandards.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedStandards.test.ts index 493f9f45b..46f2db5f6 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedStandards.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/AllowedStandards.test.ts @@ -11,7 +11,7 @@ import { TargetContract__factory, UniversalProfile__factory, UniversalProfile, -} from '../../../../../types'; +} from '../../../types'; // constants import { ERC725YDataKeys, INTERFACE_IDS } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/BatchExecute.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/BatchExecute.test.ts index 17c2c6a5e..6e693748a 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/BatchExecute.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/BatchExecute.test.ts @@ -11,11 +11,7 @@ import { ALL_PERMISSIONS } from '@lukso/lsp6-contracts'; import { LSP6TestContext } from '../../utils/context'; import { setupKeyManager } from '../../utils/fixtures'; import { abiCoder, provider } from '../../utils/helpers'; -import { - LSP7Mintable, - LSP7MintableInit__factory, - LSP7Mintable__factory, -} from '../../../../../types'; +import { LSP7Mintable, LSP7MintableInit__factory, LSP7Mintable__factory } from '../../../types'; export const shouldBehaveLikeBatchExecute = ( buildContext: (initialFunding?: bigint) => Promise, diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/InvalidExecutePayloads.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/InvalidExecutePayloads.test.ts index 221532920..3686e29b0 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/InvalidExecutePayloads.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/InvalidExecutePayloads.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { TargetContract__factory, TargetContract } from '../../../../../types'; +import { TargetContract__factory, TargetContract } from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionCall.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionCall.test.ts index 0338f78a0..bd2f0ef6a 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionCall.test.ts @@ -10,7 +10,7 @@ import { FallbackRevert__factory, TargetContract, TargetContract__factory, -} from '../../../../../types'; +} from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDelegateCall.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDelegateCall.test.ts index cfbb77f58..9a57ef4e7 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDelegateCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDelegateCall.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { ERC725YDelegateCall, ERC725YDelegateCall__factory } from '../../../../../types'; +import { ERC725YDelegateCall, ERC725YDelegateCall__factory } from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDeploy.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDeploy.test.ts index b6d4d409b..7957ee2b5 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDeploy.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionDeploy.test.ts @@ -4,7 +4,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { calculateCreate2 } from 'eth-create2-calculator'; import { EIP191Signer } from '@lukso/eip191-signer.js'; -import { TargetContract__factory, UniversalProfile__factory } from '../../../../../types'; +import { TargetContract__factory, UniversalProfile__factory } from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionStaticCall.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionStaticCall.test.ts index 43e9cab29..e5bffa74a 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionStaticCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionStaticCall.test.ts @@ -9,7 +9,7 @@ import { OnERC721ReceivedExtension, SignatureValidator__factory, OnERC721ReceivedExtension__factory, -} from '../../../../../types'; +} from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts index cc104a628..04e4cabad 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Interactions/PermissionTransferValue.test.ts @@ -17,7 +17,7 @@ import { LSP7Mintable__factory, FallbackContract, FallbackContract__factory, -} from '../../../../../types'; +} from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6ControlledToken.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6ControlledToken.test.ts index a10d59eb8..aa1f1bb5b 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6ControlledToken.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6ControlledToken.test.ts @@ -11,7 +11,7 @@ import { LSP7Mintable, LSP7Mintable__factory, LSP8Mintable, -} from '../../../../types'; +} from '../../types'; import { ERC725YDataKeys } from '../../constants'; import { ERC1271_VALUES } from '@lukso/lsp0-contracts'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManager.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManager.test.ts index c1355d086..261fba951 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManager.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManager.test.ts @@ -4,7 +4,7 @@ import { KeyManagerInternalTester__factory, UniversalProfile__factory, LSP6KeyManager__factory, -} from '../../../../types'; +} from '../../types'; import { LSP6TestContext } from '../utils/context'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts index 2bffdefbf..4ff2a9285 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/LSP6KeyManagerInit.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { ethers } from 'hardhat'; import { LSP6TestContext } from '../utils/context'; -import { LSP6KeyManagerInit__factory, UniversalProfileInit__factory } from '../../../../types'; +import { LSP6KeyManagerInit__factory, UniversalProfileInit__factory } from '../../types'; import { deployProxy } from '../utils/fixtures'; import { shouldBehaveLikeLSP6, shouldInitializeLikeLSP6 } from './LSP6KeyManager.behaviour'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts index b160dfcf4..357f471a2 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/ExecuteRelayCall.test.ts @@ -9,7 +9,7 @@ import { TargetContract__factory, LSP7Mintable, LSP7Mintable__factory, -} from '../../../../../types'; +} from '../../../types'; // constants import { ERC725YDataKeys, INTERFACE_IDS } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/MultiChannelNonce.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/MultiChannelNonce.test.ts index 6715c796b..6513383a7 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/MultiChannelNonce.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/Relay/MultiChannelNonce.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { EIP191Signer } from '@lukso/eip191-signer.js'; -import { TargetContract, TargetContract__factory } from '../../../../../types'; +import { TargetContract, TargetContract__factory } from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/SetData/PermissionSetData.test.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/SetData/PermissionSetData.test.ts index 2ee1f0e52..5cf19926e 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/SetData/PermissionSetData.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/SetData/PermissionSetData.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { encodeData, ERC725JSONSchema } from '@erc725/erc725.js'; -import { Executor, Executor__factory } from '../../../../../types'; +import { Executor, Executor__factory } from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/AllowedCalls.internal.ts b/packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/AllowedCalls.internal.ts index 87a27449d..ba5b10a9c 100644 --- a/packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/AllowedCalls.internal.ts +++ b/packages/lsp-smart-contracts/tests/LSP6KeyManager/internals/AllowedCalls.internal.ts @@ -2,7 +2,7 @@ import { expect } from 'chai'; import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { TargetContract, TargetContract__factory } from '../../../../../types'; +import { TargetContract, TargetContract__factory } from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts index e2891227c..5a7d88f38 100644 --- a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7CappedSupply.behaviour.ts @@ -1,7 +1,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP7CappedSupplyTester } from '../../../../types'; +import { LSP7CappedSupplyTester } from '../../types'; export type LSP7CappedSupplyTestAccounts = { owner: SignerWithAddress; diff --git a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts index c4ec0b89b..14ec71cbf 100644 --- a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7DigitalAsset.behaviour.ts @@ -15,7 +15,7 @@ import { TokenReceiverWithLSP1Revert, TokenReceiverWithLSP1Revert__factory, LSP7DigitalAsset, -} from '../../../../types'; +} from '../../types'; // constants import { ERC725YDataKeys, INTERFACE_IDS, LSP1_TYPE_IDS, SupportedStandards } from '../../constants'; diff --git a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7Mintable.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7Mintable.behaviour.ts index 29c1505d5..e465f422e 100644 --- a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7Mintable.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/LSP7Mintable.behaviour.ts @@ -8,7 +8,7 @@ import { UniversalProfileInit, LSP6KeyManagerInit, UniversalReceiverDelegateTokenReentrant, -} from '../../../../types'; +} from '../../types'; import { setupProfileWithKeyManagerWithURD } from '../utils/fixtures'; diff --git a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts index f0dbe84e2..ce125fee2 100644 --- a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7CappedSupplyInit.test.ts @@ -1,10 +1,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { - LSP7CappedSupplyInitTester, - LSP7CappedSupplyInitTester__factory, -} from '../../../../../types'; +import { LSP7CappedSupplyInitTester, LSP7CappedSupplyInitTester__factory } from '../../../types'; import { shouldInitializeLikeLSP7 } from '../LSP7DigitalAsset.behaviour'; import { diff --git a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts index 630c714a7..321a785c9 100644 --- a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7DigitalAssetInit.test.ts @@ -1,7 +1,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP7InitTester__factory, LSP7DigitalAsset, LSP7InitTester } from '../../../../../types'; +import { LSP7InitTester__factory, LSP7DigitalAsset, LSP7InitTester } from '../../../types'; import { getNamedAccounts, diff --git a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts index 2af7cffa3..269bd29b5 100644 --- a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/proxy/LSP7MintableInit.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP7MintableInit, LSP7MintableInit__factory } from '../../../../../types'; +import { LSP7MintableInit, LSP7MintableInit__factory } from '../../../types'; import { shouldInitializeLikeLSP7 } from '../LSP7DigitalAsset.behaviour'; import { diff --git a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts index ed7cbdf9a..b0008a6de 100644 --- a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7CappedSupply.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; -import { LSP7CappedSupplyTester__factory } from '../../../../../types'; +import { LSP7CappedSupplyTester__factory } from '../../../types'; import { shouldInitializeLikeLSP7 } from '../LSP7DigitalAsset.behaviour'; import { diff --git a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts index 5f28850cc..efb1658b3 100644 --- a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7DigitalAsset.test.ts @@ -1,7 +1,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP7Tester__factory, LSP7DigitalAsset } from '../../../../../types'; +import { LSP7Tester__factory, LSP7DigitalAsset } from '../../../types'; import { getNamedAccounts, diff --git a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts index 8c984f30c..aef2799e2 100644 --- a/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP7DigitalAsset/standard/LSP7Mintable.test.ts @@ -1,5 +1,5 @@ import { LSP4_TOKEN_TYPES } from '@lukso/lsp4-contracts'; -import { LSP7Mintable, LSP7Mintable__factory } from '../../../../../types'; +import { LSP7Mintable, LSP7Mintable__factory } from '../../../types'; import { shouldInitializeLikeLSP7 } from '../LSP7DigitalAsset.behaviour'; import { diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts index e78a1feed..b450968d4 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8CappedSupply.behaviour.ts @@ -1,7 +1,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP8CappedSupplyTester } from '../../../../types'; +import { LSP8CappedSupplyTester } from '../../types'; import type { BytesLike } from 'ethers'; diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts index 8020e0550..d4d38fb61 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Enumerable.behaviour.ts @@ -2,7 +2,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP8EnumerableTester } from '../../../../types'; +import { LSP8EnumerableTester } from '../../types'; export type LSP8EnumerableTestAccounts = { owner: SignerWithAddress; diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts index c994fb4dd..413103ba5 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.behaviour.ts @@ -15,7 +15,7 @@ import { UniversalReceiverDelegateRevert__factory, TokenReceiverWithLSP1Revert, TokenReceiverWithLSP1Revert__factory, -} from '../../../../types'; +} from '../../types'; // helpers import { tokenIdAsBytes32 } from '../utils/tokens'; diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts index 1af3e4ab2..b1477a821 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/LSP8Mintable.behaviour.ts @@ -7,7 +7,7 @@ import { LSP6KeyManager, UniversalReceiverDelegateTokenReentrant__factory, LSP8Mintable, -} from '../../../../types'; +} from '../../types'; import { setupProfileWithKeyManagerWithURD } from '../utils/fixtures'; diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts index b994333df..334b57121 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8BurnableInit.test.ts @@ -2,7 +2,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { LSP8BurnableInitTester, LSP8BurnableInitTester__factory } from '../../../../../types'; +import { LSP8BurnableInitTester, LSP8BurnableInitTester__factory } from '../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts index 7c0f6cbde..0e9a4787b 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8CappedSupplyInit.test.ts @@ -1,9 +1,6 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { - LSP8CappedSupplyInitTester, - LSP8CappedSupplyInitTester__factory, -} from '../../../../../types'; +import { LSP8CappedSupplyInitTester, LSP8CappedSupplyInitTester__factory } from '../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts index 434eb121c..0f17109aa 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8EnumerableInit.test.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { LSP8EnumerableInitTester, LSP8EnumerableInitTester__factory } from '../../../../../types'; +import { LSP8EnumerableInitTester, LSP8EnumerableInitTester__factory } from '../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts index 8df3b62ee..a593d8fc3 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8IdentifiableDigitalAssetInit.test.ts @@ -1,11 +1,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { - LSP8InitTester__factory, - LSP8IdentifiableDigitalAsset, - LSP8Tester, -} from '../../../../../types'; +import { LSP8InitTester__factory, LSP8IdentifiableDigitalAsset, LSP8Tester } from '../../../types'; import { getNamedAccounts, diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts index 9eb3bf32f..101701d7f 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/proxy/LSP8MintableInit.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP8MintableInit, LSP8MintableInit__factory } from '../../../../../types'; +import { LSP8MintableInit, LSP8MintableInit__factory } from '../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts index 7ebdeb6e8..7e0c8f1b2 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Burnable.test.ts @@ -1,7 +1,7 @@ import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; -import { LSP8BurnableTester, LSP8BurnableTester__factory } from '../../../../../types'; +import { LSP8BurnableTester, LSP8BurnableTester__factory } from '../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { LSP4_TOKEN_TYPES } from '@lukso/lsp4-contracts'; diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts index 438ccf9d1..687244673 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8CappedSupply.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; -import { LSP8CappedSupplyTester__factory } from '../../../../../types'; +import { LSP8CappedSupplyTester__factory } from '../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts index 213d06c97..5147b873a 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Enumerable.test.ts @@ -1,4 +1,4 @@ -import { LSP8EnumerableTester, LSP8EnumerableTester__factory } from '../../../../../types'; +import { LSP8EnumerableTester, LSP8EnumerableTester__factory } from '../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts index 261180551..7946782ce 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8IdentifiableDigitalAsset.test.ts @@ -1,7 +1,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { LSP8Tester__factory, LSP8IdentifiableDigitalAsset } from '../../../../../types'; +import { LSP8Tester__factory, LSP8IdentifiableDigitalAsset } from '../../../types'; import { getNamedAccounts, diff --git a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts index 0b3be89ce..656a72d24 100644 --- a/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP8IdentifiableDigitalAsset/standard/LSP8Mintable.test.ts @@ -1,6 +1,6 @@ import { LSP4_TOKEN_TYPES } from '@lukso/lsp4-contracts'; import { LSP8_TOKEN_ID_FORMAT } from '@lukso/lsp8-contracts'; -import { LSP8Mintable, LSP8Mintable__factory } from '../../../../../types'; +import { LSP8Mintable, LSP8Mintable__factory } from '../../../types'; import { shouldInitializeLikeLSP8 } from '../LSP8IdentifiableDigitalAsset.behaviour'; import { diff --git a/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.behaviour.ts b/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.behaviour.ts index deca783de..5959a7f6c 100644 --- a/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.behaviour.ts +++ b/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.behaviour.ts @@ -11,7 +11,7 @@ import { UniversalReceiverDelegateVaultReentrantB__factory, UniversalReceiverDelegateVaultMalicious__factory, LSP9Vault, -} from '../../../../types'; +} from '../../types'; // helpers import { ARRAY_LENGTH, abiCoder, combineAllowedCalls } from '../utils/helpers'; diff --git a/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.test.ts b/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.test.ts index 0189281bf..a6f917e32 100644 --- a/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9Vault.test.ts @@ -6,7 +6,7 @@ import { shouldBehaveLikeLSP14, } from '../LSP14Ownable2Step/LSP14Ownable2Step.behaviour'; -import { UniversalProfile, LSP6KeyManager, LSP9Vault__factory } from '../../../../types'; +import { UniversalProfile, LSP6KeyManager, LSP9Vault__factory } from '../../types'; import { getNamedAccounts, diff --git a/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9VaultInit.test.ts b/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9VaultInit.test.ts index 7e1436a81..278ef4091 100644 --- a/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9VaultInit.test.ts +++ b/packages/lsp-smart-contracts/tests/LSP9Vault/LSP9VaultInit.test.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { shouldBehaveLikeLSP14 } from '../LSP14Ownable2Step/LSP14Ownable2Step.behaviour'; -import { UniversalProfile, LSP6KeyManager, LSP9VaultInit__factory } from '../../../../types'; +import { UniversalProfile, LSP6KeyManager, LSP9VaultInit__factory } from '../../types'; import { getNamedAccounts, diff --git a/packages/lsp-smart-contracts/tests/Mocks/ABIEncoder.test.ts b/packages/lsp-smart-contracts/tests/Mocks/ABIEncoder.test.ts index 3880c310b..d57b1d76a 100644 --- a/packages/lsp-smart-contracts/tests/Mocks/ABIEncoder.test.ts +++ b/packages/lsp-smart-contracts/tests/Mocks/ABIEncoder.test.ts @@ -1,7 +1,7 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers'; import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { ABIEncoder, ABIEncoder__factory } from '../../../../types'; +import { ABIEncoder, ABIEncoder__factory } from '../../types'; describe('ABI Encoder Contract', () => { let accounts: SignerWithAddress[]; diff --git a/packages/lsp-smart-contracts/tests/Mocks/ERC165Interfaces.test.ts b/packages/lsp-smart-contracts/tests/Mocks/ERC165Interfaces.test.ts index 7c1a74eeb..72d10f1d7 100644 --- a/packages/lsp-smart-contracts/tests/Mocks/ERC165Interfaces.test.ts +++ b/packages/lsp-smart-contracts/tests/Mocks/ERC165Interfaces.test.ts @@ -6,7 +6,7 @@ import { CalculateLSPInterfaces__factory, CalculateERCInterfaces, CalculateERCInterfaces__factory, -} from '../../../../types'; +} from '../../types'; // utils import { INTERFACE_IDS } from '../../constants'; diff --git a/packages/lsp-smart-contracts/tests/Mocks/KeyManagerExecutionCosts.test.ts b/packages/lsp-smart-contracts/tests/Mocks/KeyManagerExecutionCosts.test.ts index 6077d66ad..c97664dd1 100644 --- a/packages/lsp-smart-contracts/tests/Mocks/KeyManagerExecutionCosts.test.ts +++ b/packages/lsp-smart-contracts/tests/Mocks/KeyManagerExecutionCosts.test.ts @@ -1,11 +1,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; -import { - UniversalProfile__factory, - LSP6KeyManager__factory, - UniversalProfile, -} from '../../../../types'; +import { UniversalProfile__factory, LSP6KeyManager__factory, UniversalProfile } from '../../types'; import { ERC725YDataKeys, INTERFACE_IDS } from '../../constants'; import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; import { ALL_PERMISSIONS, PERMISSIONS, CALLTYPE } from '@lukso/lsp6-contracts'; diff --git a/packages/lsp-smart-contracts/tests/Mocks/LSP1TypeIDs.test.ts b/packages/lsp-smart-contracts/tests/Mocks/LSP1TypeIDs.test.ts index 71e9ac75f..db54ed79a 100644 --- a/packages/lsp-smart-contracts/tests/Mocks/LSP1TypeIDs.test.ts +++ b/packages/lsp-smart-contracts/tests/Mocks/LSP1TypeIDs.test.ts @@ -1,7 +1,7 @@ import { ethers } from 'hardhat'; import { expect } from 'chai'; import { hexlify, keccak256, toUtf8Bytes } from 'ethers'; -import { LSP1TypeIDsTester, LSP1TypeIDsTester__factory } from '../../../../types'; +import { LSP1TypeIDsTester, LSP1TypeIDsTester__factory } from '../../types'; import { LSP1_TYPE_IDS } from '../../constants'; describe('calculate LSP1 Type IDs', () => { diff --git a/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts index 856239b10..095fc77a4 100644 --- a/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XBatchExecuteToERC725XExecute.test.ts @@ -26,7 +26,7 @@ import { loadTestCase, } from './reentrancyHelpers'; -import { LSP20ReentrantContract__factory } from '../../../../../types'; +import { LSP20ReentrantContract__factory } from '../../../types'; import { Interface } from 'ethers'; import { provider } from '../../utils/helpers'; diff --git a/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts index 84ab2c653..ae749dd20 100644 --- a/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XBatchExecute.test.ts @@ -26,7 +26,7 @@ import { loadTestCase, } from './reentrancyHelpers'; -import { LSP20ReentrantContractBatch__factory } from '../../../../../types'; +import { LSP20ReentrantContractBatch__factory } from '../../../types'; import { Interface } from 'ethers'; import { provider } from '../../utils/helpers'; diff --git a/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XExecute.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XExecute.test.ts index 605599f81..1e6f228a2 100644 --- a/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XExecute.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToERC725XExecute.test.ts @@ -25,7 +25,7 @@ import { // Functions loadTestCase, } from './reentrancyHelpers'; -import { LSP20ReentrantContract__factory } from '../../../../../types'; +import { LSP20ReentrantContract__factory } from '../../../types'; import { provider } from '../../utils/helpers'; export const testERC725XExecuteToERC725XExecute = ( diff --git a/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts index 9fa0e958b..f2a07018b 100644 --- a/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6BatchExecuteRelayCall.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; // types import { BytesLike } from 'ethers'; -import { SingleReentrancyRelayer__factory } from '../../../../../types'; +import { SingleReentrancyRelayer__factory } from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts index 862b116be..56688f4f6 100644 --- a/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/ERC725XExecuteToLSP6ExecuteRelayCall.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; // types import { BytesLike } from 'ethers'; -import { SingleReentrancyRelayer__factory } from '../../../../../types'; +import { SingleReentrancyRelayer__factory } from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/reentrancyHelpers.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/reentrancyHelpers.ts index d91680810..b09c0ceaf 100644 --- a/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/reentrancyHelpers.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP20/reentrancyHelpers.ts @@ -13,7 +13,7 @@ import { SingleReentrancyRelayer__factory, BatchReentrancyRelayer__factory, UniversalProfile__factory, -} from '../../../../../types'; +} from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/LSP6Reentrancy.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/LSP6Reentrancy.test.ts index 24004c3d5..0432f25fc 100644 --- a/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/LSP6Reentrancy.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/LSP6Reentrancy.test.ts @@ -45,7 +45,7 @@ import { SecondToCallLSP6, FirstToCallLSP6, UniversalReceiverDelegateDataUpdater__factory, -} from '../../../../../types'; +} from '../../../types'; import { setupKeyManager } from '../../utils/fixtures'; diff --git a/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecuteRelayCall.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecuteRelayCall.test.ts index d82af4321..73f8a3f64 100644 --- a/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecuteRelayCall.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteRelayCallToSingleExecuteRelayCall.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; // types import { BytesLike } from 'ethers'; -import { SingleReentrancyRelayer__factory, UniversalProfile__factory } from '../../../../../types'; +import { SingleReentrancyRelayer__factory, UniversalProfile__factory } from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts index 0fcc1025b..993208a1a 100644 --- a/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/SingleExecuteToBatchExecuteRelayCall.test.ts @@ -3,7 +3,7 @@ import { ethers } from 'hardhat'; // types import { BytesLike } from 'ethers'; -import { SingleReentrancyRelayer__factory, UniversalProfile__factory } from '../../../../../types'; +import { SingleReentrancyRelayer__factory, UniversalProfile__factory } from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/reentrancyHelpers.ts b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/reentrancyHelpers.ts index 4bbc74851..ed2de317e 100644 --- a/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/reentrancyHelpers.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/LSP6/reentrancyHelpers.ts @@ -13,7 +13,7 @@ import { SingleReentrancyRelayer__factory, BatchReentrancyRelayer__factory, UniversalProfile__factory, -} from '../../../../../types'; +} from '../../../types'; // constants import { ERC725YDataKeys } from '../../../constants'; diff --git a/packages/lsp-smart-contracts/tests/Reentrancy/Reentrancy.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/Reentrancy.test.ts index d63c99c79..ad88f6506 100644 --- a/packages/lsp-smart-contracts/tests/Reentrancy/Reentrancy.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/Reentrancy.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; -import { UniversalProfile__factory, LSP6KeyManager__factory } from '../../../../types'; +import { UniversalProfile__factory, LSP6KeyManager__factory } from '../../types'; import { LSP6TestContext } from '../utils/context'; diff --git a/packages/lsp-smart-contracts/tests/Reentrancy/ReentrancyInit.test.ts b/packages/lsp-smart-contracts/tests/Reentrancy/ReentrancyInit.test.ts index 0dbd9d764..584a043ca 100644 --- a/packages/lsp-smart-contracts/tests/Reentrancy/ReentrancyInit.test.ts +++ b/packages/lsp-smart-contracts/tests/Reentrancy/ReentrancyInit.test.ts @@ -1,6 +1,6 @@ import { ethers } from 'hardhat'; -import { UniversalProfileInit__factory, LSP6KeyManagerInit__factory } from '../../../../types'; +import { UniversalProfileInit__factory, LSP6KeyManagerInit__factory } from '../../types'; import { deployProxy } from '../utils/fixtures'; import { LSP6TestContext } from '../utils/context'; diff --git a/packages/lsp-smart-contracts/tests/utils/context.ts b/packages/lsp-smart-contracts/tests/utils/context.ts index cba5b0867..0c561184c 100644 --- a/packages/lsp-smart-contracts/tests/utils/context.ts +++ b/packages/lsp-smart-contracts/tests/utils/context.ts @@ -1,9 +1,5 @@ import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers.js'; -import { - KeyManagerInternalTester, - LSP6KeyManager, - UniversalProfile, -} from '../../../../types/index.js'; +import { KeyManagerInternalTester, LSP6KeyManager, UniversalProfile } from '../../types/index.js'; export type LSP6TestContext = { accounts: SignerWithAddress[]; diff --git a/packages/lsp-smart-contracts/tests/utils/fixtures.ts b/packages/lsp-smart-contracts/tests/utils/fixtures.ts index 9943e3e13..bd3cf2f05 100644 --- a/packages/lsp-smart-contracts/tests/utils/fixtures.ts +++ b/packages/lsp-smart-contracts/tests/utils/fixtures.ts @@ -6,7 +6,7 @@ import { LSP1UniversalReceiverDelegateUP__factory, LSP6KeyManager__factory, UniversalProfile__factory, -} from '../../../../types'; +} from '../../types'; import { ERC725YDataKeys } from '../../constants'; import { PERMISSIONS, ALL_PERMISSIONS } from '@lukso/lsp6-contracts'; From 81f0e0fc0098cbf8c636b7a0d64a62f64a3e232f Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 16:06:52 -0700 Subject: [PATCH 18/21] build: adjust foundry build settings to prevent race condition when installing solc in CI --- .github/workflows/foundry-tests.yml | 4 +++- foundry.toml | 2 +- package.json | 1 + packages/lsp-smart-contracts/package.json | 1 + .../lsp16-contracts/contracts/{Mock => Mocks}/Account.sol | 0 .../lsp16-contracts/contracts/{Mock => Mocks}/AccountInit.sol | 0 .../contracts/{Mock => Mocks}/ContractNoConstructor.sol | 0 .../contracts/{Mock => Mocks}/FallbackContract.sol | 0 .../contracts/{Mock => Mocks}/FallbackInitializer.sol | 0 .../contracts/{Mock => Mocks}/ImplementationTester.sol | 0 .../contracts/{Mock => Mocks}/NonPayableContract.sol | 0 .../contracts/{Mock => Mocks}/NonPayableFallback.sol | 0 .../contracts/{Mock => Mocks}/PayableContract.sol | 0 packages/lsp16-contracts/package.json | 3 ++- packages/lsp2-contracts/package.json | 1 + packages/lsp6-contracts/package.json | 1 + template/package.json | 3 ++- turbo.json | 4 ++++ 18 files changed, 16 insertions(+), 4 deletions(-) rename packages/lsp16-contracts/contracts/{Mock => Mocks}/Account.sol (100%) rename packages/lsp16-contracts/contracts/{Mock => Mocks}/AccountInit.sol (100%) rename packages/lsp16-contracts/contracts/{Mock => Mocks}/ContractNoConstructor.sol (100%) rename packages/lsp16-contracts/contracts/{Mock => Mocks}/FallbackContract.sol (100%) rename packages/lsp16-contracts/contracts/{Mock => Mocks}/FallbackInitializer.sol (100%) rename packages/lsp16-contracts/contracts/{Mock => Mocks}/ImplementationTester.sol (100%) rename packages/lsp16-contracts/contracts/{Mock => Mocks}/NonPayableContract.sol (100%) rename packages/lsp16-contracts/contracts/{Mock => Mocks}/NonPayableFallback.sol (100%) rename packages/lsp16-contracts/contracts/{Mock => Mocks}/PayableContract.sol (100%) diff --git a/.github/workflows/foundry-tests.yml b/.github/workflows/foundry-tests.yml index 4e61c5f43..b0789c51d 100644 --- a/.github/workflows/foundry-tests.yml +++ b/.github/workflows/foundry-tests.yml @@ -24,7 +24,9 @@ jobs: run: npm ci - name: NPM build - run: npm run build + run: | + npm run build + npm run build:foundry - name: Run Foundry tests run: npm run test:foundry diff --git a/foundry.toml b/foundry.toml index a180557c9..8271ca127 100644 --- a/foundry.toml +++ b/foundry.toml @@ -28,5 +28,5 @@ out = 'packages/lsp16-contracts/contracts/foundry_artifacts' [profile.lsp_smart_contracts] src = 'packages/lsp-smart-contracts/contracts' -test = 'packages/lsp-smart-contracts/foundry' +test = 'packages/lsp-smart-contracts/tests/foundry' out = 'packages/lsp-smart-contracts/contracts/foundry_artifacts' diff --git a/package.json b/package.json index 62c785643..aa55582e5 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "scripts": { "preinstall": "npx --yes force-resolutions", "build": "turbo build", + "build:foundry": "turbo build:foundry", "build:js": "turbo build:js", "clean": "turbo clean", "format": "prettier --write .", diff --git a/packages/lsp-smart-contracts/package.json b/packages/lsp-smart-contracts/package.json index a880b7620..07a6bf898 100644 --- a/packages/lsp-smart-contracts/package.json +++ b/packages/lsp-smart-contracts/package.json @@ -51,6 +51,7 @@ }, "scripts": { "build": "hardhat compile --show-stack-traces", + "build:foundry": "forge build", "build:js": "unbuild", "build:docs": "hardhat dodoc && prettier -w ./docs", "clean": "hardhat clean && rm -Rf dist/", diff --git a/packages/lsp16-contracts/contracts/Mock/Account.sol b/packages/lsp16-contracts/contracts/Mocks/Account.sol similarity index 100% rename from packages/lsp16-contracts/contracts/Mock/Account.sol rename to packages/lsp16-contracts/contracts/Mocks/Account.sol diff --git a/packages/lsp16-contracts/contracts/Mock/AccountInit.sol b/packages/lsp16-contracts/contracts/Mocks/AccountInit.sol similarity index 100% rename from packages/lsp16-contracts/contracts/Mock/AccountInit.sol rename to packages/lsp16-contracts/contracts/Mocks/AccountInit.sol diff --git a/packages/lsp16-contracts/contracts/Mock/ContractNoConstructor.sol b/packages/lsp16-contracts/contracts/Mocks/ContractNoConstructor.sol similarity index 100% rename from packages/lsp16-contracts/contracts/Mock/ContractNoConstructor.sol rename to packages/lsp16-contracts/contracts/Mocks/ContractNoConstructor.sol diff --git a/packages/lsp16-contracts/contracts/Mock/FallbackContract.sol b/packages/lsp16-contracts/contracts/Mocks/FallbackContract.sol similarity index 100% rename from packages/lsp16-contracts/contracts/Mock/FallbackContract.sol rename to packages/lsp16-contracts/contracts/Mocks/FallbackContract.sol diff --git a/packages/lsp16-contracts/contracts/Mock/FallbackInitializer.sol b/packages/lsp16-contracts/contracts/Mocks/FallbackInitializer.sol similarity index 100% rename from packages/lsp16-contracts/contracts/Mock/FallbackInitializer.sol rename to packages/lsp16-contracts/contracts/Mocks/FallbackInitializer.sol diff --git a/packages/lsp16-contracts/contracts/Mock/ImplementationTester.sol b/packages/lsp16-contracts/contracts/Mocks/ImplementationTester.sol similarity index 100% rename from packages/lsp16-contracts/contracts/Mock/ImplementationTester.sol rename to packages/lsp16-contracts/contracts/Mocks/ImplementationTester.sol diff --git a/packages/lsp16-contracts/contracts/Mock/NonPayableContract.sol b/packages/lsp16-contracts/contracts/Mocks/NonPayableContract.sol similarity index 100% rename from packages/lsp16-contracts/contracts/Mock/NonPayableContract.sol rename to packages/lsp16-contracts/contracts/Mocks/NonPayableContract.sol diff --git a/packages/lsp16-contracts/contracts/Mock/NonPayableFallback.sol b/packages/lsp16-contracts/contracts/Mocks/NonPayableFallback.sol similarity index 100% rename from packages/lsp16-contracts/contracts/Mock/NonPayableFallback.sol rename to packages/lsp16-contracts/contracts/Mocks/NonPayableFallback.sol diff --git a/packages/lsp16-contracts/contracts/Mock/PayableContract.sol b/packages/lsp16-contracts/contracts/Mocks/PayableContract.sol similarity index 100% rename from packages/lsp16-contracts/contracts/Mock/PayableContract.sol rename to packages/lsp16-contracts/contracts/Mocks/PayableContract.sol diff --git a/packages/lsp16-contracts/package.json b/packages/lsp16-contracts/package.json index a3fc95337..aa449a17f 100644 --- a/packages/lsp16-contracts/package.json +++ b/packages/lsp16-contracts/package.json @@ -34,12 +34,13 @@ ], "scripts": { "build": "hardhat compile --show-stack-traces", + "build:foundry": "forge build", "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'", "test": "hardhat test --no-compile tests/*.test.ts", - "test:foundry": "forge test --no-match-test Skip -vvv", + "test:foundry": "FOUNDRY_PROFILE=lsp16 forge test --no-match-test Skip -vvv", "test:coverage": "hardhat coverage" }, "dependencies": { diff --git a/packages/lsp2-contracts/package.json b/packages/lsp2-contracts/package.json index ee15a14a2..003a1a37a 100644 --- a/packages/lsp2-contracts/package.json +++ b/packages/lsp2-contracts/package.json @@ -35,6 +35,7 @@ ], "scripts": { "build": "hardhat compile --show-stack-traces", + "build:foundry": "forge build", "build:js": "unbuild", "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", diff --git a/packages/lsp6-contracts/package.json b/packages/lsp6-contracts/package.json index 3da3a906d..a711a73f5 100644 --- a/packages/lsp6-contracts/package.json +++ b/packages/lsp6-contracts/package.json @@ -35,6 +35,7 @@ ], "scripts": { "build": "hardhat compile --show-stack-traces", + "build:foundry": "forge build", "build:js": "unbuild", "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", diff --git a/template/package.json b/template/package.json index 032bd2e76..69bf393d1 100644 --- a/template/package.json +++ b/template/package.json @@ -28,13 +28,14 @@ ], "scripts": { "build": "hardhat compile --show-stack-traces", + "build:foundry": "forge build", "build:js": "unbuild", "clean": "hardhat clean && rm -Rf dist/", "format": "prettier --write .", "lint": "eslint . --ext .ts,.js", "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'", "test": "hardhat test --no-compile tests/*.test.ts", - "test:foundry": "forge test --no-match-test Skip -vvv", + "test:foundry": "FOUNDRY_PROFILE=lspN forge test --no-match-test Skip -vvv", "test:coverage": "hardhat coverage" }, "dependencies": { diff --git a/turbo.json b/turbo.json index df7d2978b..0df2a29f1 100644 --- a/turbo.json +++ b/turbo.json @@ -7,6 +7,9 @@ "outputs": ["**/artifacts/**", "types/**", "**/types/**"], "cache": true }, + "build:foundry": { + "cache": true + }, "build:js": { "outputs": ["**/dist/**"], "cache": true @@ -29,6 +32,7 @@ "cache": false }, "test:foundry": { + "dependsOn": ["^build", "^build:foundry"], "cache": true } } From b1c42e683667afc7bfab9575a2b3c18bcf90246b Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 17:24:49 -0700 Subject: [PATCH 19/21] chore: ignore temporarily lsp16 package for foundry tests --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aa55582e5..159682858 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "lint:solidity": "turbo lint:solidity", "package": "turbo package", "test": "turbo test", - "test:foundry": "turbo test:foundry", + "test:foundry": "turbo test:foundry --scope='!@lukso/lsp16-contracts'", "test:benchmark": "hardhat test --no-compile tests/Benchmark.test.ts", "test:coverage": "turbo test:coverage", "test:mocks": "hardhat test --no-compile packages/lsp-smart-contracts/tests/Mocks/*.test.ts", From 892c2d11a1551bd6fbe8df3fbbd13d1e90800a65 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Wed, 28 Feb 2024 17:34:08 -0700 Subject: [PATCH 20/21] ci: disable temporarily foundry gas report in CI --- .github/workflows/foundry-tests.yml | 30 +++++++++++------------ packages/lsp-smart-contracts/package.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/foundry-tests.yml b/.github/workflows/foundry-tests.yml index b0789c51d..0f450fc69 100644 --- a/.github/workflows/foundry-tests.yml +++ b/.github/workflows/foundry-tests.yml @@ -36,18 +36,18 @@ jobs: # due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds) FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }} - - name: Compare gas reports - uses: Rubilmax/foundry-gas-diff@v3.13.1 - with: - summaryQuantile: 0.9 # only display the 10% most significant gas diffs in the summary (defaults to 20%) - sortCriteria: avg,max # sort diff rows by criteria - sortOrders: desc,asc # and directions - id: gas_diff - - - name: Add gas diff to sticky comment - if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target' - uses: marocchino/sticky-pull-request-comment@v2 - with: - # delete the comment in case changes no longer impact gas costs - delete: ${{ !steps.gas_diff.outputs.markdown }} - message: ${{ steps.gas_diff.outputs.markdown }} + # - name: Compare gas reports + # uses: Rubilmax/foundry-gas-diff@v3.13.1 + # with: + # summaryQuantile: 0.9 # only display the 10% most significant gas diffs in the summary (defaults to 20%) + # sortCriteria: avg,max # sort diff rows by criteria + # sortOrders: desc,asc # and directions + # id: gas_diff + + # - name: Add gas diff to sticky comment + # if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target' + # uses: marocchino/sticky-pull-request-comment@v2 + # with: + # # delete the comment in case changes no longer impact gas costs + # delete: ${{ !steps.gas_diff.outputs.markdown }} + # message: ${{ steps.gas_diff.outputs.markdown }} diff --git a/packages/lsp-smart-contracts/package.json b/packages/lsp-smart-contracts/package.json index 07a6bf898..d504eb7e3 100644 --- a/packages/lsp-smart-contracts/package.json +++ b/packages/lsp-smart-contracts/package.json @@ -60,7 +60,7 @@ "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'", "package": "hardhat prepare-package", "test": "hardhat test --no-compile tests/**/*.test.ts", - "test:foundry": "FOUNDRY_PROFILE=lsp_smart_contracts forge test --no-match-test Skip -vvv --gas-report > gasreport.ansi", + "test:foundry": "FOUNDRY_PROFILE=lsp_smart_contracts forge test --no-match-test Skip -vvv", "test:coverage": "hardhat coverage" }, "dependencies": { From f3528921070b4d7c14f0e14a32cff98c3b50473b Mon Sep 17 00:00:00 2001 From: CJ42 Date: Thu, 29 Feb 2024 15:02:29 -0700 Subject: [PATCH 21/21] ci: specify working directory for gas benchmark CI --- .github/workflows/benchmark.yml | 5 ++++- package.json | 1 - packages/lsp-smart-contracts/package.json | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index d5329e7a1..0005deac8 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -13,7 +13,7 @@ on: # compare gas diff only when editing Solidity smart contract code paths: - - "contracts/**/*.sol" + - "packages/**/contracts/**/*.sol" # do not run on releases (merging to main) branches-ignore: @@ -22,6 +22,9 @@ on: jobs: benchmark: runs-on: ubuntu-latest + defaults: + run: + working-directory: ./packages/lsp-smart-contracts steps: - name: Checkout base branch diff --git a/package.json b/package.json index 159682858..3ffb7bbdc 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "package": "turbo package", "test": "turbo test", "test:foundry": "turbo test:foundry --scope='!@lukso/lsp16-contracts'", - "test:benchmark": "hardhat test --no-compile tests/Benchmark.test.ts", "test:coverage": "turbo test:coverage", "test:mocks": "hardhat test --no-compile packages/lsp-smart-contracts/tests/Mocks/*.test.ts", "test:up": "hardhat test --no-compile packages/lsp-smart-contracts/tests/UniversalProfile.test.ts", diff --git a/packages/lsp-smart-contracts/package.json b/packages/lsp-smart-contracts/package.json index d504eb7e3..39f28d2c0 100644 --- a/packages/lsp-smart-contracts/package.json +++ b/packages/lsp-smart-contracts/package.json @@ -61,7 +61,8 @@ "package": "hardhat prepare-package", "test": "hardhat test --no-compile tests/**/*.test.ts", "test:foundry": "FOUNDRY_PROFILE=lsp_smart_contracts forge test --no-match-test Skip -vvv", - "test:coverage": "hardhat coverage" + "test:coverage": "hardhat coverage", + "test:benchmark": "hardhat test --no-compile tests/Benchmark.test.ts" }, "dependencies": { "@lukso/lsp0-contracts": "*",