Skip to content

Commit 2e8f43a

Browse files
zmalatraxunknownunknown1
authored andcommitted
refactor: change variable names
1 parent 006d48a commit 2e8f43a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

contracts/deploy/00-home-chain-arbitration.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
162162
const numWords = 1;
163163
const vrfCoordinator = vrfCoordinatorByChain.get(Number(await getChainId())) ?? AddressZero;
164164
// Deploy the VRF Subscription Manager contract on Arbitrum, a mock contract on Hardhat node or nothing on other networks.
165-
const vrfSubscriptionManagerDeploy = vrfCoordinator
165+
const vrfSubscriptionManager = vrfCoordinator
166166
? chainId === HomeChains.HARDHAT
167167
? await deploy("VRFSubscriptionManagerV2Mock", {
168168
from: deployer,
@@ -177,14 +177,14 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
177177
: AddressZero;
178178

179179
// Execute the setup transactions for using VRF and deploy the Consumer contract on Hardhat node
180-
if (vrfSubscriptionManagerDeploy) {
180+
if (vrfSubscriptionManager) {
181181
if (chainId === HomeChains.HARDHAT) {
182-
const vrfSubscriptionManager = (await hre.ethers.getContract(
182+
const vrfSubscriptionManagerContract = (await hre.ethers.getContract(
183183
"VRFSubscriptionManagerV2Mock"
184184
)) as VRFSubscriptionManagerV2Mock;
185-
await vrfSubscriptionManager.createNewSubscription();
186-
await vrfSubscriptionManager.topUpSubscription(BigNumber.from(10).pow(20)); // 100 LINK
187-
const subId = await vrfSubscriptionManager.subscriptionId();
185+
await vrfSubscriptionManagerContract.createNewSubscription();
186+
await vrfSubscriptionManagerContract.topUpSubscription(BigNumber.from(10).pow(20)); // 100 LINK
187+
const subId = await vrfSubscriptionManagerContract.subscriptionId();
188188
const vrfConsumer = await deploy("VRFConsumerV2", {
189189
from: deployer,
190190
args: [
@@ -199,9 +199,9 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
199199
],
200200
log: true,
201201
});
202-
await vrfSubscriptionManager.addConsumer(vrfConsumer.address);
203-
const sortModule = (await hre.ethers.getContract("SortitionModule")) as SortitionModule;
204-
await sortModule.changeRandomNumberGenerator(vrfConsumer.address, RNG_LOOKAHEAD);
202+
await vrfSubscriptionManagerContract.addConsumer(vrfConsumer.address);
203+
const sortitionModuleContract = (await hre.ethers.getContract("SortitionModule")) as SortitionModule;
204+
await sortitionModuleContract.changeRandomNumberGenerator(vrfConsumer.address, RNG_LOOKAHEAD);
205205
}
206206
}
207207
};

0 commit comments

Comments
 (0)