OpenZeppelin / OpenZeppelin/openzeppelin-upgrades

Refactor frontend

Open
#30 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

refactor
Dominant language
TypeScript
Stars
658
Forks
286
PR merge metrics
No merged PRs in 30d

Description

Now that we have both Truffle and Buidler plugins, there is a lot of duplication between their respective deployProxy and upgradeProxy functions, there is even duplication between them within the same plugin, and they are also incidentally very long functions.

It seems to me that we should be able to write abstract deployProxy and upgradeProxy functions that could be instantiated with the Truffle- or Buidler-specific parts.

I think what has to be astracted is:

  • provider
  • where validations come from
  • how the impl is depoyed, given a contract factory
  • how the proxy is deployed
  • how the initialize data is encoded
  • how to obtain the instance that will be returned

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Truffle and Buidler plugin implementations of deployProxy and upgradeProxy, then compare their duplicated validation, provider, deployment, encoding, and instance-return logic. Done means shared abstract functions cover those pieces while preserving each plugin's specific behavior; verify with the existing plugin tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.