-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Backport #19822] Pull interface package when replaying Exercice by i…
…nterface (#19833) * [Backport #19822] Pull interface package when replaying Exercice by interface (#19822) fix DACH-NY/canton#20645 * fmt * disable ReinterpretTestV2
- Loading branch information
1 parent
691e4cf
commit 408deed
Showing
9 changed files
with
196 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
RetroInterface.daml and Template.daml were backported and created in 2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
module RetroInterface where | ||
|
||
import Template | ||
|
||
data IView = IView {} | ||
|
||
interface I where | ||
viewtype IView | ||
|
||
nonconsuming choice Noop : Int with | ||
a : Party | ||
controller a | ||
do pure 42 | ||
|
||
interface instance I for T where | ||
view = IView {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
-- Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
module Template where | ||
|
||
template T | ||
with | ||
p1 : Party | ||
p2 : Party | ||
where | ||
signatory p1, p2 | ||
|
||
template TProposal | ||
with | ||
p1 : Party | ||
p2 : Party | ||
where | ||
signatory p1 | ||
observer p2 | ||
choice Accept : (ContractId T, Int) | ||
controller p2 | ||
do cid <- create T { p1, p2 } | ||
pure (cid, 42) | ||
|
||
template Box with | ||
s: Party | ||
content: Text | ||
where | ||
signatory s | ||
key s: Party | ||
maintainer key | ||
nonconsuming choice Open: Text with | ||
c: Party | ||
controller c | ||
do | ||
pure content | ||
|
||
template Helper with | ||
s: Party | ||
where | ||
signatory s | ||
nonconsuming choice FailWith: () with | ||
msg: Text | ||
controller s | ||
do | ||
error msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters