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.

98 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
1 answer
253 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 ...
user avatar
4 votes
0 answers
94 views

Cannot Get haskell-language-server running - duplicate symbol "sqlite3_fts3_may_be_corrupt"

hoping someone can help with this So, I would like to get the haskell-language-server running, in the context of the plutus-pioneers-program, so that in VS Code I can Ctrl+Click and view type ...
user avatar
4 votes
1 answer
43 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 ...
user avatar
3 votes
0 answers
37 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 ...
user avatar
3 votes
0 answers
40 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 ...
user avatar
  • 66
3 votes
2 answers
49 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 ...
user avatar
  • 31
3 votes
1 answer
120 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 ...
user avatar
2 votes
0 answers
67 views

Issues running Chain-index on WSL2 - fully syncing but not running the webserver

I've run into an issue with the chain-index while trying to run a PAB testnet environment. The index will start up, sync to 100%, update to new blocks, but the webserver will never start. In fact, the ...
user avatar
2 votes
0 answers
23 views

About Fees in the Plutus Playground

I had been reviewing sample codes that can be run in the Plutus Playground, particularly the Vesting.hs code in Cohort #3 Week #3 of PPP. So while trying several cases in the simulation, I sometimes ...
user avatar
2 votes
1 answer
107 views

Working with BuiltinByteString

I tried to create a few modification on the NFT minting contract from week 5 of the plutus pioneer program. I wanted to be able to mint a few tokens at once. My policy should require that the token ...
user avatar
  • 191
2 votes
0 answers
81 views

Optimising validators with `BuiltinData -> BuiltinData -> BuiltinData -> ()` and building tx with cardano-cli

In one of your previous classes you said that some teams are optimising their contracts with this type of validator BuiltinData -> BuiltinData -> BuiltinData -> () and I'll refer to those ...
user avatar
  • 148
2 votes
0 answers
27 views

How to reuse data when updating Token using StateMachine

I'm currently creating a social network-like Dapp on plutus, and I've come across something I don't understand. My Dapp, for example, is NFT(for own identity)->RFT(for sell own content)->NFT(for ...
user avatar
2 votes
1 answer
129 views

"bash: plutus-pab-generate-purs: command not found" issue when run plutus-playground on Ubuntu

I've followed guide for running plutus-playground . But when I npm run start on plutus-playground-client, it says 'bash: plutus-pab-generate-purs: command not found'. Please check screenshot on ...
user avatar
  • 21
1 vote
1 answer
74 views

Using Endpoints in a PAB Schema

I am trying to find a way to integrate endpoints from a native token staking contract and implement them into the PAB. I am assuming I will heavily be using the getSchema instance. Like so: instance ...
user avatar
1 vote
0 answers
39 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 ...
user avatar
  • 896
1 vote
0 answers
33 views

setting up the PAB - could not start the plutus-chain-index

I'm trying to follow the lesson 6 of iteration 3 of the plutus-pioneer-program when trying to start che chain index trough the command (fromn the plutus-apps repository) plutus-chain-index --config ./...
user avatar
  • 427
1 vote
0 answers
34 views

How Do I Deploy a Plutus Contract From the Browser?

I want the user to go to my website and enter some details into a form. This data should then be converted into an input for my parameterised smart contract (written in Plutus). I can do the website ...
user avatar
1 vote
0 answers
46 views

How to use Endpoints and Schema

I doing the PPP but Lars does not cover Endpoints or schema declarations in sufficient detail. I imagine that this is a problem that Plutus devs must overcome, but I cannot find suitable documentation ...
user avatar
1 vote
0 answers
52 views

Calculation cpu and memory exUnits on transaction submit is different then on transaction build?

I am trying to build a non-optimized script and during the cardano-cli build transaction I got an error: Command failed: transaction build Error: The following scripts have execution failures: the ...
user avatar
  • 369
1 vote
0 answers
70 views

How to add 'ToSchema' to Address (in Playground)?

I'm doing homework2 of week05 (cohort3). My contract runs fine in the repl, but when I try it in the playground, I'm running into an issue. It fails on this line: mkSchemaDefinitions ''NFTSchema I ...
user avatar
  • 172
1 vote
0 answers
126 views

How to Deploy / Write NFT Minting Plutus Script?

I am following through the third cohort PPP. With a week of course break, I wish to consolidate my understanding through practice. One exercise is to go through the deployment process of an NFT: ...
user avatar
1 vote
0 answers
23 views

