-
I am working on the fullstack part and I seem to have everything running as it should:
I am calling the fund() function from the FundMe.sol contract but when I console.log(msg.value) in the backend it keeps showing that the value is 0. So my transaction is reverted I am not able to fund the contract.
I have tried changing the value sent in the frontend and it does not make a difference. It is like the frontend is somehow disconnected from the backend with regards to the value being sent. My code is available here: https://github.com/isosatya/hardhat-fund-me-fcc/blob/main/contracts/FundMe.sol |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
@isosatya What are you using to call the functions of smart contracts from the frontend? I need to see your frontend code, leave that repository as well. |
Beta Was this translation helpful? Give feedback.
-
Sorry man, I do not know what I am doing wrong. I reseted the account. Restarted my laptop and VS Code many times but it just keeps reverting. Because as you can see, msg.value = 0. At the end I said the minimum amount requirement to 0: |
Beta Was this translation helpful? Give feedback.
-
@alymurtazamemon now it seems to work. I don´t understand I did not change anything. God this is crazy. But thanks for the heads up :D |
Beta Was this translation helpful? Give feedback.
@alymurtazamemon now it seems to work. I don´t understand I did not change anything. God this is crazy. But thanks for the heads up :D