smartcontractkit / smartcontractkit/chainlink

[FEAT] Chainlink upgradeable smart contracts

Open
#4,976 15 comments 40 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #9461 by @cedric-cordenier — merged
enhancement needs votes
Dominant language
Go
Stars
8.2k
Forks
2k
Avg merge
1d 23h
Merged PRs (30d)
202

Description

In order to make upgradeable smart contracts, constructors are not allowed to be had, since we want to store all the data in the proxy as opposed to the implementation.

However, contracts like VRFConsumerBase require a constructor, so for someone to make an upgradeable version of the contracts, we have to add an initialization method ourselves in an edited VRFConsumerBase contract.

It would be nice to have these supported, for example something like this.

Openzeppelin does something like this where they just have a fork of their main contracts that are exactly the same as their main ones, but without constructors and with initializer functions instead.
https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable

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 reviewing the VRFConsumerBase requirement and the linked VRFConsumerBaseUpgradeable example, then compare the approach with OpenZeppelin's upgradeable contracts. Determine the intended scope for replacing constructors with initializer functions and document which Chainlink contracts should be supported; completion should provide usable upgradeable smart-contract variants.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.