Open grantbelford opened 6 months ago
@grantbelford When you create a testnet by running npm run createTestnet
you will be asked about which network you are going to fork, Let us say it its Ethereum Mainnet, then the details regarding the network will be stored in the testnet.json file and hardhat config file fetches data from there.
Thank you Sana.
Yes for my exercise I did indeed choose Ethereum Mainnet & confirm that the testnet/testnet.json file was created successfully. But later on when I try to run either of 2 commands above I get a NomicLabsHardhatPluginError.
Kindly try it now, it should work. I have updated the hardhat config file. Thank you for pointing this out.
Thank you Sana.
Error HH606: The project cannot be compiled, see reasons below. The Solidity version pragma statement in these files doesn't match any of the configured compilers in your config. Change the pragma or configure additional compiler versions in your hardhat config.
Yeah I updated hardhat.config.js file to solidity compiler version 0.8.21 & working like charm! Successfully ran %npx hardhat run scripts/Swap-tokens.js: "Successfully verified contract PoolSwapTest on Etherscan." Thank you Sana.
Hello! When trying to run either command below %npx hardhat run scripts/deploy.js %npx hardhat run scripts/Swap-tokens.js
Returns msg "NomicLabsHardhatPluginError: Trying to verify a contract in network with chain id 80002, but plugin doesn't recognize it as a supported chain. You can manually add support for it (with instruction link).
May I clarify which file should be edited (hardhat.config.js?) and do the 3 required pieces of info (Network Chain ID, Verification Endpoint URL, Explorer URL) come from the earlier created testnet.json file? The testnet.json file contains testnetid, chainid (which is different than above chain id?), rpcUrl, faucetUrl, explorerUrl & verificationUrL). Looks like testnet.json "explorerUrL" = browserUrL & testnet.json "rpcUrL" = apiURL/Verification Endpoint URL. Not sure though which chainID to use, the one in the testnet.json file or the one in the above msg (80002).
Thanks!