Questions tagged [plutus-playground]

Plutus Playground provides an environment for writing and testing smart contracts before they are released on the Cardano blockchain.

Filter by
Sorted by
Tagged with
10 votes
2 answers
111 views

Test-Focused EvaluatorTrace Monad?

Is there infrastructure for writing unit/integration tests for our contracts, without running the full playground? Is there a test-focused EvaluatorTrace monad, for example?
KIJIRI's user avatar
  • 687
8 votes
3 answers
183 views

Deriving Show Compilation Error on Plutus Playground

I seem to be getting a compilation error when I try to compile any of the example files on my local host configuration for the Plutus Playground. The error is pictured here: And basically it seems ...
Conor Devlin's user avatar
8 votes
1 answer
130 views

Confused by compilation message in plutus playground (week 5 pioneer program)

This is part of my attempt at solving the first homework assignment of week 5 in the plutus pioneer program. The rest of the unmodified file can be found here. {-# INLINABLE mkPolicy #-} -- This ...
Matthias Sieber's user avatar
  • 1,557
8 votes
2 answers
503 views

Plutus Pioneer Program - Problem with plutus playground client

I'm setting up my environment to run the example from lecture #1 (Week01 auction) All compilations went well but when I try the evaluate in the simulator I always receive: interpreter Errors ...
Simone Faré's user avatar
7 votes
2 answers
560 views

I'm having issues with nix-shell

I keep getting this error, any thoughts? I have re-downloaded nix 3 times now and it's the same error as before. Not sure if it's the profiles or channels but this is what it gives me: '''trying https:...
KIJIRI's user avatar
  • 687
7 votes
2 answers
182 views

Plutus Pioneer Cohort 2 Lecture 3

I was going through the lecture on Youtube and this is the one with Vesting example where: wallet 1 gifts 20 ADA to wallet 2 in 2 different slots wallet 1 gifts 10 ADA to wallet 3 in a slot later on, ...
Kuldeep Srivastava's user avatar
7 votes
0 answers
97 views

Developers are having dismal experience building on Cardano [closed]

When developers get into plutus playground, 10 out pf 10 expect it to work like remix, an IDE. You put a code in. You compile and deploy. And then start interacting with the dApp. All in the same ...
Adam's user avatar
  • 343
7 votes
1 answer
133 views

How can you run the Plutus Playground and serve the Haddock documentation from the VSCode DevContainer?

I am still looking to settle on a dev environment for Plutus contracts. I am thinking about using VSCode with the devcontainer, but would like to know how well it all integrates. Is it easy to have ...
vcwebco's user avatar
  • 480
6 votes
1 answer
420 views

What does @ prefix means?

like this: auctionInstance = Scripts.validator @Auctioning and Hello-world app from https://playground.plutus.iohkdev.io/tutorial/tutorials/plutus-playground.html#running-the-hello-world-app hello = ...
mackie's user avatar
  • 433
6 votes
1 answer
161 views

How do you publish on-chain code to mainnet and testnet?

I've understand that the on-chain code is stored in the blockchain through Playground module which is in sync against a local node. But how to "publish" this code to run anywhere? It's an ...
Walker Leite's user avatar
6 votes
2 answers
176 views

npm build of plutus client fails with "permission denied"

I am trying to run the Plutus playground using the Gitbook recipe (https://docs.plutus-community.com/docs/setup/WindowsWSL.html). At step 15, the server starts fine, but trying to run the client with &...
KenA's user avatar
  • 161
5 votes
1 answer
240 views

Q&A English Auction- if a wallets under bids then provides a valid bid, why doesn't it count the second good bid?

if you set up the english auction with three wallets and do the following: Wallet 1 min bid 10 Wallet 2 bids 15 wallet 3 bids 9 wallet 3 bids 20 wallet 1 closes It will got to wallet 2 and wallet ...
noone392's user avatar
  • 263
5 votes
1 answer
65 views

Logistics of Developing Contracts

We've done a lot of development on the Plutus Playground; in what ways will the logistics of developing and deploying contracts differ in Gougen?
KIJIRI's user avatar
  • 687
5 votes
1 answer
57 views

Choosing Ubuntu over WSL for Plutus development

I use a low end laptop as my daily driver running a WSL Ubuntu-20.04 as my platform of choice. When trying to run the plutus-playground it often crashes. Should I try using Ubuntu or any other Linux ...
isuryanarayanan's user avatar
5 votes
1 answer
140 views

Setting up Plutus environment for Apple Silicon computer

I'm trying to setup dependencies to write and test plutus contracts, but I'm worried that the dependencies may not be compatible with the M1 chip. I have been following these instructions https://www....
Kaleb Amarante's user avatar
5 votes
1 answer
231 views

Writing basic validator scripts

I need someone to explain to me line by line. The code is from plutu tutorials. https://docs.cardano.org/projects/plutus/en/latest/plutus/tutorials/basic-validators.html All the code in that page I ...
mackie's user avatar
  • 433
4 votes
3 answers
127 views

How do users interact with smart contract?

In plutus playground, there is an example called “Vesting”. In the simulation, users can interact with this smart contract by click on “vest fund” or “retrieve funds”. Now suppose that we compile this ...
Adam's user avatar
  • 343
4 votes
1 answer
46 views

Incorrect Pub Key from Wallet Emulator

I am getting incorrect pubkeys by running mockWalletPaymentPubKey $ knownWallet 1 and mockWalletPaymentPubKey $ knownWallet 2 (from here https://youtu.be/ae7U_yKIQ0Y?t=1390). I checked that I am in ...
Roofi's user avatar
  • 125
4 votes
2 answers
185 views

What documentation works with handling utxos at the Plutus Script?

I am trying to make a Plutus smart contract which takes tokens locked to the contract and then on endpoint call (purchase) sends 1 to the caller and then the rest back to the contract. I cant find a ...
Floof99's user avatar
  • 472
4 votes
1 answer
113 views

How do I test the on-chain validator in Vesting.hs?

In Plutus Pioneer Program, Iteration #3, Lecture #3, Part #4 at 27:48, Lars mentions that he wrote the contract code in a way that invalid transactions will always be caught by the off-chain code. So ...
Travis's user avatar
  • 520
4 votes
1 answer
70 views

Week 2 - Homework - valid validator call true/true after invalid call true/false from same wallet doesn't go through

I managed to get the homework transactions to work as expected (happy), so far so good... I also tried the following scenario which did not work. Q1: Why doesn't it work? Q2: How would it be possible ...
Wim Janssen's user avatar
4 votes
2 answers
66 views

When can we expect live deployment of the Plutus Playground

I am working with a low end device, and the live deployment of the playground is what I'm counting on. When can I expect it and is there any community deployed server that is active now?
isuryanarayanan's user avatar
4 votes
1 answer
63 views

Is there any keyword to get the epoch details or stake-pool details in Plutus Smart Contract?

I am trying to write a smart contract where I can get the awards for delegators of a particular stake pool. I need to know if that is right now possible to do using Plutus, if yes, pls suggest me.
Kuldeep Srivastava's user avatar
4 votes
0 answers
146 views

Using Plutus PAB for development instead of Playground

trying to migrate away from the playground and seems like PAB is the way to go. The plutus starter repository orignally seems to be the best place to start but it seems to be outdated (i.e. still ...
Shannon Goh's user avatar
3 votes
2 answers
196 views

npm run start in plutus-playground-client throws several "Could not find module" errors

I'm trying to run the plutus-playground-client. My OS is macOS Big Sur 11.6.2 I have set up the environment with the following steps based on the nix install instructions from: https://docs.plutus-...
Woodland Pools's user avatar
3 votes
3 answers
243 views

How to turn (compile) “script.hs” into “script.plutus”?

I have a script that is developed in Plutus Playground. It is working well and now I want to deploy it to the Cardano blockchain via cardano-cli. Following this answer, I have to use cabal to turn my ...
Adam's user avatar
  • 343
3 votes
6 answers
195 views

What is the purpose of the `valHash :: Ledger.ValidatorHash` function in the Plutus Pioneer Program's Week 2 homework?

The homework for Week 2 involves implementing validators for two Plutus contracts. Details are here. Spoiler alert! This probably gives away the answer to Week 2's first homework problem: -- ... ...
Daniel Bidulock's user avatar
3 votes
1 answer
129 views

plutus-playground-server: user error (Error evaluating simulation: JsonDecodingError

I'm following the first lecture in the plutus pioneer program but I cannot set up the local environment. The error happens when running npm start on a nix-shell after initializing the playground ...
martin's user avatar
  • 91
2 votes
1 answer
163 views

Use the week 01 Nix-shell for week 02?

I'd like to know if we should use the week 01 nix-shell? My expectation is that the week 01 nix-shell, was used to start the playground service and the front-end UI. Although, it's clear that there's ...
punkbit's user avatar
  • 178
2 votes
1 answer
89 views

What is the benefit of installing plutus playground locally?

In these instructions for working through the plutus pioneer program, it suggests installing the playground locally: https://tutorials.cardanoacademy.io/plutus-pioneer-program/setting-up-plutus-...
Michael Daconta's user avatar
2 votes
2 answers
223 views

/bin/plutus-playground-server: No such file or directory

Can't get plutus-playground-server to start. plutus-playground-server: for development use only /nix/store/601kdlvidgan842yfklrmvpbz6a5xkf7-plutus-playground-server/bin/plutus-playground-server: line ...
ryanaverell's user avatar
2 votes
1 answer
28 views

Formatted error messages in Playground

Is there any way to get the Playground errors with proper indentations? This can help read better the issue at hand. Instead of getting one huge line: (Tx {txInputs = fromList [TxIn {txInRef = ...
LexTRX's user avatar
  • 343
2 votes
1 answer
72 views

Plutus pioneer program - Lecture #1 - Can't understand behaviour of transactions

Why is the second bid of wallet 2 getting ignored when I test it like this? If the first transaction of wallet 2 was also valid, then the second suceeds. I'm just curious if this is somehow expected ...
pCosta99's user avatar
2 votes
1 answer
46 views

plutus playground simulator wait action question

When using the plutus playground simulator: I'm having trouble finding documentation on the simulator wait actions. What are the differences in functionality between the "wait for" and &...
Tom's user avatar
  • 21
2 votes
2 answers
110 views

(Solved) Error building Plutus Application Framework

I am trying to build the Plutus Application Framework. I'm running on Archlinux and both Nix and cabal are installed properly as far as I can tell. I have also set the IOHK Binary Caches. However when ...
d_fajardo's user avatar
  • 198
2 votes
1 answer
50 views

Online Playground does not appear in Safari

Using macOS Catalina 10.15.7 and Safari v 15.2 (15612.3.6.1.8). The Playground URL (https://playground.plutus.iohkdev.io) generates a blank page. It loads fine on Chrome and Brave (haven't actually ...
XiTouch's user avatar
  • 349
2 votes
1 answer
83 views

Failing to set up plutus on windows

So I'm using WSL Windows 10 and I set up IOHK hashes, but everytime I run nix-shell I get following error: build of '/nix/store/9im4jp068ykqsm4s8996px605p6zrw7q-Agda-plan-to-nix-pkgs.drv' failed. ...
HalfPaul's user avatar
2 votes
0 answers
27 views

About Fees in the Plutus Playground

I had been reviewing sample codes that can be run in the Plutus Playground, particularly the Vesting.hs code in Cohort #3 Week #3 of PPP. So while trying several cases in the simulation, I sometimes ...
omegafer's user avatar
  • 106
2 votes
1 answer
305 views

error: suspicious ownership or permission with nix-shell command on plutus-apps repository

Using the nix-shell command in a docker container on GitHub codespaces results in the following error: $ nix-shell --show-trace trace: To materialize project.plan-nix for cabal-install entirely, pass ...
deimagjas's user avatar
2 votes
1 answer
458 views

Lessons Learned setting up plutus-playground - feedback welcome [closed]

I have finally got the plutus-playground running on 2 separate machines. Each machine is a Mac running Catalina 10.15.7. After extensive trial and error (some self inflicted) I have identified several ...
XiTouch's user avatar
  • 349
2 votes
1 answer
159 views

"bash: plutus-pab-generate-purs: command not found" issue when run plutus-playground on Ubuntu

I've followed guide for running plutus-playground . But when I npm run start on plutus-playground-client, it says 'bash: plutus-pab-generate-purs: command not found'. Please check screenshot on ...
Frankuh's user avatar
  • 21
1 vote
2 answers
1k views

(Solved) error:\n Variable not in scope: main :: GHC.Types.IO a0 in English Auction

I'm trying to compile the English Auction script on a local plutus-playground-client session and I'm getting this error: error:\n Variable not in scope: main :: GHC.Types.IO a0 Any help on why ...
d_fajardo's user avatar
  • 198
1 vote
2 answers
45 views

build okay locally, but fails in playground

I am trying to compile the Homework01.hs The build locally on Linux passes when I do :l src/Week02/Homework1.hs Prelude PlutusTx Ledger.Scripts> :l src/Week02/Homework1.hs [1 of 1] Compiling Week02....
wakathi's user avatar
  • 100
1 vote
1 answer
210 views

What is the GC_DONT_GC=1 variable for when running the Plutus Playground locally?

I tried to look for this but I didn't find anything specifically explaining why this fixes errors when launching Plutus Playground locally, although I definitely found instructions on how to go over ...
joaquimgamero's user avatar
1 vote
1 answer
123 views

Interpreter Error (error CallStack (from HasCallStack))

Im getting an interpreter error on the Plutus playground commit 3f84ea4fe3924cb7ee614da2b22c64c02c1177e6. I get it whenever I run the purchase endpoint. This is the error Main.hs: This must be ...
Floof99's user avatar
  • 472
1 vote
1 answer
41 views

Cannot find definitions of tx___ functions in English Auction script

I might be missing some thing but in the English Auction script I am unable to find the definitions of the function that starts with tx: txOutDatumHash txInInfoResolved txOutValue txInInfoResolved ....
d_fajardo's user avatar
  • 198
1 vote
3 answers
290 views

Error running plutus-playground-client in Linux

I have successfully installed nix, cabal and have setup the IOHK binary cache. I cloned the plutus-app repository and successfully built the Haskell packages and other artifacts with nix. Then running ...
d_fajardo's user avatar
  • 198
1 vote
1 answer
86 views

segmentation fault when building Plutus-playground.server

I'm following the instructions for installing the Plutus-playground found here I discovered I must execute the following before step 10 git clone https://github.com/input-output-hk/plutus-apps.git I ...
XiTouch's user avatar
  • 349
1 vote
1 answer
26 views

Plutus playground not starting with Interpreter error after running :set in GHCI

plutus-playground-server: user error (Error evaluating simulation: InterpreterError (CompilationErrors [CompilationError {filename = "\n/private/tmp/web-ghc-work-1626f2e537d27294/Main.hs", ...
et97's user avatar
  • 174
1 vote
1 answer
97 views

Plutus Playground Server error: opening lock file '/nix/...root.lock': Permission denied

So I've been going through the Plutus Pioneers 3rd cohort lectures and last night accidentally left my computer unplugged. When I booted up Ubuntu Linux on the computer this morning I noticed I have 3 ...
Ryan Thackston's user avatar