I am finding an example implementation of Reference Input (CIP31) and Inline Datum (CIP32) and want to test it with the Plutus.Trace.Emulator. I see some answers like here talking about mustReferenceOutput and mustPayWithInlineDatumToPubKey. Not sure if they are them. playground.plutus.iohkdev.io is my main go-to for plutus documentation. But both are not shown in it. An example cabal project would be very helpful.

Is there one out there?

  • 1
    You can run an updated version of the Haddock documentation via the plutus-apps repo. Git clone this repo and checkout v1.0.0. Enter a nix-shell in the repo and perform build-and-serve-docs. The hosted version you refer to is outdated. The functions that you want are defined in the Ledger.Constraints module.
    – Fermat
    Dec 22, 2022 at 13:35
  • I've been assuming the hosted version is updated or at least fairly so. This helps. Thanks.
    – Adam
    Dec 23, 2022 at 2:39
  • @Fermat BTW, is there a way to get to the documentation without entering a nix-shell and compile the whole thing?
    – Adam
    Dec 23, 2022 at 3:16
  • 1
    @Adam There's a new hosted alternative coming very soon, should be a few weeks max. Look out for PR in plutus and plutus-apps repos for hosted Haddock docs.
    – james
    Dec 23, 2022 at 13:17

1 Answer 1


Plutus Playground is no longer maintained and that instance will soon be taken down in favour of using the Trace Emulator.

Take a look at some of the plutus-contract integration tests for examples of using each of these constraints with the Trace Emulator. https://github.com/input-output-hk/plutus-apps/tree/main/plutus-contract/test/Spec/Contract/Tx/Constraints.

Note that mustPayWithInlineDatumToPubKey is deprecated in favour of mustPayToPubKeyWithInlineDatum

  • This is one hell of examples I didn't know existed. Right there in the git. Thanks.
    – Adam
    Dec 23, 2022 at 2:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.