Skip to content

Commit

Permalink
build!: move LSP9 in its own package (#869)
Browse files Browse the repository at this point in the history
  • Loading branch information
b00ste authored Feb 8, 2024
1 parent ad785db commit 84a817d
Show file tree
Hide file tree
Showing 32 changed files with 415 additions and 119 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/solc_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
lsp6/=packages/LSP6KeyManager/ \
lsp7/=packages/LSP7DigitalAsset/ \
lsp8/=packages/LSP8IdentifiableDigitalAsset/ \
lsp9/=packages/LSP9Vault/ \
lsp10/=packages/LSP10ReceivedVaults/ \
lsp14/=packages/LSP14Ownable2Step/ \
lsp16/=packages/LSP16UniversalFactory/ \
Expand All @@ -111,6 +112,7 @@ jobs:
lsp6/=packages/LSP6KeyManager/ \
lsp7/=packages/LSP7DigitalAsset/ \
lsp8/=packages/LSP8IdentifiableDigitalAsset/ \
lsp9/=packages/LSP9Vault/ \
lsp10/=packages/LSP10ReceivedVaults/ \
lsp14/=packages/LSP14Ownable2Step/ \
lsp16/=packages/LSP16UniversalFactory/ \
Expand Down
4 changes: 2 additions & 2 deletions .mythx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ analyze:
- contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol
- contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol
# - Vault & Social Recovery
- contracts/LSP9Vault/LSP9Vault.sol
- lsp9/contracts/LSP9Vault.sol
- contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.sol

# Proxy version
Expand All @@ -53,7 +53,7 @@ analyze:
- contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol
- contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol
# - Vault & Social Recovery
- contracts/LSP9Vault/LSP9VaultInit.sol
- lsp9/contracts/LSP9VaultInit.sol
- contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.sol

# Generic Modules & Factories
Expand Down
7 changes: 7 additions & 0 deletions contracts/Imports.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.4;

// solhint-disable no-unused-import

import {LSP9Vault} from "lsp9/contracts/LSP9Vault.sol";
import {LSP9VaultInit} from "lsp9/contracts/LSP9VaultInit.sol";
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
import {
_TYPEID_LSP9_OwnershipTransferred_SenderNotification,
_TYPEID_LSP9_OwnershipTransferred_RecipientNotification
} from "../../LSP9Vault/LSP9Constants.sol";
} from "lsp9/contracts/LSP9Constants.sol";

// errors
import {CannotRegisterEOAsAsAssets} from "../LSP1Errors.sol";
Expand Down
4 changes: 2 additions & 2 deletions contracts/Mocks/ERC165Interfaces.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import {
ILSP8IdentifiableDigitalAsset as ILSP8
} from "lsp8/contracts/ILSP8IdentifiableDigitalAsset.sol";

import {ILSP9Vault as ILSP9} from "../LSP9Vault/ILSP9Vault.sol";
import {ILSP9Vault as ILSP9} from "lsp9/contracts/ILSP9Vault.sol";
import {
ILSP11BasicSocialRecovery as ILSP11
} from "../LSP11BasicSocialRecovery/ILSP11BasicSocialRecovery.sol";
Expand All @@ -66,7 +66,7 @@ import {
import {_INTERFACEID_LSP6} from "lsp6/contracts/LSP6Constants.sol";
import {_INTERFACEID_LSP7} from "lsp7/contracts/LSP7Constants.sol";
import {_INTERFACEID_LSP8} from "lsp8/contracts/LSP8Constants.sol";
import {_INTERFACEID_LSP9} from "../LSP9Vault/LSP9Constants.sol";
import {_INTERFACEID_LSP9} from "lsp9/contracts/LSP9Constants.sol";
import {
_INTERFACEID_LSP11
} from "../LSP11BasicSocialRecovery/LSP11Constants.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/Mocks/LSP1TypeIDsTester.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
_TYPEID_LSP9_OwnershipTransferStarted,
_TYPEID_LSP9_OwnershipTransferred_SenderNotification,
_TYPEID_LSP9_OwnershipTransferred_RecipientNotification
} from "../LSP9Vault/LSP9Constants.sol";
} from "lsp9/contracts/LSP9Constants.sol";
import {
_TYPEID_LSP14_OwnershipTransferStarted,
_TYPEID_LSP14_OwnershipTransferred_SenderNotification,
Expand Down
2 changes: 1 addition & 1 deletion contracts/Mocks/UPWithInstantAcceptOwnership.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "lsp0/contracts/LSP0Constants.sol";
import {
_TYPEID_LSP9_OwnershipTransferStarted
} from "../LSP9Vault/LSP9Constants.sol";
} from "lsp9/contracts/LSP9Constants.sol";
import {
_TYPEID_LSP14_OwnershipTransferStarted
} from "lsp14/contracts/LSP14Constants.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {_TYPEID_LSP0_VALUE_RECEIVED} from "lsp0/contracts/LSP0Constants.sol";