cabal repl outputs a lot of changing git HEADs on plutus-pioneer-program

This is a question regarding the plutus-pioneer-program. I want to load the modules of a given week into the ghci shell. The first time I run cabal repl it takes quite a long time to download things ...
user avatar
  • 111
1 vote
1 answer
34 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 ...
user avatar
  • 188
1 vote
0 answers
52 views

Applycode to untyped validator, template Haskell

I am trying to learn the basics of the PlutusTx module. In this module is a function applyCode which maps the signatures CompiledCodeIn uni fun (a -> b) -> CompiledCodeIn uni fun a -> ...
user avatar
  • 896
1 vote
0 answers
79 views

week 02 - Pioneer cohort 3: Failed to build lzma-0.0.0.3

I am on week 02 of the 3rd Pioneer Cohort. I am working on a Mac Mojave; when I get to running cabal repl I get this error: Failed to build lzma-0.0.0.3. The failure occurred during the configure step....
user avatar
1 vote
0 answers
26 views

Problem with Lesson 5 code on newer version

I am trying to get signed token up and running on the Plutus playground from lesson 5 and I'm running into an issue with I believe is a depreciated variable of PubKeyHash does any body know the ...
user avatar
  • 456
1 vote
0 answers
20 views

Does the plutus playground make all defined function inlinable by defauld?

I noticed that not in all of the examples on the playground the {-# INLINABLE myProgram #-} flag is used. Does the playground natively accept every function as template haskell? Why do some examples ...
user avatar
  • 896
1 vote
1 answer
99 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 ...
user avatar
1 vote
1 answer
49 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 ...
user avatar
1 vote
0 answers
26 views

Auction contract example with metadata

In the example of NFT Auction, I am thinking about potential scenarios where certain JSON metadata an NFT was minted with, happens to be required in some arbitrary logic within auction process (artist ...
user avatar
  • 11
1 vote
2 answers
110 views

Error compiling Week01

I'm on commit: 41149926c108c71831cfe8d244c83b0ee4bf5c8a of the plutus-apps repo (I've also tried 7f53f18dfc788bf6aa929f47d840efa1247e11fd, doesn't seem to make a difference). When running cabal build ...
user avatar
  • 211
1 vote
1 answer
54 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 ...
user avatar
  • 11
1 vote
1 answer
41 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 ...
user avatar
  • 274
1 vote
2 answers
93 views

git checkout 41149926c108c71831cfe8d244c83b0ee4bf5c8a for English Auction doesn't work

According to cabal.project script for the English Auction, the git branch for this plutus script is: source-repository-package type: git location: https://github.com/input-output-hk/plutus-...
user avatar
  • 188
1 vote
4 answers
267 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 ...
user avatar
1 vote
2 answers
102 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 ...
user avatar
1 vote
1 answer
117 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/...
user avatar
1 vote
1 answer
94 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 $ ...
user avatar
  • 167
1 vote
1 answer
150 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 ( /...
user avatar
1 vote
1 answer
66 views

WSL2 Plutus env setup - docker load error: attribute 'devcontainer' in selection path

docker load < $(nix-build default.nix -A devcontainer) error: attribute 'devcontainer' in selection path 'devcontainer' not found -bash: $(nix-build default.nix -A devcontainer): ambiguous redirect ...
user avatar
  • 21
1 vote
1 answer
96 views

VSCode + Docker setup problems on Windows

I'm trying to setup the local enviroment by the VSCode + Docker way, because i find it easier for a newbie like me. I open the cloned repository on VSCode but when y click on the button to reopen it ...
user avatar
1 vote
1 answer
122 views

VSCode/Docker Setup Starter Pack problems

I'm trying to implement the 4th option of the starter pack setup using docker/vscode on my mac M1. I followed the instructions carefully from the github repository, but I'm getting errors. I'm new ...
user avatar
1 vote
0 answers
35 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 ...
user avatar
1 vote
0 answers
70 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 ...
user avatar
  • 11
0 votes
1 answer
16 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 ...
user avatar
0 votes
1 answer
12 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 ...
user avatar
0 votes
0 answers
18 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 ...
user avatar
0 votes
2 answers
67 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 ...
user avatar
0 votes
2 answers
41 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} ...
user avatar
  • 333
0 votes
1 answer
65 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 . ...
user avatar
  • 896