Skip to content

Commit

Permalink
build!: move LSP6 in its own package (#866)
Browse files Browse the repository at this point in the history
* build!: move LSP6 in its own package

* test: move most of LSP6 foundry tests in package

* docs: update paths for LSP6 auto-generated docs

* chore: disable prettier for permissions values

* test: fix import paths in Foundry tests at root
  • Loading branch information
CJ42 committed Feb 6, 2024
1 parent 403f2b9 commit 5a3e71b
Show file tree
Hide file tree
Showing 62 changed files with 1,128 additions and 2,724 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/solc_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ jobs:
lsp2/=packages/LSP2ERC725YJSONSchema/ \
lsp4/=packages/LSP4DigitalAssetMetadata/ \
lsp5/=packages/LSP5ReceivedAssets/ \
lsp6/=packages/LSP6KeyManager/ \
lsp10/=packages/LSP10ReceivedVaults/ \
lsp14/=packages/LSP14Ownable2Step/ \
lsp17contractextension/=packages/LSP17ContractExtension/ \
lsp20/=packages/LSP20CallVerification/ \
Expand All @@ -99,6 +101,8 @@ jobs:
lsp2/=packages/LSP2ERC725YJSONSchema/ \
lsp4/=packages/LSP4DigitalAssetMetadata/ \
lsp5/=packages/LSP5ReceivedAssets/ \
lsp6/=packages/LSP6KeyManager/ \
lsp10/=packages/LSP10ReceivedVaults/ \
lsp14/=packages/LSP14Ownable2Step/ \
lsp17contractextension/=packages/LSP17ContractExtension/ \
lsp20/=packages/LSP20CallVerification/ \
Expand Down
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/contracts/LSP6KeyManager/LSP6Constants.sol
/packages/LSP6KeyManager/contracts/LSP6Constants.sol
/artifacts
/cache
/types
Expand All @@ -10,4 +10,4 @@
/userdocs
/common
/package
/module
/module
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity ^0.8.4;
import {ILSP11BasicSocialRecovery} from "./ILSP11BasicSocialRecovery.sol";

// libraries
import {LSP6Utils} from "../LSP6KeyManager/LSP6Utils.sol";
import {LSP6Utils} from "lsp6/contracts/LSP6Utils.sol";

// modules
import {ERC725} from "@erc725/smart-contracts/contracts/ERC725.sol";
Expand All @@ -18,7 +18,7 @@ import {
} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

// constants
import {ALL_REGULAR_PERMISSIONS} from "../LSP6KeyManager/LSP6Constants.sol";
import {ALL_REGULAR_PERMISSIONS} from "lsp6/contracts/LSP6Constants.sol";
import {_INTERFACEID_LSP11} from "./LSP11Constants.sol";
import {
CallerIsNotGuardian,
Expand Down
2 changes: 1 addition & 1 deletion contracts/LSP17Extensions/Extension4337.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {

// librairies
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {LSP6Utils} from "../LSP6KeyManager/LSP6Utils.sol";
import {LSP6Utils} from "lsp6/contracts/LSP6Utils.sol";

// constants
import {
Expand Down
2 changes: 1 addition & 1 deletion contracts/LSP9Vault/LSP9VaultCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import {

import {
_LSP6KEY_ADDRESSPERMISSIONS_PREFIX
} from "../LSP6KeyManager/LSP6Constants.sol";
} from "lsp6/contracts/LSP6Constants.sol";
import {
_INTERFACEID_LSP9,
_TYPEID_LSP9_VALUE_RECEIVED,
Expand Down
4 changes: 2 additions & 2 deletions contracts/Mocks/ERC165Interfaces.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
ILSP1UniversalReceiverDelegate as ILSP1Delegate
} from "lsp1/contracts/ILSP1UniversalReceiverDelegate.sol";

import {ILSP6KeyManager as ILSP6} from "../LSP6KeyManager/ILSP6KeyManager.sol";
import {ILSP6KeyManager as ILSP6} from "lsp6/contracts/ILSP6KeyManager.sol";
import {
ILSP7DigitalAsset as ILSP7
} from "../LSP7DigitalAsset/ILSP7DigitalAsset.sol";
Expand Down Expand Up @@ -65,7 +65,7 @@ import {
_INTERFACEID_LSP1,
_INTERFACEID_LSP1_DELEGATE
} from "lsp1/contracts/LSP1Constants.sol";
import {_INTERFACEID_LSP6} from "../LSP6KeyManager/LSP6Constants.sol";
import {_INTERFACEID_LSP6} from "lsp6/contracts/LSP6Constants.sol";
import {_INTERFACEID_LSP7} from "../LSP7DigitalAsset/LSP7Constants.sol";
import {
_INTERFACEID_LSP8
Expand Down
4 changes: 2 additions & 2 deletions contracts/Mocks/Executor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {
import {
IERC725Y
} from "@erc725/smart-contracts/contracts/interfaces/IERC725Y.sol";
import {ILSP6KeyManager} from "../LSP6KeyManager/ILSP6KeyManager.sol";
import {ILSP6KeyManager} from "lsp6/contracts/ILSP6KeyManager.sol";

// modules
import {UniversalProfile} from "../UniversalProfile.sol";
import {LSP6KeyManager} from "../LSP6KeyManager/LSP6KeyManager.sol";
import {LSP6KeyManager} from "lsp6/contracts/LSP6KeyManager.sol";

// constants
import {
Expand Down
4 changes: 2 additions & 2 deletions contracts/Mocks/KeyManager/KeyManagerInternalsTester.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
pragma solidity ^0.8.4;

// libraries
import {LSP6Utils} from "../../LSP6KeyManager/LSP6Utils.sol";
import {LSP6Utils} from "lsp6/contracts/LSP6Utils.sol";

// modules
import {ERC725Y} from "@erc725/smart-contracts/contracts/ERC725Y.sol";
import {LSP6KeyManager} from "../../LSP6KeyManager/LSP6KeyManager.sol";
import {LSP6KeyManager} from "lsp6/contracts/LSP6KeyManager.sol";

/**
* Helper contract to test internal functions of the KeyManager
Expand Down
2 changes: 1 addition & 1 deletion contracts/Mocks/KeyManagerInitWithExtraParams.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.4;

import {LSP6KeyManagerInit} from "../LSP6KeyManager/LSP6KeyManagerInit.sol";
import {LSP6KeyManagerInit} from "lsp6/contracts/LSP6KeyManagerInit.sol";

contract KeyManagerInitWithExtraParams is LSP6KeyManagerInit {
address public firstParam;
Expand Down
2 changes: 1 addition & 1 deletion contracts/Mocks/KeyManagerWithExtraParams.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.4;

import {LSP6KeyManager} from "../LSP6KeyManager/LSP6KeyManager.sol";
import {LSP6KeyManager} from "lsp6/contracts/LSP6KeyManager.sol";

contract KeyManagerWithExtraParams is LSP6KeyManager {
address public immutable FIRST_PARAM;
Expand Down
2 changes: 1 addition & 1 deletion contracts/Mocks/Reentrancy/LSP20ReentrantContract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import {
_LSP6KEY_ADDRESSPERMISSIONS_PERMISSIONS_PREFIX,
ALL_REGULAR_PERMISSIONS
} from "../../LSP6KeyManager/LSP6Constants.sol";
} from "lsp6/contracts/LSP6Constants.sol";

contract LSP20ReentrantContract {
event ValueReceived(uint256);
Expand Down
2 changes: 1 addition & 1 deletion contracts/Mocks/Reentrancy/LSP20ReentrantContractBatch.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import {
_LSP6KEY_ADDRESSPERMISSIONS_PERMISSIONS_PREFIX,
ALL_REGULAR_PERMISSIONS
} from "../../LSP6KeyManager/LSP6Constants.sol";
} from "lsp6/contracts/LSP6Constants.sol";

contract LSP20ReentrantContractBatch {
event ValueReceived(uint256);
Expand Down
4 changes: 2 additions & 2 deletions contracts/Mocks/Reentrancy/ReentrantContract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.4;

// interfaces
import {ILSP6KeyManager} from "../../LSP6KeyManager/ILSP6KeyManager.sol";
import {ILSP6KeyManager} from "lsp6/contracts/ILSP6KeyManager.sol";

// constants
import {
Expand All @@ -11,7 +11,7 @@ import {

import {
_LSP6KEY_ADDRESSPERMISSIONS_PERMISSIONS_PREFIX
} from "../../LSP6KeyManager/LSP6Constants.sol";
} from "lsp6/contracts/LSP6Constants.sol";

contract ReentrantContract {
event ValueReceived(uint256);
Expand Down
2 changes: 1 addition & 1 deletion contracts/Mocks/Reentrancy/ThreeReentrancy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import {
IERC725X
} from "@erc725/smart-contracts/contracts/interfaces/IERC725X.sol";
import {ILSP6KeyManager} from "../../LSP6KeyManager/ILSP6KeyManager.sol";
import {ILSP6KeyManager} from "lsp6/contracts/ILSP6KeyManager.sol";

/**
* The purpose of these contracts is to perform tests on chained reentrancy scenarios
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.4;

// interfaces
import {ILSP6KeyManager} from "../../LSP6KeyManager/ILSP6KeyManager.sol";
import {ILSP6KeyManager} from "lsp6/contracts/ILSP6KeyManager.sol";
import {LSP14Ownable2Step} from "lsp14/contracts/LSP14Ownable2Step.sol";

import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity ^0.8.4;
import {
IERC725X
} from "@erc725/smart-contracts/contracts/interfaces/IERC725X.sol";
import {ILSP6KeyManager} from "../../LSP6KeyManager/ILSP6KeyManager.sol";
import {ILSP6KeyManager} from "lsp6/contracts/ILSP6KeyManager.sol";

import {
ILSP1UniversalReceiverDelegate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
} from "lsp1/contracts/LSP1Constants.sol";
import {
_LSP6KEY_ADDRESSPERMISSIONS_PREFIX
} from "../../LSP6KeyManager/LSP6Constants.sol";
} from "lsp6/contracts/LSP6Constants.sol";

import {
_LSP17_EXTENSION_PREFIX
Expand Down
Loading

0 comments on commit 5a3e71b

Please sign in to comment.