Skip to main content

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
7 votes
0 answers
102 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
  • 353
4 votes
3 answers
160 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
  • 353
0 votes
2 answers
92 views

Error cabal build: "Failed to build lzma-0.0.0.3" even in nix-shell and also tried "sudo-apt install liblzma-dev"

I'm trying to run the command "cabal build" the Week02 code of plutus-pioneer-program but it has this error and I have tried everything but the same error keeps appear: Failed to build lzma-...
Anonymous's user avatar
0 votes
1 answer
35 views

Plutus Playground - mustPayToTheScript - unexpected char escapes - 0 converted to \NUL, 1 to \SOH

I am having trouble with the mustPayToTheScript function - I am getting this error Contract instance stopped with error: "WalletError (InsufficientFunds \"Total: Value (Map [(,Map [(\\\"...
NaeriKailash's user avatar
1 vote
0 answers
56 views

Plutus Playground WalletError: InsufficientFunds

I am running my smart contract on the plutus-playground and getting the error below: Contract instance stopped with error: "WalletError (InsufficientFunds \"Total: Value (Map [(,Map [(\\\&...
NaeriKailash's user avatar
3 votes
3 answers
293 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
  • 353
1 vote
2 answers
79 views

Plutus playground error when running simulator: WalletContractError ToCardanoError (Tag \"toCardanoPolicyId\" (Tag \"1 bytes\" DeserialisationError))

Plutus-apps v2022-04-06 My smart contract compiles successfully however when i run the simulator i get this error Contract instance stopped with error: "WalletContractError (ToCardanoError (Tag \&...
NaeriKailash's user avatar
0 votes
1 answer
31 views

Convert ChainIndexTxOut to TxOutTx

I have this function that is expecting type TxOutTx, but it receives ChainIndexTxOut. I'm trying to convert to the type required but encountering issues getTradeDatum o = case txOutDatum (txOutTxOut o)...
NaeriKailash's user avatar
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
  • 184
1 vote
1 answer
45 views

Plutus Playground parsing Wallet error: EndpointDecodeContractError

I ran the code from this plutus playground tutorial in the online playground https://playground.plutus.iohkdev.io/doc/plutus/tutorials/basic-apps.html# I'm getting this error when entering a number ...
A. J. Green's user avatar
1 vote
1 answer
111 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
1 vote
0 answers
18 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 ...
user7245's user avatar
0 votes
1 answer
37 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 ...
KryptoKing's user avatar
1 vote
1 answer
57 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 ...
Falcon Stakepool's user avatar
0 votes
1 answer
46 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 ...
pprs's user avatar
  • 101
1 vote
1 answer
168 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 ...
Marek Mizier's user avatar
0 votes
1 answer
154 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 ...
John_Bones's user avatar
2 votes
0 answers
28 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
1 vote
0 answers
91 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 ...
Kurt Sys's user avatar
  • 172
1 vote
1 answer
140 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
131 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 ...
Kurt Sys's user avatar
  • 172
1 vote
1 answer
103 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 ...
Fermat's user avatar
  • 1,872
1 vote
1 answer
74 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 ...
CryptoDinoAdamuso's user avatar
4 votes
1 answer
124 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
0 votes
1 answer
62 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 ...
d_fajardo's user avatar
  • 198
1 vote
1 answer
86 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 ...
d_fajardo's user avatar
  • 198
1 vote
1 answer
72 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 #-} {-# ...
CryptoDinoAdamuso's user avatar
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
0 votes
1 answer
50 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 ...
Floof99's user avatar
  • 472
0 votes
0 answers
58 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 ...
CryptoBoomer's user avatar
2 votes
1 answer
164 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
0 votes
1 answer
46 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 ...
Juan-luke Klopper's user avatar
4 votes
2 answers
190 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
71 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
0 votes
2 answers
77 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
Floof99's user avatar
  • 472
0 votes
0 answers
26 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) ...
SidneyN's user avatar
  • 11
3 votes
6 answers
202 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
1 vote
2 answers
46 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
0 answers
28 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 ...
Floof99's user avatar
  • 472
1 vote
1 answer
251 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
0 votes
1 answer
1k 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 ...
Alex Pestchanker's user avatar
1 vote
1 answer
105 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/ ℹ 「...
Jose Marvin Henriquez's user avatar
1 vote
0 answers
28 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 ...
Fermat's user avatar
  • 1,872
2 votes
1 answer
396 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
5 votes
1 answer
242 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
  • 273
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
0 votes
1 answer
74 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 ...
Marlo's user avatar
  • 111
1 vote
3 answers
71 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?
d_fajardo's user avatar
  • 198
6 votes
1 answer
164 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
1 vote
1 answer
42 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