smartcontractkit / smartcontractkit/chainlink

Is VRFConsumerBaseV2Plus Upgradeable?

Open
#16,491 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
8.2k
Forks
2k
Avg merge
1d 23h
Merged PRs (30d)
202

Description

I am upgrading my implementation of VRF v2 to v2.5. I am using ERC1967 proxies to upgrade my contract, and my implementation of VRF v2 made use of VRFConsumerBaseV2Upgradeable (and its __VRFConsumerBaseV2_init in my contract's initialize functions).

It looks like VRFConsumerBaseV2Plus does not have an analogous initializer, and a coordinator address is actually required in the constructor.

  1. Is there / will there be an upgradeable version of VRFConsumerBaseV2Plus that does not require a coordinator address in its constructor?
  2. Is the recommended approach to simply call setCoordinator within my initialize function?

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

Review VRFConsumerBaseV2Plus and VRFConsumerBaseV2Upgradeable, focusing on their constructor and initializer behavior and the setCoordinator function. Determine whether ERC1967 proxy deployments are supported and document the recommended initialization approach.

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
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.