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
17 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 ...
0
votes
0answers
19 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 ...
5
votes
4answers
185 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
37 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
12 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/...
2
votes
1answer
54 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 ...
3
votes
1answer
154 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 ...
2
votes
1answer
43 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
0answers
46 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) ...
4
votes
2answers
165 views

What does it mean that utxo sits at script address

What does it mean that "utxo sits at script address". What script address?
2
votes
1answer
67 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 ...
2
votes
1answer
83 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&...
1
vote
1answer
34 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. ...
1
vote
1answer
36 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-...
3
votes
1answer
33 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
109 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 ...
2
votes
1answer
51 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 ...
4
votes
1answer
86 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 ...
4
votes
2answers
71 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 ...
5
votes
1answer
46 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 ...
4
votes
2answers
131 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 = ...
6
votes
0answers
63 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, ...
7
votes
1answer
91 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 ...
4
votes
1answer
45 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 ...
1
vote
2answers
94 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-...
3
votes
1answer
41 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.
6
votes
1answer
89 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 ...
3
votes
1answer
45 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 ...
6
votes
1answer
131 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 ...
3
votes
1answer
104 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/...
1
vote
1answer
118 views

Is there any eth_sign equivalent signing method in plutus?

I want to use my private key to sign a message, and submit the message and signatures to third party server, the third party server can verify that signatures through plutus smartcontract. In ethereum ...
5
votes
2answers
98 views

npm build of plutus client fails with "permission denied"

I am trying to run the Plutus playground using the Gitbook recipe (https://docs.plutus-community.com/docs/setup/WindowsWSL.html). At step 15, the server starts fine, but trying to run the client with &...
5
votes
1answer
391 views

What does @ prefix means?

like this: auctionInstance = Scripts.validator @Auctioning and Hello-world app from https://playground.plutus.iohkdev.io/tutorial/tutorials/plutus-playground.html#running-the-hello-world-app hello = ...
7
votes
3answers
68 views

Deriving Show Compilation Error on Plutus Playground

I seem to be getting a compilation error when I try to compile any of the example files on my local host configuration for the Plutus Playground. The error is pictured here: And basically it seems ...
1
vote
1answer
49 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 ...
6
votes
2answers
142 views

Is there documentation on the Prerequisites for Plutus Pioneer code?

I'm trying to run the Plutus Pioneer code on a Docker container based on https://hub.docker.com/r/nixos/nix. I've followed this guide to install Cabal and GHC https://www.reddit.com/r/haskell/comments/...
5
votes
2answers
60 views

Failed to build eventful-sql-common-0.2.0

For lecture 10 of plutus pioneering program, we had to run cabal run uniswap-pab to create the contract IDs. I got this - plutus-pioneer-program-week10-0.1.0.0 (exe:uniswap-pab) (first run) Starting ...
4
votes
1answer
48 views

What is the correct Plutus repo tag for Plutus Pioneer Program week01?

I'm starting out with the Plutus Pioneer Program at https://github.com/input-output-hk/plutus-pioneer-program. One of the first steps is to clone the Plutus repo https://github.com/input-output-hk/...
1
vote
1answer
30 views

How does smCheck work?

In the PPP lecture 7 state machines are introduced. They are used to make the guessing game more concise. One of the situations is where the first player has won and needs to prove their guess by ...
3
votes
2answers
70 views

plutus pioneer week01 src code explain

I'm a little confused about the following code(from EnglishAuction.hs): auctionInstance :: Scripts.ScriptInstance Auctioning auctionInstance = Scripts.validator @Auctioning $$(PlutusTx.compile [|| ...
2
votes
1answer
69 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 = ...
7
votes
3answers
203 views

Plutus Pioneer Program - Lecture #1- Cabal Build error

I started following the lectures on youtube and got this error when I try to build the English Auction Warning: The build command is a part of the legacy v1 style of cabal usage. Please switch to ...
4
votes
1answer
140 views

When actually a validator is deployed to the blockchain?

I'm re-watching the Plutus Pioneer Program and in the video #2 I don't exactly get it here: https://youtu.be/E5KRk5y9KjQ?t=1782 There's the same contract code used by Wallet1 and Wallet2. Each of them ...
12
votes
4answers
319 views

On-chain and off-chain for Plutus SCs

Hi I am currently at lecture 5 of the Plutus Pioneers Programm and I was wondering which part of the code is on chain and which is offchain. I know that the valididation script is onchain but the ...
3
votes
1answer
77 views

Is it possible to make multiple transactions atomic?

A concrete example would be flash loans, where you could borrow some value from a lending script, do something interesting with it, and return the borrowed amount to the script with a fee, all in one ...
4
votes
1answer
257 views

What are the ways of making NFTs unique?

In the week 5 of Plutus Pioneer Program Lars described how to make NFT by spending an UTxO while minting, therefore ensuring the uniqueness of the token. Are there any other ways of making NFTs unique?...
6
votes
2answers
95 views

Referencing onchain contract as 3rd party

In solidity and EVM, it is possible to reference external contracts by providing the address and interface to the contract: address ckAddress = 0x06012c8cf97BEaD5deAe237070F9587f8E7A266d; ...
4
votes
3answers
146 views

What prevents a bad user to provide a wrong signature to a transaction?

What prevents a bad user to provide a wrong PubKeyHash and sign it with a different signature in the Signed.hs example from the Plutus Pioneer Program NFT lecture? Policy: Policy:mkPolicy :: ...
8
votes
7answers
1k views

As I front-end developer, how should I start learning more about blockchain and should I start with Plutus?

I'm currently a front-end dev - HTML, Javascript, CSS, PhP. I'd like to get into blockchain, but I don't know where to start. Any advice? Should I start by learning Plutus? If so, where should I start?...