Remix Ethereum – How to Enter the Amount of ETH to Transfer

etherethereumjsremixweb3js

I am new to ethereum world and trying to write a basic ERC 721 smart contract.

enter image description here

This is my mint function. I am trying to check whether the sender is sending required cost to mint the asset. I am testing my contract in rinkeby testnet.

The question I have is every time I call mint function it throws an error because of the require statement. how do event send ETH to contract to mint the asset. I am using remix and Metamask.

Best Answer

You can use value field of REMIX to pass ether to your function execution. Make sure to add value before calling the function that require payment.

enter image description here

Related Topic