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, its lectures or homework.

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

How do I learn Plutus

I am having a hard time learning plutus the all of the plutus pioneer code doesn't work anymore due to rapid expansion of the plutus librarys. What other paths are out there for me to learn this skill ...
2
votes
1answer
106 views

How to lock funds in a smart contract?

What I want to do: Send 25 ADA and lock it all at the script address until 1 of the 2 scenarios happen: 100 ADA is sent by Nov 25th (today is Nov 20th) and all ADA at the script address is sent out ...
0
votes
0answers
10 views

Using Wallet.Emulator.Folds to debug scripts

I am trying to use functions from Wallet.Emulator.Folds to log stuff in a trace mintAndTransfer :: EmulatorTrace () mintAndTransfer = do let tn = "USDC" h1 <- ...
1
vote
0answers
23 views

Is there an established pathway yet for someone with a purely mathematical background to become a fully equipped Cardano developer? If so, what is it?

Title asks my question. I have a mathematics degree (undergrad) and have dipped a toe in the water of software development in Python, but have no clue where the optimal place to start to become an ...
4
votes
0answers
57 views

Questioning Plutus API design decision

In Lecture 10 from the Plutus Pioneer Programm there is a replica of the Uniswap Smart Contract built on top of Plutus. It is actually part of the standard Plutus use cases Plutus Uniswap To have a ...
1
vote
1answer
35 views

How to update lecture #2 code to work with newer versions of Plutus?

I've been trying to load solution #1 for week 2 of PPP into the public Plutus playground here: https://playground.plutus.iohkdev.io/ and I get several errors :/ I am absolutely perplexed. Does anyone ...
0
votes
2answers
30 views

Cabal repl is very slow

I've already setup the IOHK binary cache in /etc/nix/nix.conf, yet when I build PPP lecture #2 I have to build many modules. whereas it seems Lars only has to process one. Does anyone know why this ...
2
votes
2answers
58 views

Insufficient funds when trying to use script unspent output

I was following the example from the basic split app and changing it a bit to try to make a simple sell/buy NFT transaction. For now I'm just trying to transfer the NFT from one wallet to another. My ...
2
votes
2answers
112 views

Plutus Pioneers Week 01 - How to open EnglishAuction shell?

I was wondering how to get the EnglishAuction shell open so I can run these commands from the first lecture?
2
votes
2answers
96 views

Plutus Pioneer Program Week missing commit

The cabal.project file for Week 5 of the Plutus Pioneer program points to commit 8f1a47674a99ac9bc2aba3231375d8d6de0641d2 for the Plutus repo but that commit seems to not exist based on: 2:22PM /...
3
votes
1answer
38 views

What does it mean for a contract to "stop"?

I'm working through the week 4 homework for the Plutus Pioneer program. I've found an answer to the homework problem and now I'm trying to get a deeper understanding of the code. I've noticed that the ...
2
votes
1answer
120 views

Must spend UTxO constraint when minting NFT

I'm currently going through week 5 of the plutus piooner lectures, and I have some questions about the NFT process. Here is a reference with the complete code, but here are the important parts: The on-...
0
votes
1answer
19 views

plutus-playground-server sense of time is incorrect

I think my plutus-playground-server has an incorrect notion of time. I'm working on the homework for lecture 3 and keep running into issues with the simulator. Here's a screenshot of what I'm ...
1
vote
1answer
41 views

Plutus Pioneer lecture 3 homework 1 vesting logic

I'm having some trouble figuring out the vesting logic in homework 1 of the Plutus pioneer program lecture. I eventually gave up and looked at the solution which seems to be exhibiting the same "...
1
vote
1answer
80 views

Question about Datum and DatumHash

I have a question about findDatum which is used in some of example contracts in Plutus Pioneer Program. According to those lectures, this method is used to get Datum from its DatumHash. I wonder if it ...
1
vote
1answer
85 views

POSIXTime as payload

I have a parameterized contract that includes a POSIXTime as a field called startTime served via PAB. What is the appropriate stringified HTTP payload to indicate a date with time such as the 25th of ...
1
vote
1answer
11 views

HSL error for Datakinds extension in Week01 in VSCode

