@@ -3,7 +3,7 @@ pragma solidity ^0.8.19;
|
||||
|
||||
import {Script} from "forge-std/Script.sol";
|
||||
import {HelperConfig} from "./HelperConfig.s.sol";
|
||||
import {Raffle} from "../contracts/Raffle.sol";
|
||||
import {Raffle} from "contracts/Raffle.sol";
|
||||
import {AddConsumer, CreateSubscription, FundSubscription} from "./Interactions.s.sol";
|
||||
|
||||
contract DeployRaffle is Script {
|
||||
@@ -15,20 +15,20 @@ contract DeployRaffle is Script {
|
||||
if (config.subscriptionId == 0) {
|
||||
CreateSubscription createSubscription = new CreateSubscription();
|
||||
(config.subscriptionId, config.vrfCoordinatorV2_5) = createSubscription
|
||||
.createSubscription(config.vrfCoordinatorV2_5, config.account);
|
||||
.createSubscription(config.vrfCoordinatorV2_5, config.myAccount);
|
||||
|
||||
FundSubscription fundSubscription = new FundSubscription();
|
||||
fundSubscription.fundSubscription(
|
||||
config.vrfCoordinatorV2_5,
|
||||
config.subscriptionId,
|
||||
config.link,
|
||||
config.account
|
||||
config.myAccount
|
||||
);
|
||||
|
||||
helperConfig.setConfig(block.chainid, config);
|
||||
}
|
||||
|
||||
vm.startBroadcast(config.account);
|
||||
vm.startBroadcast(config.myAccount);
|
||||
Raffle raffle = new Raffle(
|
||||
config.vrfCoordinatorV2_5,
|
||||
config.subscriptionId,
|
||||
@@ -44,7 +44,7 @@ contract DeployRaffle is Script {
|
||||
address(raffle),
|
||||
config.vrfCoordinatorV2_5,
|
||||
config.subscriptionId,
|
||||
config.account
|
||||
config.myAccount
|
||||
);
|
||||
return (raffle, helperConfig);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user