chainlink icon indicating copy to clipboard operation
chainlink copied to clipboard

feature: transparent upgradeable vrf consumer base v2

Open makramkd opened this issue 3 years ago • 3 comments

This PR:

  • Adds a transparent-upgradeable (see https://docs.openzeppelin.com/contracts/4.x/api/proxy#transparent-vs-uups) version of VRFConsumerBaseV2 so that users can inherit from that if they are proxying their VRF consumer. This upgradeable version is called VRFConsumerBaseV2Upgradeable,
  • Adds a sample implementation of an upgradeable VRF consumer in contracts/src/v0.8/tests: contracts/src/v0.8/tests/VRFConsumerV2Upgradeable.sol, along with contracts/src/v0.8/tests/VRFV2ProxyAdmin.sol and contracts/src/v0.8/tests/VRFV2TransparentUpgradeableProxy.sol which are required to complete the proxy pattern. These are intended for demonstration purposes only, and users are expected to inherit directly from VRFConsumerBaseV2Upgradeable and plug in their own VRF consumption logic,
  • Generates gethwrappers for the sample implementations to use in VRF integration tests,
  • Adds a new integration test TestVRFV2Integration_ConsumerProxy_HappyPath to test the proxied VRF consumer contract,
  • Adds @openzeppelin/contracts-upgradeable as a dependency, to pull in Initializable, ProxyAdmin and TransparentUpgradeableProxy.

Open questions:

  • Should the @openzeppelin/contracts-upgradeable dependency have the same pinned version as @openzeppelin/contracts?

To do:

  • [ ] Update CHANGELOG

makramkd avatar Sep 21 '22 18:09 makramkd

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

github-actions[bot] avatar Sep 21 '22 18:09 github-actions[bot]

Solana Smoke Test Results

1 tests   1 :heavy_check_mark:  6m 35s :stopwatch: 1 suites  0 :zzz: 1 files    0 :x:

Results for commit 8a192c2b.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Sep 21 '22 19:09 github-actions[bot]

EVM Smoke Test Results

34 tests   34 :heavy_check_mark:  6m 18s :stopwatch:   1 suites    0 :zzz:   1 files      0 :x:

Results for commit 8a192c2b.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Sep 21 '22 19:09 github-actions[bot]

Go solidity wrappers are out-of-date, regenerate them via the make go-soldity-wrappers command

github-actions[bot] avatar Nov 02 '22 14:11 github-actions[bot]

Go solidity wrappers are out-of-date, regenerate them via the make go-soldity-wrappers command

github-actions[bot] avatar Nov 02 '22 16:11 github-actions[bot]

Go solidity wrappers are out-of-date, regenerate them via the make go-soldity-wrappers command

github-actions[bot] avatar Nov 02 '22 19:11 github-actions[bot]