import {_INTERFACEID_LSP1_DELEGATE} from "lsp1/contracts/LSP1Constants.sol";

import {_TYPEID_LSP9_VALUE_RECEIVED} from "../../LSP9Vault/LSP9Constants.sol";
import {_TYPEID_LSP9_VALUE_RECEIVED} from "lsp9/contracts/LSP9Constants.sol";

contract UniversalReceiverDelegateDataLYX is
ERC165Storage,
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dodoc/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const dodocConfig = {
'contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol',
'contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol',
'lsp6/contracts/LSP6KeyManager.sol',
'contracts/LSP9Vault/LSP9Vault.sol',
'lsp9/contracts/LSP9Vault.sol',
'contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.sol',
'lsp14/contracts/LSP14Ownable2Step.sol',
'lsp16/contracts/LSP16UniversalFactory.sol',
Expand Down
57 changes: 57 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"lsp6": "*",
"lsp7": "*",
"lsp8": "*",
"lsp9": "*",
"lsp10": "*",
"lsp14": "*",
"lsp16": "*",
Expand Down
4 changes: 4 additions & 0 deletions packages/LSP9Vault/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ['custom'],
};
25 changes: 25 additions & 0 deletions packages/LSP9Vault/.solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"extends": "solhint:recommended",
"rules": {
"avoid-sha3": "error",
"avoid-suicide": "error",
"avoid-throw": "error",
"avoid-tx-origin": "error",
"check-send-result": "error",
"compiler-version": ["error", "^0.8.0"],
"func-visibility": ["error", { "ignoreConstructors": true }],
"not-rely-on-block-hash": "error",
"not-rely-on-time": "error",
"reentrancy": "error",
"constructor-syntax": "error",
"private-vars-leading-underscore": ["error", { "strict": false }],
"imports-on-top": "error",
"visibility-modifier-order": "error",
"no-unused-import": "error",
"no-global-import": "error",
"reason-string": ["warn", { "maxLength": 120 }],
"avoid-low-level-calls": "off",
"no-empty-blocks": ["error", { "ignoreConstructors": true }],
"custom-errors": "off"
}
}
3 changes: 3 additions & 0 deletions packages/LSP9Vault/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# LSP9 Vault

Package for the LSP9 Vault standard.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity ^0.8.4;
import {
OwnableUnset
} from "@erc725/smart-contracts/contracts/custom/OwnableUnset.sol";
import {Version} from "../Version.sol";
import {Version} from "./Version.sol";
import {LSP9VaultCore} from "./LSP9VaultCore.sol";

// libraries
Expand All @@ -17,7 +17,7 @@ import {
_LSP9_SUPPORTED_STANDARDS_VALUE,
_TYPEID_LSP9_VALUE_RECEIVED,
_TYPEID_LSP9_OwnershipTransferred_RecipientNotification
} from "../LSP9Vault/LSP9Constants.sol";
} from "./LSP9Constants.sol";

/**
* @title Implementation of LSP9Vault built on top of [ERC725], [LSP-1-UniversalReceiver]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.4;

// modules
import {Version} from "../Version.sol";
import {Version} from "./Version.sol";
import {LSP9VaultInitAbstract} from "./LSP9VaultInitAbstract.sol";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
_LSP9_SUPPORTED_STANDARDS_VALUE,
_TYPEID_LSP9_VALUE_RECEIVED,
_TYPEID_LSP9_OwnershipTransferred_RecipientNotification
} from "../LSP9Vault/LSP9Constants.sol";
} from "./LSP9Constants.sol";

/**
* @title Inheritable Proxy Implementation of LSP9Vault built on top of ERC725, LSP1UniversalReceiver
Expand Down
17 changes: 17 additions & 0 deletions packages/LSP9Vault/contracts/Version.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 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
}
Loading

0 comments on commit 84a817d

Please sign in to comment.