3

I want to implement a contract where users are required to deposit a certain amount of money in order to participate. If the user doesn't send enough money, I simply want to send it back to them and not include them in the protocol. How do I see how many eth msg.sender sent to the contract when they called it? Is this even possible?

2

Use msg.value.

You can read more here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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