Comments (4)
Hi @RafaelVidaurre , thanks for raising this. Looks to be a bug with the logic around the ==0 vs == -1. That if statement should only return true if you're not working on a local network (ie you're working on a public network that's integrated to a real Chainlink network).
If working on a local network, you can't really use the 'request-random-number' task, because there's no integration to a real Chainlink network. Take a look at the unit tests to see what can be done when working locally
Also, if you'd like to contribute to improving our hardhat starter kit, you can raise a PR on our starter kit to correct the bug, and we can then review it and have it merged to the main repository
from hardhat-starter-kit.
@pappas999 thanks for clarifying this, I understand now what my options are. I'll see if I can submit a PR to improve this part. So, more than the random number = 0
being a bug, it is a limitation when working locally. So I guess the only real issue here is the logic by which we output these messages to the console, and maybe that we should mention the differences between working locally vs working with a test net for development.
from hardhat-starter-kit.
Correct, looks like the issue is in the logic as to whether to print that statement to the console or not, because it's looking for when it's a local network, whereas it should be looking for when it's not a local network (and we have a 0 result)
from hardhat-starter-kit.
Closing this for now, but feel free to follow up.
from hardhat-starter-kit.
Related Issues (20)
- 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
- Duplicate definition of Transfer HOT 2
- Error: Transaction reverted: trying to deploy a contract whose code is too large 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.