Replies: 2 comments 5 replies
-
This is an interesting question. I looked into that script now, and I am equally confused. Let's wait to hear from @PatrickAlphaC when they are available. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Hello, need some clarifications too. Maybe i've missed that in tons of information in between :) So, i understand what ABI is, but why do we need to pass it to metamask in e.g. here? const contract = new ethers.Contract(contractAddress, abi, signer) is it to make .js to understand the .fund() function below? try {
const transactionResponse = await contract.fund({
value: ethers.parseEther(ethAmount),
})
await transactionResponse.wait(1)
} catch (error) {
console.log(error)
} what am i missing? How does this work under the hood? Thanks in advance for your input. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Where does the
await contract.fund(2, "0x0000000000000000000000000000000000000000",
come into play when the frontend is calling the fund function?The ABI in the
constants.js
does not match the ABI from the deployed fundMe contract, but for some reason it works to fund via the frontend. I tried removing the2, 0x00...
and putting in nothing and a blank array but both times got errors when trying to fund via the frontend.The only thing I can think of is that it has something to do with how ethers v6 works since the video for this lesson does not show these other inputs. Tried ChatGPT and it's also confused on why there is no consistency for the ABI.
Beta Was this translation helpful? Give feedback.
All reactions