OpenZeppelin / OpenZeppelin/openzeppelin-upgrades
Show stacktrace for unsafe delegatecall/selfdestruct errors
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 658
- Forks
- 286
- PR merge metrics
- No merged PRs in 30d
Description
If a contract directly or indirectly depends on some code that has a delegatecall or selfdestruct, the plugin gives an error like:
Error: Contract `contracts/MyContract.sol:MyContract` is not upgrade safe
@openzeppelin/contracts/utils/Address.sol:191: Use of delegatecall is not allowed
https://zpl.in/upgrades/error-002
It would be helpful to show a stacktrace including the line in MyContract and intermediate contracts that led to the unsafe code, so that the user can determine if they should fix the issue or add an ignore annotation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the plugin's reporting path for unsafe delegatecall and selfdestruct errors, then trace how MyContract and intermediate contracts are analyzed. Done means the error includes the relevant contract stacktrace while still helping users choose between fixing the issue and adding an ignore annotation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity, typescript
- Domain
- blockchain, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100