OpenZeppelin / OpenZeppelin/openzeppelin-upgrades
Support creating proxies for artifacts from installed packages
Open
Nobody has claimed this yet.
truffle
- Dominant language
- TypeScript
- Stars
- 658
- Forks
- 286
- PR merge metrics
- No merged PRs in 30d
Description
Truffle supports loading an artifact from an installed package:
const ERC20 = artifacts.require("@openzeppelin/contracts-ethereum-package/ERC20PresetMinterPauserUpgradeSafe");
But trying to deployProxy it currently fails with the following error:
Error: The requested contract was not found. Make sure the source code is available for compilation
at getContractName (/home/spalladino/Projects/sdk/truffle/foo/node_modules/@openzeppelin/upgrades-truffle/node_modules/@openzeppelin/upgrades-core/src/validate.ts:123:11)
at Object.assertUpgradeSafe (/home/spalladino/Projects/sdk/truffle/foo/node_modules/@openzeppelin/upgrades-truffle/node_modules/@openzeppelin/upgrades-core/src/validate.ts:141:24)
at deployProxy (/home/spalladino/Projects/sdk/truffle/foo/node_modules/@openzeppelin/upgrades-truffle/src/deploy-proxy.ts:30:3)
Truffle v5.1.37 (core: 5.1.37)
Node v12.7.0
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
Reproduce the failure with an artifact loaded from an installed package, then start in @openzeppelin/upgrades-core/src/validate.ts at getContractName and trace its call from @openzeppelin/upgrades-truffle/src/deploy-proxy.ts. Done means deployProxy accepts the installed-package artifact without the “requested contract was not found” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100