I am cloning a tutorial https://github.com/techaddict0x/liquidityminer And when I run the debug console I get the error “web3 is not defined” The code is the exact same, looked all over the internet and I can’t seem to find the right answer , any help would be greatly appreciated- thanks
-
Did you actually download the necessary dependencies ?– TorofCommented Aug 18, 2023 at 0:41
-
Hey sorry for the late reply, I believe so you mean npm install ? I did npm I web3– Jackson T.Commented Aug 21, 2023 at 6:10
-
Is there any chance could try cloning the GitHub for me and seeing if you have the same error, I really only know solidity and contracts etc– Jackson T.Commented Aug 21, 2023 at 6:10
-
If you’re into cryptocurrency, I can send you some tokens in my upcoming project for your help– Jackson T.Commented Aug 21, 2023 at 6:13
Add a comment
|
1 Answer
If you have already installed the dependencies, then you need to create a web3 instance in order to use its functionalities . In this code i have created a web3 instance of Polygon Mumbai Testnet.
const web3 = new Web3("https://rpc-mumbai.maticvigil.com");