0

How do I check inside a contract entrypoint, that the user sent a particular amount with the transaction? In Frontend:

const operation = await contractInstance.methods.methodName().send({amount:12});

How do I check inside contract (CameLIGO syntax)that parameter amount is greater than a particular value inside my LIGO contract(CameLIGO syntax)?

I only want user to able to complete contract call if he sends above a particular amount with transaction else transaction fails.

1 Answer 1

0

It is done using Tezos.amount if Tezos.amount >= someValue then performSomething() else doSomethingElse()

Link to Documentation [https://ligolang.org/docs/reference/current-reference/]

Your Answer

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

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