Comments (1)
We are in the process of updating the starter kit to include VRF V2.
In the meantime, you can find a sample contract for generating random numbers via VRF V2 here
https://docs.chain.link/docs/chainlink-vrf/
Once you have the contract deployed and working, interacting with it via ethers should be similar to other contracts.
something similar to this will request the random number from the front end.
async function randomNumber() {
randomNumberContract = new ethers.Contract(randomNumber, VRFConsumerBaseV2.abi, signer);
txn = await randomNumberContract.requestRandomWords();
txn.wait();
console.log(txn);
}
from hardhat-starter-kit.
Related Issues (20)
- Add example with `VRFV2Wrapper`
- @ledgerheq/hw-transport-node-hid version ^4.3.0 fails on build HOT 2
- Add Ankr's Public RPCs HOT 2
- Upgrade plugins with @nomicfoundation/hardhat-toolbox HOT 1
- Update to goerli HOT 2
- Npm install is catching an error
- error An unexpected error occurred: "Commit hash required" HOT 3
- [SUGGESTION OF FIX] Error running JSON-RPC server: The number NaN cannot be converted to a BigInt because it is not an integer
- [SUGGESTION OF FIX] "TypeError: customChains is not iterable" When verifying contract. HOT 3
- Upgrade to the hardhat toolbox HOT 1
- [Suggestion] Create npx util to generate empty project HOT 1
- Rename "PRIVATE_KEY" variable to "WALLET_PRIVATE_KEY" HOT 4
- [Bug]: Typo in README.md HOT 1
- NomicLabsHardhatPluginError: Failed to send contract verification request. when using this command “npm run deploy --network sepolia” HOT 1
- Can we write a script to deploy Chainlink automation specifically for use by Register new Upkeep?
- Failed to deploy to different networks than default HOT 1
- ethers.getContract is not a function HOT 1
- replace fund-link with transfer-link
- echidna-test command not found
- Switch to Hardhat configuration variables instead of using `.env` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hardhat-starter-kit.