-
Hey awesome Guys! when i run it gives me this error |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
I tried using |
Beta Was this translation helpful? Give feedback.
-
How can I manually set the gas price in a transaction? |
Beta Was this translation helpful? Give feedback.
-
FIXED |
Beta Was this translation helpful? Give feedback.
-
Hi @sako013, pardon me for the late reply. As you already mentioned one needs to add a new consumer at Subscription Management Page. However, if you want to avoid this extra step you can expand the deployment script with the following code: import VRF_COORDINATOR_V2_ABI from "@chainlink/contracts/abi/v0.8/VRFCoordinatorV2.json";
import { Contract } from "ethers";
const deployFunction: DeployFunction = async ({ getNamedAccounts, deployments }) => {
//
//
//
if(!developmentChains.includes(network.name) {
const vrfCoordinatorV2 = new Contract(vrfCoordinatorAddress, VRF_COORDINATOR_V2_ABI, deployer);
const tx: ContractTransaction = await vrfCoordinatorV2.addConsumer(subscriptionId, randomNumberConsumerV2.address);
await tx.wait(waitBlockConfirmations);
}
//
//
//
} |
Beta Was this translation helpful? Give feedback.
FIXED
After Checking Readme.md ,I figured it out that you need to manually add the Deployed Contract Address to https://vrf.chain.link/rinkeby as a new consumer !!!