smartcontractkit / smartcontractkit/chainlink
[FEAT] Chainlink upgradeable smart contracts
A pull request for this has already been merged.
- #9461 by @cedric-cordenier — merged
- 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
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 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