Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contract key are mistakenly deleted for nonconsuming choices within transaction #973

bitonic opened this issue May 7, 2019 · 0 comments


None yet
1 participant
Copy link

commented May 7, 2019

Right now the following does not work:

template Foo
    p : Party
    signatory p
    maintainer p
    key p : Party

    controller p can
      nonconsuming DoNothing: ()
        do return ()

template Boo
    p : Party
    signatory p
    controller p can
      Fetch: (ContractId Foo)
          fooCid <- fmap fst $ fetchByKey @Foo p
          exercise fooCid DoNothing
          fmap fst $ fetchByKey @Foo p

test = scenario do
  p <- getParty "Party"
  submit p do create Foo with p
  submit p do
    booCid <- create Boo with p
    exercise booCid Fetch

that is, the second fetchByKey in choice Fetch fails. this is due to the fact that we record contract key deletions locally without considering whether the choice is consuming or not, see


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.