Created
June 24, 2021 13:45
-
-
Save cocreature/a9a2f55031413f50c7eef5d5bda7cb17 to your computer and use it in GitHub Desktop.
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
module WronglyTypedContractId where | |
template T1 | |
with | |
p : Party | |
where | |
signatory p | |
template T2 | |
with | |
p : Party | |
where | |
signatory p | |
template Fetcher | |
with | |
p : Party | |
where | |
signatory p | |
choice Fetch2 : T2 | |
with | |
cid : ContractId T2 | |
controller p | |
do fetch cid | |
test = scenario do | |
p <- getParty "p" | |
cid <- submit p $ create (T1 p) | |
fetcher <- submit p $ createAndExercise (Fetcher p) (Fetch2 (coerceContractId cid)) | |
pure () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment