Skip to content

Ponstaking prototype is missing vendored Pausable.sol dependency #7

Description

@koriyoshi2041

Summary

The Ponstaking prototype added in 4166bfb3 cannot currently be compiled from the repository because it imports @openzeppelin/contracts/utils/Pausable.sol, but that file is absent from the vendored OpenZeppelin tree under contractsV2/lib/openzeppelin-contracts/contracts/.

The other OpenZeppelin imports used by PonsV2Staking.sol are present and resolve with the repository's detected remappings.

Reproduction

From a fresh clone at debbc21f:

forge build \
  --root contractsV2 \
  --contracts src/v2/hooks/PonstakingV2_test/PonsV2Staking.sol \
  --remappings '@openzeppelin/=lib/openzeppelin-contracts/' \
  --force -vv

The compiler reports:

Error (6275): Source "lib/openzeppelin-contracts/contracts/utils/Pausable.sol" not found
 --> src/v2/hooks/PonstakingV2_test/PonsV2Staking.sol:9:1

Confirmed locally with Foundry/Solc 0.8.33. The contract's pragma is ^0.8.26.

Suggested minimal fix

Vendor the Pausable.sol source matching the existing OpenZeppelin version, including any dependencies it requires, or replace the partial vendored dependency with a pinned OpenZeppelin dependency/submodule. A small Foundry configuration or CI compile check for the prototype would also prevent future missing-vendored-file regressions.

I have not proposed copying an arbitrary current OpenZeppelin file because it should match the version of the already-vendored contracts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions