Skip to content

Commit eb49a06

Browse files
zmalatraxunknownunknown1
authored andcommitted
feat(contracts): create subscription in constructor
1 parent 60232c1 commit eb49a06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contracts/src/rng/VRFSubscriptionManagerV2.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ contract VRFSubscriptionManagerV2 {
7272
vrfCoordinator = VRFCoordinatorV2Interface(_vrfCoordinator);
7373
linkToken = LinkTokenInterface(_linkToken);
7474
governor = _governor;
75+
createNewSubscription();
7576
}
7677

7778
// ************************************* //
@@ -112,7 +113,7 @@ contract VRFSubscriptionManagerV2 {
112113
/**
113114
* @dev Creates a new subscription, overriding the previous one to be manageable by the contract.
114115
*/
115-
function createNewSubscription() external onlyByGovernor {
116+
function createNewSubscription() public onlyByGovernor {
116117
subscriptionId = vrfCoordinator.createSubscription();
117118
}
118119

0 commit comments

Comments
 (0)