Skip to content

Commit

Permalink
Merge pull request #12 from Bananapus/pre-audit
Browse files Browse the repository at this point in the history
README updates, node >=20.0.0, fmt, upgrade deps
  • Loading branch information
filipviz authored Apr 6, 2024
2 parents b7de18b + 1665e39 commit 2713555
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions package-lock.json

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

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 1 addition & 5 deletions src/JB721TiersHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2713555

Please sign in to comment.