Skip to content

add AuthorizedCallers oz 5, fix npm issues, bump to 1.6.0 - #527

Open
RensR wants to merge 14 commits into
developfrom
fix-npm-deps
Open

add AuthorizedCallers oz 5, fix npm issues, bump to 1.6.0#527
RensR wants to merge 14 commits into
developfrom
fix-npm-deps

Conversation

@RensR

@RensR RensR commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

This PR has zero bytecode changes, meaning it is safe.

The PR

  • Adds an OZ v5.3 version of AuthorizedCallers
  • Upgrades shared OZ version to from 4.8.3 to 4.9.6, which is mostly cosmetic, but a step towards the medium term goal of removing 4.8.3
  • Fix all fixable NPM security issues
  • Bump the package version from 1.5 to 1.6, ready to release a new version

@RensR RensR changed the title add AuthorizedCallers oz 5 add AuthorizedCallers oz 5, fix npm issues, bump to 1.6.0 Aug 17, 2026
Comment thread contracts/package.json
"devDependencies": {
"@changesets/cli": "^2.29.8",
"@changesets/get-github-info": "^0.7.0",
"abi-to-sol": "^0.8.0",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer needed since Automation is largely gone

@RensR
RensR marked this pull request as ready for review August 17, 2026 19:32
Copilot AI lite review requested due to automatic review settings August 17, 2026 19:32
@RensR
RensR requested review from a team as code owners August 17, 2026 19:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Solidity contracts package by moving the “shared” OpenZeppelin v4 imports from 4.8.3 to 4.9.6, introducing a new OZ v5.3 variant of AuthorizedCallers, and updating the contracts workspace’s npm/pnpm dependencies (including security-motivated overrides) alongside a package version bump to 1.6.0.

Changes:

  • Upgrade shared Solidity imports from @openzeppelin/contracts@4.8.3 to @openzeppelin/contracts@4.9.6 across ERC20/ERC677 code and related tests.
  • Add AuthorizedCallersOZ5.sol (OZ 5.3.0 EnumerableSet) plus a new Foundry test suite for it.
  • Update pnpm lockfile and contracts/package.json (security overrides, devDependency upgrades/removals) and bump package version 1.5.0 -> 1.6.0.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
contracts/src/v0.8/shared/token/ERC677/ERC677.sol Switch OZ ERC20 import to @openzeppelin/contracts@4.9.6.
contracts/src/v0.8/shared/token/ERC677/BurnMintERC677.sol Switch OZ imports (IERC20/Burnable/IERC165/EnumerableSet) to @openzeppelin/contracts@4.9.6.
contracts/src/v0.8/shared/token/ERC20/IBurnMintERC20.sol Switch OZ IERC20 import to @openzeppelin/contracts@4.9.6.
contracts/src/v0.8/shared/token/ERC20/BurnMintERC20.sol Switch OZ AccessControl/ERC20/Burnable/IERC165 imports to @openzeppelin/contracts@4.9.6.
contracts/src/v0.8/shared/test/token/ERC677/BurnMintERC677.t.sol Update test imports to OZ 4.9.6.
contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.supportsInterface.t.sol Update test imports to OZ 4.9.6.
contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.mint.t.sol Update test imports to OZ 4.9.6 and update comment referencing OZ version.
contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.grantMintAndBurnRoles.t.sol Update test import to OZ 4.9.6.
contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.burnFromAlias.t.sol Update test import/comment to OZ 4.9.6.
contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.burnFrom.t.sol Update test import/comment to OZ 4.9.6.
contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.burn.t.sol Update test imports/comment to OZ 4.9.6.
contracts/src/v0.8/shared/test/access/AuthorizedCallersOZ5.t.sol Add Foundry tests targeting the OZ5 variant of AuthorizedCallers.
contracts/src/v0.8/shared/mocks/WERC20Mock.sol Switch OZ ERC20 import to @openzeppelin/contracts@4.9.6.
contracts/src/v0.8/shared/mocks/ERC20Mock.sol Switch OZ ERC20 import to @openzeppelin/contracts@4.9.6.
contracts/src/v0.8/shared/access/AuthorizedCallersOZ5.sol Add an OZ 5.3.0-EnumerableSet backed AuthorizedCallers variant.
contracts/src/v0.8/shared/access/AuthorizedCallers.sol Switch OZ EnumerableSet import to @openzeppelin/contracts@4.9.6.
contracts/pnpm-lock.yaml Update lockfile with dependency upgrades and security-related overrides resolution.
contracts/package.json Bump package version to 1.6.0, add security overrides, update devDependencies.
contracts/gas-snapshots/shared.gas-snapshot Snapshot updated but now contains duplicated AuthorizedCallers_* entries.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +8 to +22
contract AuthorizedCallers_setup is BaseTest {
address[] internal s_callers;

AuthorizedCallers internal s_authorizedCallers;

function setUp() public override {
super.setUp();
s_callers.push(makeAddr("caller1"));
s_callers.push(makeAddr("caller2"));

s_authorizedCallers = new AuthorizedCallers(s_callers);
}
}

contract AuthorizedCallers_constructor is AuthorizedCallers_setup {
Comment on lines 1 to 18
AuthorizedCallers_applyAuthorizedCallerUpdates:test_AddAndRemove_Success() (gas: 125006)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_AddAndRemove_Success() (gas: 125006)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyAdd_Success() (gas: 132945)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyAdd_Success() (gas: 132945)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyCallableByOwner_Revert() (gas: 12276)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyCallableByOwner_Revert() (gas: 12276)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyRemove_Success() (gas: 44947)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyRemove_Success() (gas: 44947)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_RemoveThenAdd_Success() (gas: 57043)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_RemoveThenAdd_Success() (gas: 57043)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_SkipRemove_Success() (gas: 31986)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_SkipRemove_Success() (gas: 31986)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_ZeroAddressNotAllowed_Revert() (gas: 64406)
AuthorizedCallers_applyAuthorizedCallerUpdates:test_ZeroAddressNotAllowed_Revert() (gas: 64406)
AuthorizedCallers_constructor:test_ZeroAddressNotAllowed_Revert() (gas: 64383)
AuthorizedCallers_constructor:test_ZeroAddressNotAllowed_Revert() (gas: 64383)
AuthorizedCallers_constructor:test_constructor_Success() (gas: 683090)
AuthorizedCallers_constructor:test_constructor_Success() (gas: 683090)
import {IERC677} from "./IERC677.sol";

import {ERC20} from "@openzeppelin/contracts@4.8.3/token/ERC20/ERC20.sol";
import {ERC20} from "@openzeppelin/contracts@4.9.6/token/ERC20/ERC20.sol";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants