0

The FA1.2 standard specifies that the NotEnoughAllowance error should contain a nat: required, nat: present pair. How do I attach this kind of data to a failwith call?

I am writing the token contract in PascaLIGO.

1
  • Should it just be included in the error string somehow? Like this? failwith("NotEnoughAllowance: required: 100, present: 0"); – Thorkil Værge Aug 25 '20 at 15:43
2

Currently, LIGO does not support failing with an arbitrary type like a tuple or record. However you can embed Michelson to fail with the tuple.

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.