0

Today I got up to 10.3 Transactions - Sending Ether and have deployed the Charity contract of sendingEther_answer to the Sepolia testnet, but I don't understand how the amount of Eth I send through the Donate function is set. I can click Donate where the deployed contract is displayed under "Deploy and run transactions" but this causes a donation of 0 Eth from my connected account, which I can see I've tried a few times under the list of transactions in Metamask.

1 Answer 1

0

You have to make that function payable and when calling the function you will have to specify the amount you want to send either in WEI or in ETH

If you are calling a function from RemixIDE you can do it from here in value section enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.