I'm trying to get type definitions for Plutus code in VSCode and I'm getting an unusual error. The first extension in the file is {-# LANGUAGE DataKinds #-} (<- this is a clickable link) and the ...
0
votes
1answer
16 views

Error when building HSL for GHC 8.10.4.20210212

I'm trying to get the haskell language server installed on my mac and I"m following the docs at https://docs.plutus-community.com/docs/setup/editors/prerequisites.html but they seem to not work. ...
1
vote
2answers
40 views

Sandbox error when running nix build

I'm trying to get the exercises for week 1 of the plutus pioneer program working. I've installed nix and have set the IOHK caches. When I try to run nix build -f default.nix plutus.haskell.packages....
1
vote
0answers
38 views

Plutus Pioneer Program Week01 : Installing plutus - Unable to start server if syncing plutus with plutus-pioneer-program version

In the plutus-pioneer-program/code/week01 folder, I got the tag as tag: ea0ca4e9f9821a9dbfc5255fa0f42b6f2b3887c4 The git log tag for plutus was 9879b31579d0deb863f3cdf27f93419deec3b4bb So I used git ...
2
votes
1answer
57 views

Getting the address of a parameterized contract from within the validator of another script

Suppose I have one contract, Contract 1, that is parameterized by type Contract1Params{ tokenName :: BuiltinByteString } and I have a minting policy that will only mint a token with tokenName tn ...
0
votes
0answers
14 views

Plutus Pioneer Program Week02: grab endpoint not working and trace log being cut off

Here you can see the 'grab' endpoint being correctly set. And here you can see the Tx2 slot for the grab endpoint is missing. Also, some lines of the trace are being cut off, I'm not sure if this is ...
6
votes
4answers
233 views

How to prevent economic DOS attacks against Plutus contracts

Many people wrote about the eUTXO model and the benefits it brings compared to Ethereum. However, eUTXO also comes with some challenges. In particular, eUTXO is susceptible to "economic denial of ...
0
votes
0answers
43 views

Why Cabal will not build Cardano api?

Hi I was just following lecture 1 when trying to build the Auction contract. Plutus commit: ea0ca4e9f9821a9dbfc5255fa0f42b6f2b3887c4 I ran Cabal clean, Cabal update, then added brew install libsodium-...
0
votes
0answers
18 views

Pioneer Lecture 6 - oracle client gets 403 error from coinmarketcap url

I'm running an ubuntu docker container on a MacOS host. I have the oracle-pab server running in a nix-shell, but when I try to run the oracle-client executable, I get this error: [nix-shell:/src/...
3
votes
1answer
65 views

Issues with oracle concurrency

I'm sort of running into an issue with the oracle described in the PPP. It looks like there is race between the oracle to update the exchange rate and the users to use the exchange rate in a swap. We ...
4
votes
1answer
202 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 ...
4
votes
1answer
55 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.
2
votes
0answers
60 views

What is achieved by invoking endpoint for wallet in the emulator?

As per entire code below, give always mandates that Wallet 2 be given: thePkh :: PubKeyHash thePkh = pubKeyHash $ walletPubKey $ Wallet 2 theVal :: Value theVal = ADA.toValue (ADA.Lovelace 3_000_000) ...
8
votes
2answers
248 views

What does it mean that a UTxO sits at script address?

What does it mean that a "UTxO sits at a script address". What is a script address?
3
votes
1answer
74 views

plutus-playground-server: user error (Error evaluating simulation: JsonDecodingError

I'm following the first lecture in the plutus pioneer program but I cannot set up the local environment. The error happens when running npm start on a nix-shell after initializing the playground ...
3
votes
1answer
109 views

How to solve the Plutus scalability issue?

This issue is one that'll plague projects trying to build on Cardano. Let's consider Lecture 10 of the first iteration of the Plutus Pioneers Program (https://www.youtube.com/watch?v=Dg36h9YPMz4&...
2
votes
1answer
47 views

Failing to set up plutus on windows

So I'm using WSL Windows 10 and I set up IOHK hashes, but everytime I run nix-shell I get following error: build of '/nix/store/9im4jp068ykqsm4s8996px605p6zrw7q-Agda-plan-to-nix-pkgs.drv' failed. ...
2
votes
1answer
49 views

What is the benefit of installing plutus playground locally?

In these instructions for working through the plutus pioneer program, it suggests installing the playground locally: https://tutorials.cardanoacademy.io/plutus-pioneer-program/setting-up-plutus-...
4
votes
1answer
43 views

Type instance syntax

I have already learned haskell from http://learnyouahaskell.com/chapters, but it doesn't cover the type instance syntax, like this: data Auctioning instance Scripts.ValidatorTypes Auctioning where ...
2
votes
2answers
149 views

How to compile plutus source code locally?

I'm trying to compile the Plutus source code locally, I tried cabal build in nix-shell, getting this error After searching the rest of the dependency tree exhaustively, these were the goals I've had ...
3
votes
1answer
74 views

Couldn't match expected type ‘BuiltinData’ in locally run playground

Working through the Plutus Pioneer Week2 homework and getting the following error in the locally served playground. error: • Couldn't match expected type ‘BuiltinData’ with ...
5
votes
1answer
141 views

Generate random number in Plutus on-chain code

Is it possible to generate a random number in Plutus on-chain code? For example, if I would like to implement a smart contract that works like gambling game, where a person deposits ADA and bets on a ...
5
votes
2answers
84 views

(Lecture #6 It #2 - Core.Hs) : Explaining lookups use of both typedValidatorLookups and otherScript?

Can somebody explain these lines and why (both) Constraints.typedValidatorLookups... and Constraints.otherScript... are used? Still struggling to get my head around lookups, so maybe that is why I'm ...
8
votes
1answer
107 views

How does `submitTxConstraintsWith` make usage of the ScriptLookups?

submitTxConstraintsWith :: ScriptLookups a -> TxConstraints (RedeemerType a) (DatumType a) -> Contract w s e Tx How does submitTxConstraintsWith make usage of the ScriptLookups? I always see it ...
5
votes
2answers
139 views

Pioneer Lecture 4 recursion - how is it not infinite?

In the solution for the Lecture #4 (cohort 1 I guess, I'm following on Youtube) payContract :: Contract () PaySchema Text () payContract = do pp <- endpoint @"pay" let tx = ...
7
votes
1answer
109 views

Plutus Pioneer Cohort 2 Lecture 3

I was going through the lecture on Youtube and this is the one with Vesting example where: wallet 1 gifts 20 ADA to wallet 2 in 2 different slots wallet 1 gifts 10 ADA to wallet 3 in a slot later on, ...
8
votes
2answers
153 views

Building local Plutus documentation

I've been following this guide to build Plutus documentation locally. The key line is - [~/plutus] nix-build -A plutus-playground.haddock This works fine, but I'm following the Pioneer Program and ...
5
votes
1answer
51 views

Understanding do notation with Monads in Plutus Pioneer Week 04

I have a question regarding a block of code from th Week04 Plutus Pioneer Program. The block is in Writer.hs foo'' :: Writer Int -> Writer Int -> Writer Int -> Writer Int foo'' x y z = do ...
2
votes
2answers
108 views

Plutus Pioneer Week 2 Smart Contracts

Do I need to run the cabal build for all the weekly modules? Will it do the following for all of the modules? Please confirm. In order, the following will be built (use -v for more details): - plutus-...
4
votes
1answer
44 views

Is there any keyword to get the epoch details or stake-pool details in Plutus Smart Contract?

I am trying to write a smart contract where I can get the awards for delegators of a particular stake pool. I need to know if that is right now possible to do using Plutus, if yes, pls suggest me.
7
votes
1answer
97 views

Plutus tutorial similar to Ethereums "CryptoZombies"

Is anyone aware of a similar tutorial as Ethereum's "CryptoZombies" being built for Plutus on Cardano? I'm currently in the Pioneer program, and although we're incredibly lucky to have Lars ...
4
votes
1answer
53 views

Plutus Pioneer Week02: otherScript validator

In gift.hs, I do not understand the logic for why in the lookups for the grab contract there is Constraints.otherScript validator. The grabber is the consumer of the UTXO and thus the burden of ...
8
votes
1answer
141 views

plutus starter course

So I am trying to start a plutus project from scratch, as we are always just editing the .hs source files in the plutus pioneering program homeworks, wondering what are the bare necessary files needed ...
4
votes
1answer
116 views

403 Forbidden when trying to run nix-shell during setup for Plutus Pioneer Program

I've seen other questions similar to this about a 404 error, but this is different. I have the IOHK Plutus cache set up as per the instructions. Getting the following error: trying https://bintray.com/...