Replies: 2 comments 1 reply
-
Bro you have commented out some main functions like: async function connect(){ if(typeof window.ethereum !== "undefined"){ //window.ethereum.request({method:"eth_requestAccounts"}) //Lets update with await await ethereum.request({method:"eth_requestAccounts"}) //document.getElementById("connectButton").innerHTML = "Connected" //update the above since we are using await connectButton.innerHTML = "Connected" } else { console.log("No metamask") } Change this into this: async function connect(){ if(typeof window.ethereum !== "undefined"){ window.ethereum.request({method:"eth_requestAccounts"}) await ethereum.request({method:"eth_requestAccounts"}) document.getElementById("connectButton").innerHTML = "Connected" connectButton.innerHTML = "Connected" } else { console.log("No metamask") } Check good, if you have commented out any other func or not. I would advise you to remove cmnts (//) |
Beta Was this translation helpful? Give feedback.
1 reply
-
@Maakai123 Make sure you have done settings correctly and you have enough amount in it for gas. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
After creating Hardhat local host in my MetaMask and connected my front end, i tried my Fund button and i got these errors
Please some one tell me what i did wrong
step @ ethers-5.6.esm.min.js:1
(anonymous) @ ethers-5.6.esm.min.js:1
__awaiter$9 @ ethers-5.6.esm.min.js:1
estimateGas @ ethers-5.6.esm.min.js:1
sendUncheckedTransaction @ ethers-5.6.esm.min.js:1
(anonymous) @ ethers-5.6.esm.min.js:1
fulfilled @ ethers-5.6.esm.min.js:1
Promise.then (async)
step @ ethers-5.6.esm.min.js:1
(anonymous) @ ethers-5.6.esm.min.js:1
__awaiter$a @ ethers-5.6.esm.min.js:1
sendTransaction @ ethers-5.6.esm.min.js:1
(anonymous) @ ethers-5.6.esm.min.js:1
fulfilled @ ethers-5.6.esm.min.js:1
Promise.then (async)
step @ ethers-5.6.esm.min.js:1
(anonymous) @ ethers-5.6.esm.min.js:1
__awaiter$4 @ ethers-5.6.esm.min.js:1
(anonymous) @ ethers-5.6.esm.min.js:1
fund @ index.js:62
index.js
Beta Was this translation helpful? Give feedback.
All reactions