Question from Slack: Can DAML interop across chains?

For example can someone create a contract in both Fabric and Sawtooth that runs and communicates across both?

1 Like

Yes using the interop layer you can create a contract both in fabric and sawtooth and have them communicate. There’s lots of documentation on how to do this at https://www.canton.io/docs/stable/user-manual/index.html

A somewhat old example of an interop (ie. Canton) project is here if you want an example: GitHub - digital-asset/contracts-for-tshirts

1 Like

The interop layer (Canton) doesn’t have bindings for Sawtooth yet, only Fabric, Ethereum, and Postgres. Canton allows you manipulate all DAML contracts the same way regardless of whether they were created on a single underlying ledger, or on multiple ones.

3 Likes

Great, Canton is very useful .While Canton basics Notary schemes , Relays , Hash-Locking or others ?

1 Like

I’m not sure what exactly the question is. Canton implements a locking protocol to ensure atomicity across ledgers. However, Canton (at least currently) only supports transacting over DAML contracts, so you can’t use it to directly transact over the native currency of the underlying ledger (assuming that the ledger has such a currency). Thus hash locking and so forth aren’t applicable.

1 Like

Daml can be used to implement notary and hash-locking schemes, in fact these are much simpler in Daml than any other smart contract language. These can be done on any Daml ledger, not only those which support the Canton protocol.

Daml doesn’t currently have support for Relays. A one way relay wouldn’t be hard to implement, you would need implement the logic in Daml that verifies proofs from another chain. The other direction is more problematic since Daml is agnostic and portable across many blockchains, you’d have to build a relay which is specific to the blockchain on which you’re deploying Daml. At that point your app would no longer be portable.

1 Like