Questions tagged [plutus-playground]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
10 views

Why can't I use the same wallet more than once in Plutus Playground?

I'm currently testing my app in the "Plutus Playground" and the simulation will not let me call an endpoint from the same contract more than once. When I try to use the same wallet, the ...
user avatar
0 votes
1 answer
12 views

Did I update Plutus Apps Repo Wrong?

I just did a git pull updating my plutus repos from the one used in plutus pioneers 3 to the full state. I did not choose to move the HEAD to the commit mentioned and wanted to see what happens if I ...
user avatar
0 votes
0 answers
7 views

How to set up plutus-playground on Windows

I have some struggle setting up the plutus-playground on windows 11 & wsl2. so far I have done the following: installed nix & restarted the terminal created the etc/nix/nix.conf file and ...
user avatar
1 vote
1 answer
22 views

Where does the PAB run?

I understand that PAB is a backend that: provides a standardized environment in which Plutus applications run provides disciplined state management presents discoverable interfaces to the external ...
user avatar
0 votes
1 answer
28 views

Error signer not found - txInfoSignatories

I'm trying to implement lock and withdraw of an NFT, but when I tried to check the signer on-chain with the function: signer :: PubKeyHash signer = case txInfoSignatories (scriptContextTxInfo ctx) of ...
user avatar
  • 69
1 vote
1 answer
93 views

Can't compile Plutus Playground examples: Could not find module `Playground.Contract' (Ubuntu 20.04)

