Skip to main content
Share Your Experience: Take the 2024 Developer Survey
3 votes
Accepted

Chainlink VRF2, Automation - Raffle Game

As a disclaimer, I am working at Gelato, which is Chainlink Keepers's competitor with Gelato Automate. It is true that the callback gas limit can be very restrictive depending on your business logic. ...
donoso.eth's user avatar
  • 1,493
3 votes
Accepted

How to generate secure and pure Randomness number without Chainlink VRF?

It's much easier to create 'good' randomness off-chain. So you have lots of options to choose from off-chain. The difficult part is getting that randomness on-chain in a trustless manner. With your ...
Lauri Peltonen's user avatar
2 votes

Using block.prevrandao as randomness for Miller-Rabin Primality test

I believe this depends on if there are any financial incentives involves in the process or outcome of your Miller-Rabin probabilistic primality test. If there are, and the financial incentives ...
Yongjian P.'s user avatar
  • 4,200
2 votes
Accepted

How can I add consumers to a Chainlink VRF2 subscription with an external smart contract?

I have found the issue. Looking at VRFCoordinatorV2.sol The function addConsumer has a modifier called onlySubOwner here. Which is not explicitly outlined in the docs. function addConsumer(uint64 ...
0xheartcode's user avatar
1 vote
Accepted

Does Remix need to be deployed every time code changes are made?

As @Torof suggested, I also recommend you to use Foundry and then create Mock contracts for Chainlink VRF, Price Feeds, etc. Because, that way, you can test in the local environment using the local ...
SYED ASAD KAZMI's user avatar
1 vote

Does Remix need to be deployed every time code changes are made?

A smart contract is an object filled with bytecode. When you deploy it, the bytecode is stored at a specific address on the Blockchain. You cannot modify the bytecode of a deployed smart contract. It ...
Torof's user avatar
  • 783
1 vote
Accepted

How to implement Chainlink VRFv2 with Upgradeable Transparent Proxy smart contract?

You don't need to import the Initializable.sol and inherit the Initializable contract in your VRFTest contract (as it's already being imported and inherited in VRFConsumerBaseV2Upgradeable contract ...
SYED ASAD KAZMI's user avatar
1 vote
Accepted

How to get the hash of the Fulfill Random Words transaction (callback) that gets mined after calling the Chainlink's VRF?

You can find it if you navigate to the History (Recent fulfillments) tab of your VRF subscription at https://vrf.chain.link. Also, you can monitor the VRFCoordinatorV2 contract itself for ...
Andrej's user avatar
  • 434
1 vote

What are the chances the Chainlink oracle will respond to a non-existent request?

The reason why the documentation recommends checking that a request for a given _requestId exists before continuing is to ensure that the contract only processes valid requests that have been ...
DevCrypto's user avatar
  • 422
1 vote
Accepted

Can I send ETH to Chainlink's fulfillRandomWords callback function?

There is no possibility of sending ether (msg.value) from the Chainlinj VRF callback. A possible workaround if I understand your code would be to make requestNFTs payable, then as you are already ...
donoso.eth's user avatar
  • 1,493
1 vote

Chainlink VRF2, Automation - Raffle Game

If function fulfillmentRandomWords get stucked, it is because the gas used in the function is more than the callback gaslimit you set for VRF. Increasing the callback gaslimit can solve the problem. ...
Frank Kong's user avatar
1 vote
Accepted

Remix Testing ChainLink VRF v2 Direct Funding Method

make sure you have enough LINK if you have so the problem is that you have to change the gas limit of your Metamask to 400,000 because remix doesn't calculate it correctly. Look at this part of the ...
Lucas Ramos Archangelo's user avatar
1 vote
Accepted

VRFCoordinatorV2Mock contract error

Error is coming b'caz your deployer account is not defined in hardhat.config.js. Define it, then deploy the script once again, then it should not come. Check the first line of code it is saying from....
Yana Gupta's user avatar
1 vote

VRFCoordinatorV2Mock contract error

Instead of deploying your contract like this: const lottery = await deploy("Lottery", { from: deployer, args: arguments, log: true, waitConformations: network.config....
nikolas666's user avatar
1 vote

Why Does This Chainlink Example Code Revert?

It is because you used the legacy version of the VRF Consumer smart contract, which is deprecated. You should migrate to VRFv2, you can grab the example consumer contract from the Chainlink official ...
Andrej's user avatar
  • 434
1 vote

Allowance failed when attempting to transfer LINK tokens

Did you call approve() function of the LINK token from the msg.sender address? Allowance is increased by calling approve() on the LINK contract to increase the allowance. If your check fails there, it ...
Olivier Demeaux's user avatar
1 vote

How to keep track of the original msg.sender on Chainlink VRF fullfillRandomWords function?

After see the Chainlink docs, I ended up using a mapping to store the requestId for a specific address. This allowed me to keep track of the sender. mapping(uint256 => address) private ...
0xTheL's user avatar
  • 155
1 vote
Accepted

Adding subscription address to chainlink vrf v2 inside of the contract

Your contract is not working because you aren't setting the VRF Address in the constructor. You need to do something like this: constructor(address _priceFeed, uint64 _subscriptionId, address ...
ethereumboy's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible