feature: transparent upgradeable vrf consumer base v2
This PR:
- Adds a transparent-upgradeable (see https://docs.openzeppelin.com/contracts/4.x/api/proxy#transparent-vs-uups) version of
VRFConsumerBaseV2so that users can inherit from that if they are proxying their VRF consumer. This upgradeable version is calledVRFConsumerBaseV2Upgradeable, - Adds a sample implementation of an upgradeable VRF consumer in
contracts/src/v0.8/tests:contracts/src/v0.8/tests/VRFConsumerV2Upgradeable.sol, along withcontracts/src/v0.8/tests/VRFV2ProxyAdmin.solandcontracts/src/v0.8/tests/VRFV2TransparentUpgradeableProxy.solwhich are required to complete the proxy pattern. These are intended for demonstration purposes only, and users are expected to inherit directly fromVRFConsumerBaseV2Upgradeableand 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_HappyPathto test the proxied VRF consumer contract, - Adds
@openzeppelin/contracts-upgradeableas a dependency, to pull inInitializable,ProxyAdminandTransparentUpgradeableProxy.
Open questions:
- Should the
@openzeppelin/contracts-upgradeabledependency have the same pinned version as@openzeppelin/contracts?
To do:
- [ ] Update CHANGELOG
I see that you haven't updated any CHANGELOG files. Would it make sense to do so?
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.
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.
Go solidity wrappers are out-of-date, regenerate them via the make go-soldity-wrappers command
Go solidity wrappers are out-of-date, regenerate them via the make go-soldity-wrappers command
Go solidity wrappers are out-of-date, regenerate them via the make go-soldity-wrappers command