Tezos Asked by Vinnyson on August 20, 2021
Is there an example of how to use permission policies and hook permission behaviour with regards to FA2 implementation? https://gitlab.com/tzip/tzip/-/blob/master/proposals/tzip-12/tzip-12.md I am having a hard time wrapping my head around this idea. Does hook require a secondary contract for it to execute? Is there a standard for me to use approvals like in FA1.2 where we can state the amount to transfer instead of giving operator permissions in FA2?
%tokens_sent
and/or %tokens_received
). Those entry points will be called by the FA2 contract during transfer.
There is an example of a simple receiver hook:
https://gitlab.com/tzip/tzip/-/blob/fa2-editing/proposals/tzip-12/examples/fa2_custom_receiver.mligoThere is also an example of the FA2 implementation that supports sender/receiver hooks and usage of the receiver hook: https://github.com/tqtezos/smart-contracts/tree/master/fa2_hooks
Although it is possible to create allowance wrapper contract for the FA2 or extend FA2 with the custom permission policy to support allowances.
Answered by Eugene Mishura on August 20, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP