<p>Plutus Playground is no longer maintained and that instance will soon be taken down in favour of using the Trace Emulator.</p>
<p>Take a look at some of the plutus-contract integration tests for examples of using each of these constraints with the Trace Emulator. <a href="https://github.com/input-output-hk/plutus-apps/tree/main/plutus-contract/test/Spec/Contract/Tx/Constraints" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-apps/tree/main/plutus-contract/test/Spec/Contract/Tx/Constraints</a>.</p>
<p>Note that <code>mustPayWithInlineDatumToPubKey</code> is deprecated in favour of <code>mustPayToPubKeyWithInlineDatum</code></p>

CC BY-SA 4.0
2022-12-23T02:43:22.247Z
This is one hell of examples I didn't know existed. Right there in the git. Thanks.
Adam
CC BY-SA 4.0
2022-12-22T14:03:50.830Z
2022-12-22T14:03:50.830Z
james
<p>I am finding an example implementation of Reference Input (CIP31) and Inline Datum (CIP32) and want to test it with the <code>Plutus.Trace.Emulator</code>. I see some answers <a href="https://cardano.stackexchange.com/questions/9209/inlinedatum-on-referenceoutput-in-offchain-code">like here</a> talking about <code>mustReferenceOutput</code> and <code>mustPayWithInlineDatumToPubKey</code>. Not sure if they are them. <a href="https://playground.plutus.iohkdev.io/doc/haddock/index.html" rel="nofollow noreferrer">playground.plutus.iohkdev.io</a> is my main go-to for plutus documentation. But both are not shown in it. An example cabal project would be very helpful.</p>
<p>Is there one out there?</p>

CC BY-SA 4.0
2022-12-22T13:35:28.117Z
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
CC BY-SA 4.0
2022-12-23T02:39:18.210Z
I've been assuming the hosted version is updated or at least fairly so. This helps. Thanks.
Adam
CC BY-SA 4.0
2022-12-23T03:16:56.433Z
@Fermat BTW, is there a way to get to the documentation without entering a nix-shell and compile the whole thing?
Adam
CC BY-SA 4.0
2022-12-23T13:17:14.423Z
@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
<plutus><inline-datum>
Example/documentation of Reference Input (CIP31) and Inline Datum (CIP32) with Emulator?
# Example/documentation of Reference Input (CIP31) and Inline Datum (CIP32) with Emulator?

(Asked by: username_0 on 2022-12-22)

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](https://cardano.stackexchange.com/questions/9209/inlinedatum-on-referenceoutput-in-offchain-code) talking about `mustReferenceOutput` and `mustPayWithInlineDatumToPubKey`. Not sure if they are them. [playground.plutus.iohkdev.io](https://playground.plutus.iohkdev.io/doc/haddock/index.html) 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?

**Tags:** plutus, inline-datum
> **Comments:**
> **username_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.  
> **username_0**: I've been assuming the hosted version is updated or at least fairly so. This helps. Thanks.  
> **username_0**: @Fermat BTW, is there a way to get to the documentation without entering a nix-shell and compile the whole thing?  
> **username_2**: @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.  

---

## 1 answers

### Answer by username_2 on 2022-12-22. Score: 1 | Accepted answer

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`

> **Comments:**
> **username_0**: This is one hell of examples I didn't know existed. Right there in the git. Thanks.  

---

