Skip to content

Commit

Permalink
build!: move LSP2 as its own package (#829)
Browse files Browse the repository at this point in the history
* build: start setting Turborepo configs for the monorepo (#828)

* build!: setup lsp-smart-contracts as monorepo

* build: fix setup eslint for root + packages

* build: setup LSP package template with instructions

* build: add `COVERAGE` as env variable

* build: fix package-lock

* build: keep root config for eslint

* ci: update CI commands to run temporarily steps for root + package

* build: replace `dts` by `unbuild`

* docs: apply new prettier to auto-generated docs

* build: add missing npm command for `turbo test`

* build!: setup lsp-smart-contracts as monorepo

* build: fix setup eslint for root + packages

* build: setup LSP package template with instructions

* chore: start moving LSP2 in its own package

* chore: setup Foundry tests for LSP2

* chore: remove other folders not relevant

* build: upgrade packages dependencies

* ci: update CI for solc_version to allow `packages/` path

* build: use `eslint-config-custom` as internal dependency at root

* docs: update autogenerated docs config

* ci: remove `lsp2` in testing matrix

* chore: update README of LSP2 + template packages
  • Loading branch information
CJ42 authored Jan 19, 2024
1 parent c80c88b commit 4c31ce7
Show file tree
Hide file tree
Showing 67 changed files with 1,588 additions and 10,256 deletions.
12 changes: 0 additions & 12 deletions .eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ jobs:
"up",
"upinit",
"lsp1",
"lsp2",
"lsp6",
"lsp6init",
"lsp7",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/solc_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
if [[ "<" == "${{ steps.comparison.outputs.comparison-result }}" ]]
then
solc $(ls contracts/**/*.sol | grep -v "Extension4337\|contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset") \
--allow-paths $(pwd)/node_modules/ \
--allow-paths $(pwd)/node_modules/,$(pwd)/packages/ \
@=node_modules/@ \
solidity-bytes-utils/=node_modules/solidity-bytes-utils/ \
../=$(pwd)/contracts/
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,6 @@ gas_benchmark.md

# Turborepo
.turbo

# Custom setup
foundry_artifacts/
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = git@github.com:foundry-rs/forge-std.git
url = https://github.com/foundry-rs/forge-std.git
4 changes: 2 additions & 2 deletions config/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"dependencies": {
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-turbo": "^1.9.3",
"eslint-plugin-prettier": "^4.0.0"
"eslint-plugin-prettier": "^4.2.1"
}
}
2 changes: 1 addition & 1 deletion config/tsconfig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "tsconfig",
"version": "0.0.0",
"private": true,
"license": "MIT",
"license": "Apache-2.0",
"publishConfig": {
"access": "public"
},
Expand Down
4 changes: 3 additions & 1 deletion contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ import {
} from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {LSP1Utils} from "../LSP1UniversalReceiver/LSP1Utils.sol";
import {LSP2Utils} from "../LSP2ERC725YJSONSchema/LSP2Utils.sol";
import {
LSP2Utils
} from "../../packages/LSP2ERC725YJSONSchema/contracts/LSP2Utils.sol";

// modules
import {ERC725YCore} from "@erc725/smart-contracts/contracts/ERC725YCore.sol";
Expand Down
4 changes: 3 additions & 1 deletion contracts/LSP10ReceivedVaults/LSP10Utils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import {
} from "@erc725/smart-contracts/contracts/interfaces/IERC725Y.sol";

// libraries
import {LSP2Utils} from "../LSP2ERC725YJSONSchema/LSP2Utils.sol";
import {
LSP2Utils
} from "../../packages/LSP2ERC725YJSONSchema/contracts/LSP2Utils.sol";

// constants
import {_INTERFACEID_LSP9} from "../LSP9Vault/LSP9Constants.sol";
Expand Down
4 changes: 3 additions & 1 deletion contracts/LSP1UniversalReceiver/LSP1Utils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ pragma solidity ^0.8.4;
import {
ERC165Checker
} from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
import {LSP2Utils} from "../LSP2ERC725YJSONSchema/LSP2Utils.sol";
import {
LSP2Utils
} from "../../packages/LSP2ERC725YJSONSchema/contracts/LSP2Utils.sol";

// constants
import {ILSP1UniversalReceiver as ILSP1} from "./ILSP1UniversalReceiver.sol";
Expand Down
4 changes: 3 additions & 1 deletion contracts/LSP5ReceivedAssets/LSP5Utils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import {
} from "@erc725/smart-contracts/contracts/interfaces/IERC725Y.sol";

// libraries
import {LSP2Utils} from "../LSP2ERC725YJSONSchema/LSP2Utils.sol";
import {
LSP2Utils
} from "../../packages/LSP2ERC725YJSONSchema/contracts/LSP2Utils.sol";

// constants
import {
Expand Down
4 changes: 3 additions & 1 deletion contracts/LSP6KeyManager/LSP6Utils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import {
import {ILSP6KeyManager} from "./ILSP6KeyManager.sol";

// libraries
import {LSP2Utils} from "../LSP2ERC725YJSONSchema/LSP2Utils.sol";
import {
LSP2Utils
} from "../../packages/LSP2ERC725YJSONSchema/contracts/LSP2Utils.sol";

// constants
import {
Expand Down
4 changes: 3 additions & 1 deletion contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import {LSP7DigitalAssetCore} from "./LSP7DigitalAssetCore.sol";
import {LSP17Extendable} from "../LSP17ContractExtension/LSP17Extendable.sol";

// libraries
import {LSP2Utils} from "../LSP2ERC725YJSONSchema/LSP2Utils.sol";
import {
LSP2Utils
} from "../../packages/LSP2ERC725YJSONSchema/contracts/LSP2Utils.sol";

// constants
import {_INTERFACEID_LSP7} from "./LSP7Constants.sol";
Expand Down
4 changes: 3 additions & 1 deletion contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import {LSP7DigitalAssetCore} from "./LSP7DigitalAssetCore.sol";
import {LSP17Extendable} from "../LSP17ContractExtension/LSP17Extendable.sol";

// libraries
import {LSP2Utils} from "../LSP2ERC725YJSONSchema/LSP2Utils.sol";
import {
LSP2Utils
} from "../../packages/LSP2ERC725YJSONSchema/contracts/LSP2Utils.sol";

// constants
import {_INTERFACEID_LSP7} from "./LSP7Constants.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import {
import {LSP17Extendable} from "../LSP17ContractExtension/LSP17Extendable.sol";

// libraries
import {LSP2Utils} from "../LSP2ERC725YJSONSchema/LSP2Utils.sol";
import {
LSP2Utils
} from "../../packages/LSP2ERC725YJSONSchema/contracts/LSP2Utils.sol";

// constants
import {_INTERFACEID_LSP8, _LSP8_TOKENID_FORMAT_KEY} from "./LSP8Constants.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import {
import {LSP17Extendable} from "../LSP17ContractExtension/LSP17Extendable.sol";

// libraries
import {LSP2Utils} from "../LSP2ERC725YJSONSchema/LSP2Utils.sol";
import {
LSP2Utils
} from "../../packages/LSP2ERC725YJSONSchema/contracts/LSP2Utils.sol";

// constants
import {_INTERFACEID_LSP8, _LSP8_TOKENID_FORMAT_KEY} from "./LSP8Constants.sol";
Expand Down
4 changes: 3 additions & 1 deletion contracts/LSP9Vault/LSP9VaultCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import {
ERC165Checker
} from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
import {LSP1Utils} from "../LSP1UniversalReceiver/LSP1Utils.sol";
import {LSP2Utils} from "../LSP2ERC725YJSONSchema/LSP2Utils.sol";
import {
LSP2Utils
} from "../../packages/LSP2ERC725YJSONSchema/contracts/LSP2Utils.sol";

// modules
import {ERC725XCore} from "@erc725/smart-contracts/contracts/ERC725XCore.sol";
Expand Down
Loading

0 comments on commit 4c31ce7

Please sign in to comment.