DevMethodDoc doesn't accept custom natspec keys (@custom:oz-upgrades-*) :,( #43
Unanswered
cryptoduels-team
asked this question in
Q&A
Replies: 1 comment
|
Thanks for the report, it is now fixed in: #47 published in latest release |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Environment in this moment
Issue
The DevMethodDoc type in @rocketh/core/src/types.ts only accepts details, params, and returns. It doesn't allow custom natspec keys such as @Custom:oz-upgrades-unsafe-allow, which are required by OpenZeppelin for upgradeable contracts.
This causes a TS2322 error when using deployViaProxy with artifacts that include OpenZeppelin natspec:
Current workaround
Casting the artifact to bypass type checking:
My proposal
Add an index signature to the DevMethodDoc type to accept @Custom:* keys:
OpenZeppelin requires custom:oz-upgrades-unsafe-allow in the constructor's natspec for upgradeable contracts. It's part of the standard and isn't optional. Any project using rocketh with OpenZeppelin UUPS runs into this issue.
All reactions