Skip to content

Commit 0779d58

Browse files
committed
chore: add comments on deploy script
1 parent d3a95b9 commit 0779d58

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,13 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
144144
log: true,
145145
});
146146

147-
const link = linkByChain.get(Number(await getChainId())) ?? AddressZero;
147+
const link = linkByChain.get(Number(await getChainId())) ?? AddressZero; // LINK not needed on hardhat local node
148148
const keyHash = keyHashByChain.get(Number(await getChainId())) ?? AddressZero;
149-
const requestConfirmations = 3;
150-
const callbackGasLimit = 100000;
149+
const requestConfirmations = 3; // Paramater to be fixed, range [1 ; 200] on Arbitrum
150+
const callbackGasLimit = 100000; // Parameter to be fixed, 50000 on RandomizerRNG but no external call to sortitionModule.passPhase() in the callback
151151
const numWords = 1;
152152
const vrfCoordinator = vrfCoordinatorByChain.get(Number(await getChainId())) ?? AddressZero;
153+
// Deploy the VRF Subscription Manager contract on Arbitrum, a mock contract on Hardhat node or nothing on other networks.
153154
const vrfSubscriptionManagerDeploy = vrfCoordinator
154155
? chainId === HomeChains.HARDHAT
155156
? await deploy("VRFSubscriptionManagerV2Mock", {
@@ -164,6 +165,7 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
164165
})
165166
: AddressZero;
166167

168+
// Execute the setup transactions for using VRF and deploy the Consumer contract on Hardhat node
167169
if (vrfSubscriptionManagerDeploy) {
168170
if (chainId === HomeChains.HARDHAT) {
169171
const vrfSubscriptionManager = (await hre.ethers.getContract(

0 commit comments

Comments
 (0)