diff --git a/.github/workflows/solc_version.yml b/.github/workflows/solc_version.yml index 4d6915b51..0d58eba18 100644 --- a/.github/workflows/solc_version.yml +++ b/.github/workflows/solc_version.yml @@ -87,6 +87,7 @@ jobs: lsp4/=packages/LSP4DigitalAssetMetadata/ \ lsp5/=packages/LSP5ReceivedAssets/ \ lsp6/=packages/LSP6KeyManager/ \ + lsp9/=packages/LSP9Vault/ \ lsp10/=packages/LSP10ReceivedVaults/ \ lsp14/=packages/LSP14Ownable2Step/ \ lsp17contractextension/=packages/LSP17ContractExtension/ \ @@ -102,6 +103,7 @@ jobs: lsp4/=packages/LSP4DigitalAssetMetadata/ \ lsp5/=packages/LSP5ReceivedAssets/ \ lsp6/=packages/LSP6KeyManager/ \ + lsp9/=packages/LSP9Vault/ \ lsp10/=packages/LSP10ReceivedVaults/ \ lsp14/=packages/LSP14Ownable2Step/ \ lsp17contractextension/=packages/LSP17ContractExtension/ \ diff --git a/.mythx.yml b/.mythx.yml index d4b73d415..90ed58a19 100644 --- a/.mythx.yml +++ b/.mythx.yml @@ -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 @@ -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 diff --git a/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol b/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol index 3d33eaa27..0f30f159c 100644 --- a/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +++ b/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol @@ -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"; diff --git a/contracts/Mocks/ERC165Interfaces.sol b/contracts/Mocks/ERC165Interfaces.sol index 4fd49b7de..b16296455 100644 --- a/contracts/Mocks/ERC165Interfaces.sol +++ b/contracts/Mocks/ERC165Interfaces.sol @@ -45,7 +45,7 @@ import { ILSP8IdentifiableDigitalAsset as ILSP8 } from "../LSP8IdentifiableDigitalAsset/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"; @@ -70,7 +70,7 @@ import {_INTERFACEID_LSP7} from "../LSP7DigitalAsset/LSP7Constants.sol"; import { _INTERFACEID_LSP8 } from "../LSP8IdentifiableDigitalAsset/LSP8Constants.sol"; -import {_INTERFACEID_LSP9} from "../LSP9Vault/LSP9Constants.sol"; +import {_INTERFACEID_LSP9} from "lsp9/contracts/LSP9Constants.sol"; import { _INTERFACEID_LSP11 } from "../LSP11BasicSocialRecovery/LSP11Constants.sol"; diff --git a/contracts/Mocks/LSP1TypeIDsTester.sol b/contracts/Mocks/LSP1TypeIDsTester.sol index c2bab121e..48ae73e01 100644 --- a/contracts/Mocks/LSP1TypeIDsTester.sol +++ b/contracts/Mocks/LSP1TypeIDsTester.sol @@ -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, diff --git a/contracts/Mocks/UPWithInstantAcceptOwnership.sol b/contracts/Mocks/UPWithInstantAcceptOwnership.sol index 8ca1dbeeb..a121db352 100644 --- a/contracts/Mocks/UPWithInstantAcceptOwnership.sol +++ b/contracts/Mocks/UPWithInstantAcceptOwnership.sol @@ -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"; diff --git a/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataLYX.sol b/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataLYX.sol index d6589a8d1..381fab7d5 100644 --- a/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataLYX.sol +++ b/contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataLYX.sol @@ -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, diff --git a/dodoc/config.ts b/dodoc/config.ts index a0867a008..15d4c529a 100644 --- a/dodoc/config.ts +++ b/dodoc/config.ts @@ -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', 'contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol', diff --git a/package-lock.json b/package-lock.json index c4e18013d..849a381db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "lsp4": "*", "lsp5": "*", "lsp6": "*", + "lsp9": "*", "solidity-bytes-utils": "0.8.0" }, "devDependencies": { @@ -13547,6 +13548,10 @@ "resolved": "packages/LSP6KeyManager", "link": true }, + "node_modules/lsp9": { + "resolved": "packages/LSP9Vault", + "link": true + }, "node_modules/ltgt": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", @@ -24061,6 +24066,33 @@ "typechain": "^8.0.0", "typescript": "^5.3.3" } + }, + "packages/LSP9Vault": { + "version": "0.12.1", + "license": "Apache-2.0", + "dependencies": { + "@erc725/smart-contracts": "^7.0.0", + "@openzeppelin/contracts": "^4.9.3", + "lsp1": "*", + "lsp6": "*" + }, + "devDependencies": { + "@nomicfoundation/hardhat-toolbox": "^2.0.2", + "@typechain/ethers-v5": "^10.2.0", + "dotenv": "^16.0.3", + "eslint-config-custom": "*", + "ethers": "^5.7.2", + "hardhat": "^2.13.0", + "hardhat-contract-sizer": "^2.8.0", + "hardhat-deploy": "^0.11.25", + "hardhat-gas-reporter": "^1.0.9", + "hardhat-packager": "^1.4.2", + "solhint": "^3.3.6", + "ts-node": "^10.2.0", + "tsconfig": "*", + "typechain": "^8.0.0", + "typescript": "^5.3.3" + } } }, "dependencies": { @@ -34534,6 +34566,30 @@ "typescript": "^5.3.3" } }, + "lsp9": { + "version": "file:packages/LSP9Vault", + "requires": { + "@erc725/smart-contracts": "^7.0.0", + "@nomicfoundation/hardhat-toolbox": "^2.0.2", + "@openzeppelin/contracts": "^4.9.3", + "@typechain/ethers-v5": "^10.2.0", + "dotenv": "^16.0.3", + "eslint-config-custom": "*", + "ethers": "^5.7.2", + "hardhat": "^2.13.0", + "hardhat-contract-sizer": "^2.8.0", + "hardhat-deploy": "^0.11.25", + "hardhat-gas-reporter": "^1.0.9", + "hardhat-packager": "^1.4.2", + "lsp1": "*", + "lsp6": "*", + "solhint": "^3.3.6", + "ts-node": "^10.2.0", + "tsconfig": "*", + "typechain": "^8.0.0", + "typescript": "^5.3.3" + } + }, "ltgt": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", diff --git a/package.json b/package.json index ca92260e4..53b4e25d7 100644 --- a/package.json +++ b/package.json @@ -118,6 +118,7 @@ "lsp4": "*", "lsp5": "*", "lsp6": "*", + "lsp9": "*", "lsp10": "*", "lsp14": "*", "lsp17contractextension": "*", diff --git a/packages/LSP9Vault/.eslintrc.js b/packages/LSP9Vault/.eslintrc.js new file mode 100644 index 000000000..03ee7431b --- /dev/null +++ b/packages/LSP9Vault/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: ['custom'], +}; diff --git a/packages/LSP9Vault/.solhint.json b/packages/LSP9Vault/.solhint.json new file mode 100644 index 000000000..26e01c48a --- /dev/null +++ b/packages/LSP9Vault/.solhint.json @@ -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" + } +} diff --git a/packages/LSP9Vault/README.md b/packages/LSP9Vault/README.md new file mode 100644 index 000000000..44c90d86b --- /dev/null +++ b/packages/LSP9Vault/README.md @@ -0,0 +1,51 @@ +# LSP Package Template + +This project can be used as a skeleton to build a package for a LSP implementation in Solidity (LUKSO Standard Proposal) + +It is based on Hardhat. + +## How to setup a LSP as a package? + +1. Copy the `template/` folder and paste it under the `packages/` folder. Then rename this `template/` folder that you copied with the LSP name. + +You can do so either: + +- manually, by copying the folder and pasting it inside `packages` and then renaming it. + or +- by running the following command from the root of the repository. + +```bash +cp -r template packages/lsp-name +``` + +2. Update the `"name"` and `"description"` field inside the `package.json` for this LSP package you just created. + +3. Setup the dependencies + +If this LSP uses external dependencies like `@openzeppelin/contracts`, put them under `dependencies` with the version number. + +```json +"@openzeppelin/contracts": "^4.9.3" +``` + +If this LSP uses other LSP as dependencies, put each LSP dependency as shown below. This will use the current code in the package: + +```json +"@lsp2": "*" +``` + +4. Setup the npm commands for linting, building, testing, etc... under the `"scripts"` in the `package.json` + +5. Test that all commands you setup run successfully + +By running the commands below, your LSP package should come up in the list of packages that Turbo is running this command for. + +```bash +turbo build +turbo lint +turbo lint:solidity +turbo test +turbo test:foundry +``` + +6. Finally update the relevant information in the `README.md` file in the folder of the newly created package, such as the title at the top, some description, etc... diff --git a/contracts/LSP9Vault/ILSP9Vault.sol b/packages/LSP9Vault/contracts/ILSP9Vault.sol similarity index 100% rename from contracts/LSP9Vault/ILSP9Vault.sol rename to packages/LSP9Vault/contracts/ILSP9Vault.sol diff --git a/contracts/LSP9Vault/LSP9Constants.sol b/packages/LSP9Vault/contracts/LSP9Constants.sol similarity index 100% rename from contracts/LSP9Vault/LSP9Constants.sol rename to packages/LSP9Vault/contracts/LSP9Constants.sol diff --git a/contracts/LSP9Vault/LSP9Errors.sol b/packages/LSP9Vault/contracts/LSP9Errors.sol similarity index 100% rename from contracts/LSP9Vault/LSP9Errors.sol rename to packages/LSP9Vault/contracts/LSP9Errors.sol diff --git a/contracts/LSP9Vault/LSP9Vault.sol b/packages/LSP9Vault/contracts/LSP9Vault.sol similarity index 96% rename from contracts/LSP9Vault/LSP9Vault.sol rename to packages/LSP9Vault/contracts/LSP9Vault.sol index e4fc24b78..96aac5653 100644 --- a/contracts/LSP9Vault/LSP9Vault.sol +++ b/packages/LSP9Vault/contracts/LSP9Vault.sol @@ -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 @@ -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] diff --git a/contracts/LSP9Vault/LSP9VaultCore.sol b/packages/LSP9Vault/contracts/LSP9VaultCore.sol similarity index 100% rename from contracts/LSP9Vault/LSP9VaultCore.sol rename to packages/LSP9Vault/contracts/LSP9VaultCore.sol diff --git a/contracts/LSP9Vault/LSP9VaultInit.sol b/packages/LSP9Vault/contracts/LSP9VaultInit.sol similarity index 97% rename from contracts/LSP9Vault/LSP9VaultInit.sol rename to packages/LSP9Vault/contracts/LSP9VaultInit.sol index 427275349..2e288e8ee 100644 --- a/contracts/LSP9Vault/LSP9VaultInit.sol +++ b/packages/LSP9Vault/contracts/LSP9VaultInit.sol @@ -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"; /** diff --git a/contracts/LSP9Vault/LSP9VaultInitAbstract.sol b/packages/LSP9Vault/contracts/LSP9VaultInitAbstract.sol similarity index 98% rename from contracts/LSP9Vault/LSP9VaultInitAbstract.sol rename to packages/LSP9Vault/contracts/LSP9VaultInitAbstract.sol index c6d5a1b34..05b4f043b 100644 --- a/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +++ b/packages/LSP9Vault/contracts/LSP9VaultInitAbstract.sol @@ -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 diff --git a/packages/LSP9Vault/contracts/Version.sol b/packages/LSP9Vault/contracts/Version.sol new file mode 100644 index 000000000..9227ca267 --- /dev/null +++ b/packages/LSP9Vault/contracts/Version.sol @@ -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 +} diff --git a/packages/LSP9Vault/hardhat.config.ts b/packages/LSP9Vault/hardhat.config.ts new file mode 100644 index 000000000..d818a205d --- /dev/null +++ b/packages/LSP9Vault/hardhat.config.ts @@ -0,0 +1,128 @@ +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 + * - hardhat-gas-reporter (is this true? Why do we have it as a separate dependency?) + * - @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 and scripts +// can be imported here (e.g: docs generation, gas benchmark, etc...) + +dotenvConfig({ path: resolve(__dirname, './.env') }); + +function getTestnetChainConfig(): NetworkUserConfig { + const config: NetworkUserConfig = { + live: true, + url: 'https://rpc.testnet.lukso.network', + chainId: 4201, + }; + + if (process.env.CONTRACT_VERIFICATION_TESTNET_PK !== undefined) { + config['accounts'] = [process.env.CONTRACT_VERIFICATION_TESTNET_PK]; + } + + return config; +} + +const config: HardhatUserConfig = { + defaultNetwork: 'hardhat', + networks: { + hardhat: { + live: false, + saveDeployments: false, + allowBlocksWithSameTimestamp: true, + }, + luksoTestnet: getTestnetChainConfig(), + }, + namedAccounts: { + owner: 0, + }, + // uncomment if the contracts from this LSP package must be deployed at deterministic + // // addresses across multiple chains + // 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/', + }, + }, + ], + }, + 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'], + }, + }, + }, + }, + packager: { + // What contracts to keep the artifacts and the bindings for. + contracts: [], + // 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-v5', + }, + mocha: { + timeout: 10000000, + }, +}; + +export default config; diff --git a/packages/LSP9Vault/package.json b/packages/LSP9Vault/package.json new file mode 100644 index 000000000..23fcc9e43 --- /dev/null +++ b/packages/LSP9Vault/package.json @@ -0,0 +1,47 @@ +{ + "name": "lsp9", + "version": "0.12.1", + "description": "Package for the LSP9 Vault standard", + "license": "Apache-2.0", + "author": "", + "keywords": [ + "LUKSO", + "LSP", + "Blockchain", + "Standards", + "Smart Contracts", + "Ethereum", + "EVM", + "Solidity" + ], + "scripts": { + "build": "hardhat compile --show-stack-traces", + "clean": "hardhat clean", + "format": "prettier --write .", + "lint": "eslint . --ext .ts,.js", + "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" + }, + "dependencies": { + "@erc725/smart-contracts": "^7.0.0", + "@openzeppelin/contracts": "^4.9.3", + "lsp1": "*", + "lsp6": "*" + }, + "devDependencies": { + "@nomicfoundation/hardhat-toolbox": "^2.0.2", + "@typechain/ethers-v5": "^10.2.0", + "dotenv": "^16.0.3", + "eslint-config-custom": "*", + "ethers": "^5.7.2", + "hardhat": "^2.13.0", + "hardhat-contract-sizer": "^2.8.0", + "hardhat-deploy": "^0.11.25", + "hardhat-gas-reporter": "^1.0.9", + "hardhat-packager": "^1.4.2", + "solhint": "^3.3.6", + "ts-node": "^10.2.0", + "tsconfig": "*", + "typechain": "^8.0.0", + "typescript": "^5.3.3" + } +} diff --git a/packages/LSP9Vault/tsconfig.json b/packages/LSP9Vault/tsconfig.json new file mode 100644 index 000000000..b7a34e03f --- /dev/null +++ b/packages/LSP9Vault/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "tsconfig/contracts.json", + "include": ["**/*.ts"] +} diff --git a/remappings.txt b/remappings.txt index c295d48e6..c2a298401 100644 --- a/remappings.txt +++ b/remappings.txt @@ -13,6 +13,7 @@ lsp2/=packages/LSP2ERC725YJSONSchema/ lsp4/=packages/LSP4DigitalAssetMetadata/ lsp5/=packages/LSP5ReceivedAssets/ lsp6/=packages/LSP6KeyManager/ +lsp9/=packages/LSP9Valut/ lsp10/=packages/LSP10ReceivedVaults/ lsp14/=packages/LSP14Ownable2Step/ lsp17contractextension/=packages/LSP17ContractExtension/ diff --git a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts b/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts index 7c1aee722..b652927d6 100644 --- a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts +++ b/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault.test.ts @@ -1,8 +1,8 @@ import { ERC725YDataKeys, OPERATION_TYPES } from '../../constants'; +import { LSP9Vault__factory } from 'lsp9/types'; import { LSP1UniversalReceiverDelegateVault__factory, UniversalProfile__factory, - LSP9Vault__factory, } from '../../types'; import { diff --git a/tests/LSP9Vault/LSP9Vault.test.ts b/tests/LSP9Vault/LSP9Vault.test.ts index 98d70c3a2..6233eb22b 100644 --- a/tests/LSP9Vault/LSP9Vault.test.ts +++ b/tests/LSP9Vault/LSP9Vault.test.ts @@ -6,7 +6,8 @@ import { shouldBehaveLikeLSP14, } from '../LSP14Ownable2Step/LSP14Ownable2Step.behaviour'; -import { LSP9Vault__factory, UniversalProfile, LSP6KeyManager } from '../../types'; +import { LSP9Vault__factory } from 'lsp9/types'; +import { UniversalProfile, LSP6KeyManager } from '../../types'; import { getNamedAccounts, diff --git a/tests/LSP9Vault/LSP9VaultInit.test.ts b/tests/LSP9Vault/LSP9VaultInit.test.ts index a0dda37cc..6ccba1685 100644 --- a/tests/LSP9Vault/LSP9VaultInit.test.ts +++ b/tests/LSP9Vault/LSP9VaultInit.test.ts @@ -3,7 +3,8 @@ import { expect } from 'chai'; import { shouldBehaveLikeLSP14 } from '../LSP14Ownable2Step/LSP14Ownable2Step.behaviour'; -import { LSP9VaultInit__factory, UniversalProfile, LSP6KeyManager } from '../../types'; +import { LSP9VaultInit__factory } from 'lsp9/types'; +import { UniversalProfile, LSP6KeyManager } from '../../types'; import { getNamedAccounts,