Skip to content

Instantly share code, notes, and snippets.

@cocreature
Created June 24, 2021 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cocreature/a9a2f55031413f50c7eef5d5bda7cb17 to your computer and use it in GitHub Desktop.
Save cocreature/a9a2f55031413f50c7eef5d5bda7cb17 to your computer and use it in GitHub Desktop.
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