Questions tagged [plutus-pioneer-program]

A program to recruit and train developers in Plutus for the Cardano ecosystem. Use this tag for questions regarding the Plutus pioneer program. Keep lecture and homework questions brief and on-topic. Give full answers that clearly explain why they resolve the problem.

Filter by
Sorted by
Tagged with
0 votes
1 answer
191 views

Plutus transaction error PT5

I am building a transaction where I use the following function to make my datum and redeemer, writeJSON :: PlutusTx.ToData a => FilePath -> a -> IO () writeJSON file = LBS.writeFile file . ...
0 votes
1 answer
39 views

Typed redeemer in a minting policy

I could not make the typed redeemer in the following minting policy work. The redeemer was supposed to be data MintAction = Mint | Burn. (I settled with the workaround type MintAction = Bool, with ...
1 vote
4 answers
482 views

WSL2 install - plutus fails to build, unable to open db file in 'nix/var/nix/db/db.sqlite'

I'm attempting to finish the setup for plutus pioneers cohort3 on wsl2 (Windows 10) with Ubunutu 20.04. When I run the command: nix --extra-experimental-features nix-command build -f default.nix ...
0 votes
1 answer
28 views

playground-common package giving 'Failed to build scrypt-0.5.0' error

I'm trying to run my own little smart contract in the plutus-pioneer-program [fourth iteration] docker container and I'm having some problems. I've just added an extra folder alongside the other weeks....
1 vote
2 answers
66 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-...
0 votes
1 answer
38 views

SlotToPOSIXTime in English Auction Demo

in my cabal repl, i'm getting the following error from trying to replicate the week1 demo of Plutus-pioneer-program. I'm also unable to simulate the example scenario in the playground (i can see ...
0 votes
2 answers
101 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 ...
1 vote
1 answer
113 views

How is metadata typed on the blockchain

I am reading through the haddock documentation to find the way metadata is attached to a transaction. In this documentation (1) we have data Blockchain = [Block] data Block = [OnChainTx] Where and ...
0 votes
1 answer
33 views

Lucid npm throws error

I am trying to run the Lucid app. In /code/Week03/lucid directory, when I run npm install I get these errors: npm ERR! code 126 npm ERR! path /workspace/code/Week03/lucid/node_modules/utf-8-validate ...
0 votes
2 answers
78 views

Diagnosing a POSIXTime discrepancy

My computer's date command is returning a timestamp wildly different from what testnet wants. Using this formula, > slotToEndPOSIXTime testnetConf 55047601 POSIXTime {getPOSIXTime = 1651015217999} ...
-1 votes
0 answers
19 views

How do I get the files shown in youtube channel in PPP040102 in assets folder?

I am at the PPP040202. There are too many problems. The bash scripts aren't working. I verified with PPP040102. Apparently problem started there itself. Quite a few files are missing from assets ...
0 votes
1 answer
230 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 ...
3 votes
1 answer
68 views

Can't collect utxo from the gift script address

I'm following Plutus Pioneers Program, 4th Cohort. In the 2nd week we learned the smart contract Gift.hs -- This validator always succeeds mkGiftValidator :: BuiltinData -> BuiltinData -> ...
0 votes
1 answer
57 views

I'm getting errors in Week05 Solution.hs

Im trying to run Week05's home work solution 1 on the online plutus playground enviornment but I keep getting errors in lines 79 to 84 dose anybody know how to fix this? code pasted below along with ...
0 votes
1 answer
66 views

Lucid Cardano Datum Error

I'm trying to build lucid to connect with cardano smartcontract from scratch using webpack, but I always getting this error related to datum data Uncaught (in promise) TypeError: Cannot read ...
0 votes
1 answer
81 views

Using `curSymbol` function in Validator script

supposed I have a mintingpolicy script (simple one time minting policy, parameterizing TxOutRef) and a validator script. I want to validate if the token with correct CurrencySymbol is spent in a ...
0 votes
1 answer
62 views

unable to start plutus-playground-server after full rebuild --> /bin/plutus-playground-server: No such file or directory

After having to completely re-install an OS and setup a development environment. attempting to run the plutus-playground-server after building it wiht nix-build -A plutus-playground.server once in nix-...
0 votes
1 answer
82 views

I am getting a strange error when I try to start the playground server localy:

plutus-playground-server: for development use only error: creating symlink from '/plutus/plutus-playground-server/result.tmp-10234-376872119' to '/nix/store/hf815gz6hs5px2nrnnvsdjcpf8m0dvwg-ghc-shell-...
0 votes
3 answers
66 views

Plutus and Haskell live references

I am following the plutus pioneer program as an Haskell newbie. I am using VSCode to look at the snippets and type my code. I am wondering what is the best way to integrate (if possible) the languages ...
1 vote
1 answer
66 views

Where is Week04.Monad?

Doing Week 04 of cohort 3 Plutus Pioneers here. In the repl inside the nix shell, inside ~/plutus/plutus-pioneer-program/code/week04 Watching PPP 030402 at 34:54 to about 39:59. When I do :l src/...
0 votes
1 answer
75 views

Understanding a datum declaration in typescript

At the bottom of this post are lines 52-68 of file lucid-vesting of week 4 (PPP fourth iteration). I am having a hard time understanding line 60: const dtm: Datum = Data.to<VestingDatum>(datum,...
0 votes
0 answers
21 views

Does someone know how to integrate the plutus docs snippets on Sublime text?

I want to integrate the plutus docs provided in the ppp, which is initialized this way: python3 -m http.server -d ../plutus-pioneer-program/docs/plutus-docs/haddock I already installed the LSP(...
0 votes
1 answer
86 views

How to separate continuing outputs to compare datums

In the auction code of the Plutus pioneer program during week 1, the code approves a bid by comparing the datum with previous ones in the Plutus on-chain code. How could you repurpose this so that you ...
1 vote
1 answer
84 views

User error: Caused by: [ (builtin unConstrData) (con data #187b) ] while trying to unlock tokens from contract

hi I am getting this error while trying to unlock tokens from my treasury contract it is already topp up with tokens when trying to unlock with the access token doesn't know the exact reason behind ...
0 votes
1 answer
70 views

Error when minting with CLI

I tried to follow Lars' instructions on minting with CLI and I get the error below. I did not modify cabal.project. Any idea what goes wrong? ./mint-token-cli.sh ...
0 votes
2 answers
151 views

problem setting up the plutus environment

Noob here. I am basically just trying to learn plutus on my own I am on week01. When I ran the following command: [nix-shell:~/plutus-apps/plutus-playground-client]$ npm run start (or even just npm ...
0 votes
1 answer
110 views

How to get the return type of a contract

I was reviewing the code from https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week05/src/Week05/NFT.hs and I don't understand why this section does not cause a compile error. ...
0 votes
2 answers
60 views

Error on "cabal build" - Week01 - warning is in EnglishAuction.hs

My cabal build ended in a warning - yet not sure if this needs to be resolved or if build completed ? Seems like build aborted over a warning ? Below is the warning that seems to have aborted the ...
1 vote
1 answer
45 views

Is Plutus off-chain code relevant for testing?

It was mentioned in lecture 1 that in this fourth cohort of the PPP we won't need to learn to write off-chain code in Plutus/Haskell. Nevertheless it appears that testing uses the emulator and it ...
1 vote
1 answer
26 views

Week02 Homework 1

I am getting type mismatch when I use traceIfFalse. What could be be reason? And how could I get this resolved. I also noticed that it didn't fail while I build lecture examples. Couldn't match ...
0 votes
1 answer
27 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 ...
0 votes
1 answer
68 views

The Plutus script evaluation failed [Homework Week 02]

I'm a have problem unlocking the smart contracts of the homework of week 02. The Plutus code: {-# LANGUAGE DataKinds #-} {-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE NoImplicitPrelude ...
2 votes
1 answer
48 views

Can't collect due to a non existent script

I'm following Plutus Pioneers Program, 4th Cohort, I'm at Week 2 on testnet I'm struggling a bit collecting the gift, I have do a slightly modified version of Gift, creating it works as expect: $ ...
0 votes
1 answer
95 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 ...
0 votes
1 answer
181 views

What is the correct way to compare two instances of Value data type?

Question What is the correct way to compare two instances of Value data type? Context I would like to check if outgoing transaction identified by PubKeyHash has the same Value as Value which was ...
1 vote
1 answer
62 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 ...
0 votes
1 answer
38 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 ...
0 votes
1 answer
196 views

nix doctor --verbose [FAIL] Multiple versions of nix found in PATH, on MacOS i7

After performing a git commit tag update on plutus-apps, I restarted my computer, and ran nix doctor --verbose and got the following FAIL [FAIL] Multiple versions of nix found in PATH: /nix/...
1 vote
1 answer
197 views

cabal fails to build plutus-core

When installing plutus starter on a Mac M1 running macOS 12.1 Monterey, the command cabal build logs the following error, even after updating cabal: Failed to build plutus-core-0.1.0.0. Build log ( /...
1 vote
1 answer
117 views

Building PAB error: attribute 'plutus-pab' in selection path 'plutus-pab' not found

I am following https://docs.plutus-community.com/docs/setup/MacOS.html I know the plutus-apps repo is newer than those docs and have downloaded it but it seems I can't build plutus-pab. When I run $ ...
1 vote
1 answer
106 views

nix-shell : getting error "Index state found was 2021-10-20T00:00:00Z and no `index-sha256` was provided."

I'm having issues starting nix-shell from the plutus-apps directory. I have followed the steps provided here: https://docs.plutus-community.com/docs/setup/WindowsCohort2.html. Below is the full output ...
2 votes
1 answer
234 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 ...
1 vote
1 answer
56 views

Plutus Cohort 3: slot count why 11 and not 14

I ran the auction exactly as shown. The slot count at the closing (after the additional wait) comes up to 14, not 11, as shown in the video. (if I add all the waits, the result is, indeed, 14). If the ...
4 votes
1 answer
47 views

English Auction rejected translations are not shown

I have made a sample scenario: Start auction with a deadline of +10 slots wait for 12 slots Bid Wait for 1 slot to allow TX to be processed The third transaction is not shown - which is ...
0 votes
1 answer
157 views

nix-build not found inside nix-shell (Linux)

Every time I enter nix-shell, I need to execute the following command, otherwise nix-build and other nix-* commands are not found. source /home/xxx/.nix-profile/etc/profile.d/nix.sh I have added the ...
0 votes
1 answer
89 views

nix-build -A plutus-playground.client Error

I am part of cohort 3 and setting up on Mac OS also (Big Sur); I am following the notes here:https://docs.plutus-community.com/docs/setup/MacOS.html Was able to complete Step 9 (build library). But on ...
1 vote
1 answer
186 views

Playground client can't connect to playground server (all localhost)

I am on an Intel based iMac Pro running Big Sur (11.6.1) I have followed every variant of the local playground setup I can find (all are some version of page 2 in this document https://docs.google.com/...
1 vote
2 answers
155 views

nix-shell command causes error "invalid character in Base64 string"

I'm following the Plutus Env: Setup Starter Pack guideline to run a Plutus Playground Local Instance. At step 4, when running the command nix-shell, I got the error message error: invalid character in ...
0 votes
1 answer
28 views

Playground returning: ERR_CONNECTION_REFUSED after power-cycle of host

I was able to run the playground on localhost yesterday. Then I turned off the computer. Today, I restarted nix-shell and started the client/server, but now the browser is not loading and giving error:...
0 votes
1 answer
140 views

nix-build fails to build plutus or plutus-playground server/client with error: reading from file: Is a directory

I'm attempting to finish the setup for plutus pioneers cohort3 on wsl2 (Windows 10) with Ubunutu 20.04 Nix version: 2.5.1 I cloned the plutus-apps repo (and previously tried the plutus repo before ...

1
2 3 4 5
8