daml/daml-lf/tests/Interfaces.daml

47 lines
935 B
Haskell
Raw Normal View History

-- Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0
module Interfaces where
interface I1 where
getOwner1 : Party
choice C1 : ()
controller getOwner1 this
do pure ()
interface I2 where
getOwner2 : Party
choice C2 : ()
controller getOwner2 this
do pure ()
interface I3 requires I4 where
interface I4 where
getOwner4 : Party
choice C4 : ()
controller getOwner4 this
do pure ()
template T1
with
owner1 : Party
where
signatory owner1
implements I1 where
getOwner1 = owner1
choice OwnChoice : ()
controller owner1
do pure ()
template T2
with
owner2 : Party
where
signatory owner2
implements I1 where
getOwner1 = owner2
implements I2 where
getOwner2 = owner2
implements I4 where
getOwner4 = owner2