Skip to content

Commit 006d48a

Browse files
zmalatraxunknownunknown1
authored andcommitted
chore: add comments on deploy script
1 parent 784287f commit 006d48a

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
@@ -155,12 +155,13 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
155155
log: true,
156156
});
157157

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

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

0 commit comments

Comments
 (0)