Skip to content

Commit

Permalink
Merge pull request #168 from Bananapus/sync/permission-ids
Browse files Browse the repository at this point in the history
used latest permission IDs
  • Loading branch information
mejango authored Jul 7, 2024
2 parents 668b4ad + 520e31d commit dd5d1d8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ For example, if `alice.eth` owns project ID #5, she can queue new rulesets for t
| 3 | `REDEEM_TOKENS` | Permission to call `JBMultiTerminal.redeemTokensOf`. | [`nana-core`](https://github.com/Bananapus/nana-core) |
| 4 | `SEND_PAYOUTS` | Permission to call `JBMultiTerminal.sendPayoutsOf`. | [`nana-core`](https://github.com/Bananapus/nana-core) |
| 5 | `MIGRATE_TERMINAL` | Permission to call `JBMultiTerminal.migrateBalanceOf`. | [`nana-core`](https://github.com/Bananapus/nana-core) |
| 6 | `SET_PROJECT_METADATA` | Permission to call `JBController.setUriOf`. | [`nana-core`](https://github.com/Bananapus/nana-core) |
| 6 | `SET_PROJECT_URI` | Permission to call `JBController.setUriOf`. | [`nana-core`](https://github.com/Bananapus/nana-core) |
| 7 | `DEPLOY_ERC20` | Permission to call `JBController.deployERC20For`. | [`nana-core`](https://github.com/Bananapus/nana-core) |
| 8 | `SET_TOKEN` | Permission to call `JBController.setTokenFor`. | [`nana-core`](https://github.com/Bananapus/nana-core) |
| 9 | `MINT_TOKENS` | Permission to call `JBController.mintTokensOf`. | [`nana-core`](https://github.com/Bananapus/nana-core) |
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bananapus/core",
"version": "0.0.18",
"version": "0.0.19",
"license": "MIT",
"repository": {
"type": "git",
Expand All @@ -18,7 +18,7 @@
"artifacts": "source ./.env && npx sphinx artifacts --org-id 'cltepuu9u0003j58rjtbd0hvu' --project-name 'nana-core-testnet'"
},
"dependencies": {
"@bananapus/permission-ids": "^0.0.9",
"@bananapus/permission-ids": "^0.0.10",
"@chainlink/contracts": "^1.1.1",
"@openzeppelin/contracts": "^5.0.2",
"@prb/math": "^4.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/JBController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -572,15 +572,15 @@ contract JBController is JBPermissioned, ERC2771Context, IJBController, IJBMigra
/// @notice Set a project's metadata URI.
/// @dev This is typically an IPFS hash, optionally with an `ipfs://` prefix.
/// @dev Can only be called by the project's owner or an address with the owner's permission to
/// `SET_PROJECT_METADATA`.
/// `SET_PROJECT_URI`.
/// @param projectId The ID of the project to set the metadata URI of.
/// @param metadata The metadata URI to set.
function setUriOf(uint256 projectId, string calldata metadata) external override {
// Enforce permissions.
_requirePermissionFrom({
account: PROJECTS.ownerOf(projectId),
projectId: projectId,
permissionId: JBPermissionIds.SET_PROJECT_METADATA
permissionId: JBPermissionIds.SET_PROJECT_URI
});

// Set the project's metadata URI.
Expand Down
2 changes: 1 addition & 1 deletion test/units/static/JBController/TestSetMetadataOf.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ contract TestSetMetadataOf_Local is JBControllerSetup {
// mock first permissions call
bytes memory _permissionsCall = abi.encodeCall(
IJBPermissions.hasPermission,
(address(this), address(1), 1, JBPermissionIds.SET_PROJECT_METADATA, true, true)
(address(this), address(1), 1, JBPermissionIds.SET_PROJECT_URI, true, true)
);
bytes memory _permissionsReturned = abi.encode(false);

Expand Down

0 comments on commit dd5d1d8

Please sign in to comment.