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.

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, privacy policy and cookie policy

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