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
2 answers
157 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 ...
0 votes
2 answers
82 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} ...
0 votes
1 answer
255 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 ...
0 votes
0 answers
25 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) ...
0 votes
1 answer
59 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 ...
-1 votes
1 answer
50 views

Programmatically write and submit a smart contract

Title. Any ways to accomplish this? Preferrably in react/javascript Edit: downvote me to oblivion!!
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 ...
1 vote
1 answer
102 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
92 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 ...
0 votes
1 answer
21 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 ...
2 votes
2 answers
92 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 ...
1 vote
1 answer
141 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
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 ...
3 votes
1 answer
137 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
214 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
319 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,...
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 ...
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 ...
0 votes
1 answer
101 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
65 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: $ ...
7 votes
2 answers
233 views

on multiple eUTxO and the validation proces

I have an in-depth question that needs good knowledge of the ledger rules. I was thinking about how to program efficiently and design apps such that they are parallelizable, a good practice for ...
1 vote
1 answer
196 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. ...
5 votes
1 answer
231 views

Why does my test of Plutus contract crash?

I tried to equip the EnglishAuction.hs contract from Plutus Pioneer Program week 01 with test routine designed according to what Lars presented in later lectures: doTest :: IO() doTest = ...
6 votes
1 answer
309 views

How do I deploy a smart contract from another smart contract?

If I want to create one top level contract for creating a bunch of other, similar contracts, lets say a top level Uniswap contract that creates liquidity pool contracts and keeps track of the total ...
8 votes
3 answers
1k views

Can blockchain viewers read the source code of a smart contract if they know its address?

I'm curious, is it possible to find the source code of the validation script of a smart contract (as well as other parts) that is already on the blockchain? Or this code automatically picking up into ...
1 vote
2 answers
75 views

Can complete transactions be effected using Cardano-cli with only minimal or no plutus involvement?

I'm doing week 3 of the Plutus Pioneer Program. The CLI portion was especially interesting to me. If I understand correctly, the cardano-cli can interact with the real mainnet, which presents the ...
0 votes
1 answer
26 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) ...
4 votes
3 answers
105 views

Funding emulator wallets with custom currencies

How exactly can I fund the emulator wallets with custom currencies? Please show an emulator example doing so.
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 ...
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....
3 votes
2 answers
62 views

How does setting up our environment for the course differ from what we'd be doing in production?

I was able to set up my development environment for the course thanks to the help from others in the discord and the guides they developed. I understand that this helps us set up the plutus ...
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 ...
4 votes
1 answer
53 views

Why does the grab function in the vesting contract need two slots to complete?

This is about Week3/Homework1 of the third Plutus-Pioneer-Program. Why does the grab endpoint need two slots to resolve and release the funds back to the wallet1? This will not create a transaction ...
4 votes
3 answers
144 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 ...
1 vote
1 answer
57 views

How to create a smart contract constant variable?

I am using state machines to create a smart contract. How can I create a variable that will be defined by the user when it runs the first step of the state machine and that then can't be modified ...
0 votes
2 answers
50 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 "...
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 ...
6 votes
1 answer
163 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 ...
0 votes
1 answer
47 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 ...
3 votes
3 answers
266 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 ...
0 votes
1 answer
125 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 ...
0 votes
1 answer
113 views

Where is the actual NFT data stored

I'd like to create a unique set of NFTs of super high definition images. However they require sizable memories. These images must reside on a server so will transactions just point to this server ...
2 votes
1 answer
256 views

Nix shell fails to start for Plutus

maciej@ola:~/workdir/plutus/plutus$ nix-env --version nix-env (Nix) 2.3.12 Running the nix-shell command for the default.nix in Plutus and getting a genuine http 404 error that stops the whole nix ...
1 vote
1 answer
104 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 ...
1 vote
1 answer
56 views

Referencing between scripts and application to state machines

(This is not related to CIP-33.) I want a validator to ensure another validator is also run. Naively I could construct one, get the hash, and hard code it into the other. Presumably two validators can'...
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 = ...
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 ...
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.
5 votes
2 answers
136 views

How to optimize Plutus smart contracts?

Context I'm creating scripts with hardcoded parameters in my smartcontract and I would like to reduce footprint of them to reduce transaction fees. Right now i'm doing so using parameterized ...
1 vote
1 answer
59 views

Why is String being interpreted as a type?

According type applications, this extension allows to give explicit type arguments to a polymorphic function. type VestingSchema = Endpoint "give" GiveParams .\/ ...

1
2
3 4 5
8