digital-asset / daml

The Daml smart contract language
https://www.digitalasset.com/developers
797 stars 199 forks source link

Document interfaces on Daml Triggers #16108

Open akrmn opened 1 year ago

akrmn commented 1 year ago

Building on the example from https://github.com/digital-asset/daml/pull/15837, perhaps under https://docs.daml.com/triggers/index.html, we should explain how interfaces can be used through Daml Triggers

akrmn commented 1 year ago

As discussed, the example should build upon the Cash/NFT/IAsset example from #15837 by defining a trigger that automatically accepts any incoming IAssetTransferProposal where the proposer (the old owner) has been approved by the recipient (newOwner). This approval can be modeled using a new template AutoApproveTransfers with the recipient as signatory.