diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d1dab16d..1f565e66 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,4 +25,4 @@ jobs: - name: Run tests run: forge snapshot --fail-fast --summary --detailed - name: Check contract sizes - run: FOUNDRY_PROFILE=ci_sizes forge build --sizes + run: FOUNDRY_PROFILE=ci_sizes forge build --sizes --skip SphinxUtils diff --git a/README.md b/README.md index e58f2a76..2ccd3f98 100644 --- a/README.md +++ b/README.md @@ -6,23 +6,25 @@ _If you're having trouble understanding this contract, take a look at the [core ## Install -For `npm` projects (recommended): +How to install `nana-721-hook` in another project. + +For projects using `npm` to manage dependencies (recommended): ```bash npm install @bananapus/721-hook ``` -For `forge` projects (not recommended): +For projects using `forge` to manage dependencies (not recommended): ```bash forge install Bananapus/nana-721-hook ``` -Add `@bananapus/721-hook/=lib/nana-721-hook/` to `remappings.txt`. You'll also need to install `nana-721-hook`'s dependencies and add similar remappings for them. +If you're using `forge` to manage dependencies, add `@bananapus/721-hook/=lib/nana-721-hook/` to `remappings.txt`. You'll also need to install `nana-721-hook`'s dependencies and add similar remappings for them. ## Develop -`nana-721-hook` uses [npm](https://www.npmjs.com/) for package management and the [Foundry](https://github.com/foundry-rs/foundry) development toolchain for builds, tests, and deployments. To get set up, [install Node.js](https://nodejs.org/en/download) and install [Foundry](https://github.com/foundry-rs/foundry): +`nana-721-hook` uses [npm](https://www.npmjs.com/) (version >=20.0.0) for package management and the [Foundry](https://github.com/foundry-rs/foundry) development toolchain for builds, tests, and deployments. To get set up, [install Node.js](https://nodejs.org/en/download) and install [Foundry](https://github.com/foundry-rs/foundry): ```bash curl -L https://foundry.paradigm.xyz | sh @@ -31,7 +33,7 @@ curl -L https://foundry.paradigm.xyz | sh You can download and install dependencies with: ```bash -npm install && forge install +npm ci && forge install ``` If you run into trouble with `forge install`, try using `git submodule update --init --recursive` to ensure that nested submodules have been properly initialized. diff --git a/package-lock.json b/package-lock.json index 181a3e9f..f028c5b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -154,12 +154,14 @@ "resolved": "https://registry.npmjs.org/@bananapus/core/-/core-0.0.7.tgz", "integrity": "sha512-HE3o9SdnZ2sTlan8SHxjJIkD9HnwU7DXbjF9xnrZiumuArhuHrtLWakJCWHTkIU6q+IefkiBCmMJx6mdueUBFw==", "dependencies": { - "@bananapus/permission-ids": "^0.0.2", + "@bananapus/permission-ids": "^0.0.5", "@chainlink/contracts": "^0.8.0", "@openzeppelin/contracts": "^5.0.1", "@prb/math": "^4.0.2", - "@sphinx-labs/plugins": "^0.30.8", "@uniswap/permit2": "github:Uniswap/permit2" + }, + "engines": { + "node": ">=20.0.0" } }, "node_modules/@bananapus/ownable/node_modules/@bananapus/permission-ids": { diff --git a/package.json b/package.json index 1b0188e5..30346564 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,15 @@ "type": "git", "url": "git+https://github.com/Bananapus/nana-721-hook" }, + "engines": { + "node": ">=20.0.0" + }, "scripts": { "test": "forge test", "coverage:integration": "forge coverage --match-path \"./src/*.sol\" --report lcov --report summary", "deploy:mainnets": "source ./.env && npx sphinx propose ./script/Deploy.s.sol --networks mainnets", "deploy:testnets": "source ./.env && npx sphinx propose ./script/Deploy.s.sol --networks testnets", - "artifacts": "source ./.env && npx sphinx artifacts --org-id 'cltepuu9u0003j58rjtbd0hvu' --project-name 'nana-721-hook'" + "artifacts": "source ./.env && npx sphinx artifacts --org-id 'cltepuu9u0003j58rjtbd0hvu' --project-name 'nana-721-hook'" }, "dependencies": { "@bananapus/address-registry": "^0.0.4", diff --git a/src/JB721TiersHook.sol b/src/JB721TiersHook.sol index 7af749c8..acba65a0 100644 --- a/src/JB721TiersHook.sol +++ b/src/JB721TiersHook.sol @@ -404,11 +404,7 @@ contract JB721TiersHook is JBOwnable, ERC2771Context, JB721Hook, IJB721TiersHook override { // Enforce permissions. - _requirePermissionFrom({ - account: owner(), - projectId: projectId, - permissionId: JBPermissionIds.SET_721_METADATA - }); + _requirePermissionFrom({account: owner(), projectId: projectId, permissionId: JBPermissionIds.SET_721_METADATA}); if (bytes(baseUri).length != 0) { // Store the new base URI.