I can't compile any of the example scripts using Plutus Playground gui: Compilation Error, Line 2, Column 1 (jump) error: Could not find module `Playground.Contract' Use -v (or `:set -v` in ...
user avatar
0 votes
1 answer
63 views

Select only one UTxO from script address

I need to get only one UTxO from the script address, where its datum hash matches the redeemer hash. For example I have locked two UTxO with 10 Ada and the DatumHash "house" at the script ...
user avatar
2 votes
0 answers
23 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 ...
user avatar
1 vote
0 answers
69 views

How to add 'ToSchema' to Address (in Playground)?

I'm doing homework2 of week05 (cohort3). My contract runs fine in the repl, but when I try it in the playground, I'm running into an issue. It fails on this line: mkSchemaDefinitions ''NFTSchema I ...
user avatar
  • 172
1 vote
1 answer
44 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 ...
user avatar
  • 456
1 vote
1 answer
85 views

what is "WalletError (ValidationError (ScriptFailure (EvaluationError [\"PT5\"] \"CekEvaluationFailure\")))" when trying in playground?

I have Homework1 of week 5, and it works in the repl (meaning, the test gives the expected result). However, when I try the script in the playground (and remove the test - I don't think that makes a ...
user avatar
  • 172
0 votes
0 answers
19 views

Import printSchemas error when compiling in Plutus Playground

Occasionally when compiling the given homework starter code from github, I receive this error You need to import printSchemas in order to compile successfully, you can do this with either import ...
user avatar
0 votes
1 answer
74 views

On the off-chain code of homework 3 cohort 3

I was solving homework1.hs of week 3 of the third cohort and I think there is something wrong with the off-chain code of the solution given the validator. Namely the following, the off-chain part does ...
user avatar
  • 896
0 votes
0 answers
26 views

Smart contract configuration

Is it possible to write smart contract validator that would check: if UTXO that contains service price information was included so only script can read what is actual price of the service. UTXO with ...
user avatar
4 votes
1 answer
86 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 ...
user avatar
  • 500
0 votes
1 answer
52 views

printSchemas error compiling in Plutus Playground

I am getting this error when I try to compile the homework for Week03 of the plutus pioneer program: You need to import `printSchemas` in order to compile successfully, you can do this with either ...
user avatar
  • 188
1 vote
1 answer
34 views

cardano-cli not showing utxo but Testnet Blockchain Explorer does

I have requested funds via Faucet, twice in fact because the first one I thought the request didn't go through but when I run: cardano-cli query utxo --address $(cat 01.addr) --testnet-magic ...
user avatar
  • 188
1 vote
1 answer
61 views

Claiming two tokens by the locking account - owning tokens address

I'm trying to implement some simple two tocken lockup similary to what has been done in Vesting.hs on week03 {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# ...
user avatar
4 votes
1 answer
33 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 ...
user avatar
  • 125
0 votes
1 answer
30 views

Can anyone see whats wrong with my off-chain code

Im trying to create and send a utxo of tokens to a wallet through collectFromScript and I cant seem to get it to work. Can I get some help? I am trying to create a valid input for the ...
user avatar
  • 456
0 votes
0 answers
55 views

npm start is failing

Had worked all last week. This week after messing around to get cabal repl working, npm start has been abending. Screen shot attached. Tried as suggested "GC_DONT_GC=1 npm run start" It ...
user avatar
1 vote
1 answer
146 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 ...
user avatar
  • 148
0 votes
1 answer
27 views

ConnectionError: There was a problem with the response body: Unexpected token T in JSON at position 0

I am having an issue with compiling any contracts on the local playground. It doesn't matter even when trying to compile the example contracts that are provided I keep getting this error. I have no ...
user avatar
4 votes
2 answers
131 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 ...
user avatar
  • 456
4 votes
1 answer
66 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 ...
user avatar
0 votes
2 answers
51 views

Can I control the amount spent by a plutus Script

I know that you can use collectFromScript to take all of the value from a script but is there a way to make it so you only take 1 ADA from a Script that holds 100 ADA? Thank you
user avatar
  • 456
0 votes
0 answers
14 views

Child compilation failed [duplicate]

Hello Cardano community. This question has been asked in the community and I would like to resurface it as I am having the same problem. Ref: plutus-playground-client npm start error (MacOs Intel i7) ...
user avatar
  • 11
3 votes
6 answers
164 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: -- ... ...
user avatar
1 vote
2 answers
43 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....
user avatar
  • 100
1 vote
0 answers
26 views

Problem with Lesson 5 code on newer version

I am trying to get signed token up and running on the Plutus playground from lesson 5 and I'm running into an issue with I believe is a depreciated variable of PubKeyHash does any body know the ...
user avatar
  • 456
1 vote
1 answer
82 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 ...
user avatar
0 votes
1 answer
112 views

Getting status of daemon-socket: Operation not permitted while invoking nix-shell (MacOs)

Plutus Pioneers Week 01 exercise. cloned the plutus-app directory edited the nix.conf file (added the iohk binaries reference) moved to the plutus-app directory After downloading, linking and ...
user avatar
1 vote
1 answer
80 views

Error when executing npm start in plutus-playground-client

I get this error when I try to execute npm start in the plutus-playground-client directory 10% building 0/1 entries 0/0 dependencies 0/0 modulesℹ 「wds」: Project is running at https://0.0.0.0:8009/ ℹ 「...
user avatar
1 vote
0 answers
20 views

Does the plutus playground make all defined function inlinable by defauld?

I noticed that not in all of the examples on the playground the {-# INLINABLE myProgram #-} flag is used. Does the playground natively accept every function as template haskell? Why do some examples ...
user avatar
  • 896
1 vote
1 answer
98 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 ...
user avatar
5 votes
1 answer
237 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 ...
user avatar
  • 253
2 votes
1 answer
37 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 &...
user avatar
  • 21
0 votes
1 answer
59 views

Can one find the English Auction Example on the Playground somewhere?

I want to open the English Auction example. I was looking for it on the playground, but couldn't find it. Where did I go wrong? First I have checked out the commit with SHA1 hash ...
user avatar
  • 111
1 vote
3 answers
60 views

Seller pays the fees?

Is it always the case the seller pays the fees? Is this built in the protocol or is it possible to have buyer pay the fees?
user avatar
  • 188
5 votes
1 answer
118 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 ...
user avatar
1 vote
1 answer
38 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 ....
user avatar
  • 188
0 votes
1 answer
170 views

Localhost not displaying anything after running npm start in plutus-playground-client

I'm on a Mac running Big Sur with the intel chip. I've followed all the steps to set up the local Plutus environment as suggested by Lars in the Plutus Pioneer 3rd iteration. Next step is to get the ...
user avatar
0 votes
1 answer
22 views

Error evaluating Simulation in playground

I was finally able to run the playground and I was following exactly what the instructor was saying on the video, adding the wallets and actions but only the genesis transaction shows up when I ...
user avatar
0 votes
0 answers
76 views

Not in scope: type constructor or class ‘PaymentPubKeyHash’ - Week 1 Pioneers Exercise

I'm trying to compile the week 1 code on plutus playground hosted locally, but I'm getting this error: error: Not in scope: type constructor or class ‘PaymentPubKeyHash’ | 57 | { aSeller ...
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 = ...
user avatar
  • 319
0 votes
1 answer
33 views

English Auction Compilation Failure. Need help understanding the compile error message

I need help. Followed the lecture up to the compile. Got this failure : ConnectionError (HttpExceptionRequest Request { host = "localhost" port = 8080 secure = False requestHeaders = [("...
user avatar
0 votes
0 answers
28 views

DecodingError when evaluating EnglishAuction.hs at local Plutus Playground

When I follow steps from Auction Contract on the Playground video on my local Plutus playground, I got the following error message at evaluate step after successfully compiling the code. I'm on mac ...
user avatar
0 votes
2 answers
67 views

How to resolve npm build failure after running `GC_DONT_GC=1 npm start`?

MacOs Catalina 10.15.7 (Intel) After facing issue here, I ran the command GC_DONT_GC=1 npm run start and it build some libraries, however failed with following error (plutus-playground-server was up ...
user avatar
  • 1
2 votes
2 answers
138 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 ...
user avatar
3 votes
2 answers
177 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-...
user avatar