Skip to main content

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
0 answers
6 views

Setup dev enviroment locally fails on cabal test homework

Hi i setup the dev environment according to the youtube video, "cabal update" worked, but the second command does not work for me: root@c26be85e2bf4:/workspace/code/Week02# cabal test ...
wutzebaer's user avatar
  • 691
1 vote
0 answers
12 views

redeeming from PlutusV3 script fails

This is the code of my smart contract. It basically requires exactly 3 reference inputs to pass validation. {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ...
Reeshav Acharya's user avatar
0 votes
0 answers
25 views

Why is "Current Time" (slot) validating script logic when its interval is not contained within the deadline interval (as defined in script logic)?

I have locked my "deadline" (which is set into the future) in "POSIXTime" to the On-Chain Datum of my contract. To unlock it, I am using the "current time" (aka current ...
Basho's user avatar
  • 13
0 votes
0 answers
23 views

Plutus-pioneer-progra cabal build error

when I built plutus-pioneer-program lecture week2, I got the error like this /root/.cabal/store/ghc-8.10.7/cardano-crypto-praos-2.1.0.0-6256b7c51bff5ecd7a4cd62d0cae080568903ed67a7b8424037c5be2d1c7a1d9/...
Jinn Zh's user avatar
0 votes
0 answers
27 views

How to analyze the Plutus budget usage?

When I run my minting policy script I get the error Command failed: transaction build Error: The following scripts have execution failures: the script for policyId 0 (in the order of the PolicyIds) ...
dmitry_stas's user avatar
0 votes
1 answer
66 views

Cabal - could not resolve dependencies error

I have completed the pioneer program and am writing my own app. I've created my react front end and now am trying to serialize my smart contract in Haskell for a minting policy I wrote. The problem ...
mrsargent's user avatar
  • 121
-1 votes
1 answer
51 views

Programmatically write and submit a smart contract

Title. Any ways to accomplish this? Preferrably in react/javascript Edit: downvote me to oblivion!!
Myles's user avatar
  • 321
0 votes
1 answer
83 views

Lucid Vesting demo, signing from two different accounts but same seed

I'm working through the beneficiary vesting example where we have two beneficiaries: beneficiary 2 (giver who can reclaim funds after deadline), and beneficiary 1 (must claim gift before deadline). In ...
tyvan266's user avatar
0 votes
1 answer
31 views

PubKeyHash datatype vs BuiltinByteString for serialising scripts

In one of the utility function for serialising validator functions, we have validator :: PubKeyHash -> Validator and saveVal :: PubKeyHash -> IO () I was able to compute the PubKeyHash for my ...
tyvan266's user avatar
0 votes
1 answer
111 views

Lucid vesting demo

I'm running into the follow Lucid error from Week4 of Plutus pioneer program: /workspace/code/Week04/lecture# deno run -A lucid-vesting.ts error: Uncaught (in promise) TypeError: Cannot convert ...
tyvan266's user avatar
0 votes
1 answer
22 views

How to load test Nami with Vesting example?

I'm working through week3 of PPP#4: https://www.youtube.com/watch?v=C8TuGSzhqXU&list=PLNEK_Ejlx3x2zXSjHRKLSc5Jn9vJFA3_O&index=5] Here, the Vesting example using Lucid is demo and while I'm ...
tyvan266's user avatar
2 votes
2 answers
95 views

Javascript SDK for working with Plutus smart contracts

Are there any javascript SDKs which enable you to do the following: programmatically create and submit a Plutus smart contract to mainnet check what assets are currently locked at a given script ...
Myles's user avatar
  • 321
0 votes
2 answers
82 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....
NaeriKailash's user avatar
0 votes
1 answer
229 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 ...
Erwin Kurnia's user avatar
0 votes
1 answer
70 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 ...
a_juggler's user avatar
0 votes
1 answer
54 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 ...
d_fajardo's user avatar
  • 198
0 votes
1 answer
357 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,...
a_juggler's user avatar
3 votes
1 answer
149 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 -> ...
dmitry_stas's user avatar
1 vote
1 answer
36 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 ...
user618677's user avatar
0 votes
1 answer
113 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 ...
ash's user avatar
  • 53
2 votes
1 answer
66 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: $ ...
GlinesMome's user avatar
1 vote
1 answer
46 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 ...
a_juggler's user avatar
1 vote
1 answer
211 views

How to deploy the Plutus smart contract

I am following Plutus-pioneer-program to learn smart contract development in Cardano. I have tried the onchain and offchain code, compiled and tested in Plutus playground and also in emulator trace. ...
duaa azhar's user avatar
0 votes
1 answer
27 views

Custom currency error: Cannot build the initial state: Tag "toCardanoPolicyId"

I try to set an initial state of the emulator like so: test :: IO () test = runEmulatorTraceIO' def emCfg myTrace where dist = Map.fromList [ (senderWallet, Ada.lovelaceValueOf 100_000_000) ...
Adam's user avatar
  • 343
0 votes
1 answer
48 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 ...
tyvan266's user avatar
0 votes
1 answer
63 views

Module `Ledger.Typed.Scripts' does not export `wrapValidator'

I try to compile code from Plutus Pioneer Program week 4. These lines cause error. typedValidator :: Scripts.TypedValidator Vesting typedValidator = Scripts.mkTypedValidator @Vesting $$(PlutusTx....
Adam's user avatar
  • 343
7 votes
0 answers
98 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
1 vote
1 answer
139 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 ...
Hari Krishna's user avatar
0 votes
2 answers
52 views

How to check the output datum reference in V2

The following code would work for V1: outputDatum :: EkivalEscrowDatum outputDatum = case transferDatum $ txOutDatumHash ownOutput >>= flip findDatum info of Nothing -> traceError "...
Genty SAMVURA's user avatar
4 votes
3 answers
148 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
0 votes
1 answer
46 views

Printing a plutus validators cborhex to a file

I was hoping to get some advice re printing a plutus validators cborhex to a file. Im kinda basing my logic off of an example in week03 in the pioneer program but need to make some adaptations. Below ...
NaeriKailash's user avatar
0 votes
1 answer
50 views

Use a parameterized currencySymbol within a Plutus Validator. Unsupported feature: Type constructor: GHC.Prim.ByteArray#

I have a minting policy which is parameterized by PaymentPubKeyHash and a script which checks that a token from that minting policy has been burned. The script also takes PaymentPubKeyHash as a ...
Rohan Mitta's user avatar
1 vote
2 answers
87 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
3 votes
3 answers
273 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
0 votes
1 answer
129 views

Any up to date Plutus tutorials for how to use the Emulator Trace?

I've recently updated my plutus-starter based app to the latest version, and it now references plutus-apps v0.1.0, and there are a lot of changes compared to what I started with in January. It seems ...
marcel_g's user avatar
  • 239
1 vote
1 answer
106 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
67 views

TxOutRefNotFound when using Plutus.Contract.Wallet (getUnspentOutput)

I am trying to get a UTxO of the current wallet, use it to mint a token via the OneShotCurrency type, but I keep getting the following Error: (TxOutRefNotFound (TxOutRef {txOutRefId = ...
Will's user avatar
  • 1,162
2 votes
0 answers
29 views

npm run start in plutus-playground-client creating npm errors

edit...I was able to get the plutus-playground-client working by using --force. How do I fix the monaco-editor dependency errors so I don't need to force it? Or do I even need to worry about it? I am ...
tamio42's user avatar
  • 121
0 votes
1 answer
24 views

Is there training offered for those interested in being moderators?

Is there training offered for being a moderator? I would love to be one of them. I like learning and helping too.
WIMS-Cardano's user avatar
1 vote
2 answers
76 views

Plutus week 6 - Oracle example smart contract removed

Previously in Plutus pioneer program Week 6 shows how to implement an Oracle, now the example code has been removed. Is this because the way to implement Oracles has changed? and the previous approach ...
Zhong's user avatar
  • 13
1 vote
1 answer
179 views

Cabal repl fails because of missing dependency lzma

Summary When running cabal repl inside any week in the Plutus Pioneer Program, it fails with the error message: cabal: Missing dependency on a foreign library: * Missing (or bad) header file: lzma.h * ...
mayanhavoc's user avatar
1 vote
2 answers
144 views

Plutus V2 Primitives

Does any have (or has anyone found) a simple summary of Plutus V2 Primitives? They made the short list of big changes in the Vasil fork announcement, so they seem important. Other than just reading ...
nullValues's user avatar
1 vote
1 answer
112 views

How to reduce tx size using typed Plutus script with Vasil fork PlutusV2?

With the recent Vasil fork script references allow to reduce transaction size. Even though Vasil has been already launched on the testnet I could not find information on how to reduce the size of ...
KugisMugis's user avatar
0 votes
1 answer
71 views

Cannot wrap my head on NFTs

I am running through the Plutus Pioneer Program and I have reached week 5. Also as a reference, I will use the LobsterChallenge repository. I am a bit confused about how NFTs work for the Cardano ...
Kaloyan Yosifov's user avatar
0 votes
1 answer
65 views

Is there a way to see which Plutus code is deployed on a specific script address?

On Ethereum, for example, there is a way to see the Solidity code that is deployed in a specific address (as long as the code gets verified). Is there a way to achieve this same behaviour in Cardano?
Falcon Stakepool's user avatar
1 vote
1 answer
68 views

How does valuePaidTo work?

How does valuePaidTo work ? Does it give the value paid by the script to the pubkeyhash or is it the total value of the pubkeyhash for the pending transactions ? Consider the following TxOut txOutputs ...
munx's user avatar
  • 13
0 votes
1 answer
36 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
0 votes
1 answer
88 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 ...
SIDAN Whatever's user avatar
0 votes
1 answer
116 views

Can't create ```TokenName``` using ```tokenName``` with error ```GHC Core to PLC plugin: E042:Error: Unsupported feature: ...```

I'm not sure is relevant but the code in question is for a generic Validator (with Datums and Redeemers) used to get a forwarded minting policy the problem should be clear from the title, I can't get ...
Michele Nuzzi's user avatar
0 votes
2 answers
190 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 ...
J.O.C's user avatar
  • 1

1
2 3 4 5
8