0

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.

1

1 Answer 1

0

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

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.