Questions tagged [plutus]

A programming language based on Haskell used to write smart contracts on the Cardano blockchain.

Filter by
Sorted by
Tagged with
0
votes
1answer
16 views

Can GTK libraries used with Plutus?

Interested in GUI interfaces, is their restriction's in using GTK Haskell libraries with Plutus. Am only starting on Journey so wanted general feedback that might help guide me down right path.
0
votes
1answer
17 views

ConnectionError: There was a problem with the response body: Unexpected token T in JSON at position 0

I am having an issue with compiling any contracts on the local playground. It doesn't matter even when trying to compile the example contracts that are provided I keep getting this error. I have no ...
6
votes
1answer
95 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
1answer
33 views

How are datums retrieved from UTXOs by on-chain code?

How is Plutus on-chain code able to retrieve and decode datums from UTXOs of ScriptContext? These datums are hardly found in cardano-db-sync or explorers anywhere?
1
vote
2answers
36 views

What documentation works with handling utxos at the Putus Script

I am trying to make a Plutus smart contract which locks tokens to the contract and then on endpoint call sends 1 to the caller and then the rest back to the contract. I cant find a distribution model ...
1
vote
2answers
49 views

How are values in UTXO's stored

Are values in UTXO's stored in a set manner for example if 50 Tokens with metadata and 50 tokens without metadata had the same Token Name and currency symbol and were to be handed out from a script 1 ...
0
votes
2answers
33 views

Can I control the amount spent by a plutus Script

I know that you can use collectFromScript to take all of the value from a script but is there a way to make it so you only take 1 ADA from a Script that holds 100 ADA? Thank you
0
votes
0answers
24 views

How can I configure Ale so it finds Plutus libraries?

I'm using nvim with Ale, no particular config other than: Plug 'w0rp/ale' let g:ale_sign_error = '●' let g:ale_sign_warning = '●' It looks like works out of the box for Haskell, but cannot find ...
1
vote
0answers
12 views

Can all redeemers in a transaction be retrieved at once?

In the case of multiple datums and redeemers provided in a transaction, I see that TxInfo contains all datum in txInfoData :: [(DatumHash, Datum)] but not all redeemers are included. data TxInfo ...
1
vote
2answers
42 views

What's the equivalent to ownPubKey in the newer version of Plutus?

In lesson 5 that they use a built in function called ownPubKey to access the wallet pubKey in the transaction on the plutus playground. This function seems to be non-existent in the newer versions of ...
1
vote
1answer
40 views

How does Constraints.mustHashDatum work?

I'm trying to understand how Constraints.mustHashDatum works but I'm not able to figure out the purpose of this Constraint. Any help would be great.
1
vote
1answer
42 views

Cannot compile parameterized mintingPolicy to Plutus

I tried compiling a solution from the examples provided in PPP Iteration #2 but got stuck. Any ideas? Code: https://github.com/ILIYANGERMANOV/cardano-smart-contracts/blob/main/ivy-token/src/MintIvy.hs ...
0
votes
1answer
54 views

Nix build error: experimental Nix feature 'nix-command' is disabled

I have this error when I try to build plutus :~/code/plutus$ nix build -f default.nix plutus.haskell.packages.plutus-core error: experimental Nix feature 'nix-command' is disabled; use '--extra-...
1
vote
0answers
11 views

On the composabilty of plutus validator scripts

we love from Haskell the great level of abstraction and with that the modularity and composabilty it offers with it great type system. In extension of this I was wondering how modular and composable ...
1
vote
0answers
22 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 ...
1
vote
1answer
38 views

Do Cardano NFTs contain stable content?

In our company we discuss the Twitter post of the Signal founder: https://moxie.org/2022/01/07/web3-first-impressions.html. One critique is, that the NFTs don't contain the hash of data (jpg, ...) but ...
0
votes
1answer
20 views

How does Constraints.modifiesUtxoSet work?

I'm trying to understand how Constraints.modifiesUtxoSet works. Can anyone give an example? modifiesUtxoSet :: forall i o. TxConstraints i o -> Bool Check whether every transaction that satisfies ...
1
vote
2answers
39 views

Trouble fulfilling: base, libsystemd-journal, lobemo-scribe-systemd

2 days stucked with this (running on Ubuntu): [nix-shell:~/plutus-pioneer-program/code/week01]$ cabal build Warning: Requested index-state 2021-10-20T00:00:00Z is newer than 'hackage.haskell.org'! ...
2
votes
1answer
54 views

How to payToTheScript recording the Datum hash?

As far as I understand the function Constraints.mustPayToTheScript :: forall i o. ToData o => o -> Value -> TxConstraints i o is used to command: Hey, pay some money, Value, to the script ...
1
vote
0answers
12 views

Does plutus-pab support parallel requests?

Does plutus-pab support parallel requests to the same smart contract instance? Does plutus-pab support parallel requests to different smart contract instances? By parallel requests I mean calling ...
1
vote
1answer
36 views

How does a Cardano DApp client authorize a payment?

Am I correct in thinking that this requires a DApp connector on the same device as the User's wallet? Or could you have an app on the user's device that doesn't connect to their wallet, but somehow ...
2
votes
1answer
51 views

HLS Compiler Error PPP Week01 (WSL2 + VSCode)

I'm trying to get HLS (Haskell Language Server) working in VSCode using WSL2 so I can get type hints. I've already ran through the week01 instructions so I have a working nix installation. However, ...
1
vote
3answers
49 views

Seller pays the fees?

Is it always the case the seller pays the fees? Is this built in the protocol or is it possible to have buyer pay the fees?
0
votes
1answer
36 views

Error on "cabal build" - Week01 - warning is in EnglishAuction.hs

My cabal build ended in a warning - yet not sure if this needs to be resolved or if build completed ? Seems like build aborted over a warning ? Below is the warning that seems to have aborted the ...
1
vote
1answer
37 views

Cannot find definitions of tx___ functions in English Auction script

I might be missing some thing but in the English Auction script I am unable to find the definitions of the function that starts with tx: txOutDatumHash txInInfoResolved txOutValue txInInfoResolved ....
0
votes
1answer
14 views

Error evaluating Simulation in playground

I was finally able to run the playground and I was following exactly what the instructor was saying on the video, adding the wallets and actions but only the genesis transaction shows up when I ...
2
votes
1answer
25 views

On-chain and Off-chain code

I've seen the existing similar questions on this topic. I probably still don't get it. So a question: Is it a correct analogy to the JS-Solidity world that the On-chain code corresponds to the ...
0
votes
0answers
9 views

Couldn't match expected type `Program` with `UntypedPlutusCore.Core.Type.Program` in tutorial

I copied the plutus-starter template: https://github.com/input-output-hk/plutus-starter and created a file BasicPlutusTx.hs (and added it under exposed-modules in the .cabal file). Then I started ...
1
vote
1answer
59 views

plutus-playground-client npm start error (MacOs Intel i7)

[Updated] ✖ 「wdm」: ERROR in Error: Child compilation failed: Module not found: Error: Can't resolve '/Users/fanik/development/plutus_pioneer_program/plutus-apps/plutus-playground-client/undefined/...
0
votes
1answer
35 views

How to resolve the Following Error.?

Command failed: transaction build Error: The following scripts have execution failures: the script for transaction input 1 (in the order of the TxIds) failed with: The Plutus script evaluation ...
0
votes
1answer
20 views

Does the redeemer have to be from a wallet address/contract?

Could a contract be programmed such that the redeemer seemingly comes from nowhere from what the node / someone monitoring the blockchain could tell? I am thinking if you gave the contract some ada ...
0
votes
1answer
36 views

How to build a script transaction if the validator expects it to be signed

Given the following smart contract: {-# INLINEABLE mkValidator #-} mkValidator :: PubKeyHash -> BuiltinData -> ScriptContext -> Bool mkValidator beneficiary _ ctx = traceIfFalse "tx ...
0
votes
1answer
53 views

lzma-0.0.0.3 missing when building week 01 code

I am in a nix-shell and attempting to build the code for week 1. After lots of promising output, it fails with this error. Failed to build lzma-0.0.0.3. The failure occurred during the configure step....
3
votes
3answers
106 views

Running week01 expressions in repl

I am new to haskell and I am trying to run a few expressions from the English Auction Contract in the repl. So if I want to run ValidatorHash "f" from the second last line of the Contract in ...
0
votes
0answers
25 views

plutus-playground-server exits with with network error

When starting the plutus-playground-server in a nix-shell on an Ubuntu 20.04 machine (ref. step 4 in the plutus setup instructions), it terminates with the following error: Interpreter ready plutus-...
0
votes
3answers
93 views

Difference in the commit chosen between Plutus Pioneers lecture and given documents

When building plutus-apps locally I encountered a difference between the document that was shared a few days ago and the first lecture of Plutus Pioneers. The document says the following: git checkout ...
1
vote
2answers
78 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-...
2
votes
4answers
153 views

Plutus Playground Client fails to load: npm ERR! code ELIFECYCLE

$ nix --version nix (Nix) 2.5.1 $ ghci --version The Glorious Glasgow Haskell Compilation System, version 8.10.4.20210212 $ cat /etc/issue Ubuntu 21.10 \n \l I have the plutus playground server ...
1
vote
2answers
51 views

(Solved) error:\n Variable not in scope: main :: GHC.Types.IO a0 in English Auction

I'm trying to compile the English Auction script on a local plutus-playground-client session and I'm getting this error: error:\n Variable not in scope: main :: GHC.Types.IO a0 Any help on why ...
1
vote
1answer
39 views

Compiler Error {-# LANGUAGE DataKinds #-}

I try to compile EnglishAuction.hs code in playground web app and keep on getting compiler error. "[compiler] [E] loadObj "/nix/store/jmhwwzn1yfjzlxavz16afkf1r4shmp8z- persistent-sqlite-lib-...
1
vote
4answers
132 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 ...
2
votes
2answers
178 views

PPP Cohort 3 Lecture 1 (English Auction): Why does the buyer get the `minLovelace` (2 ADA) in the end even though the seller payed it initially?

In my example (same as in the lecture) the wallet 1 starts the auction and wallet 3 wins it. As the contract always has to have some ADA as Lars explains it looks like Wallet 1 pays 2 ADA to the ...
0
votes
1answer
52 views

nix-build fails to build plutus or plutus-playground server/client with error: reading from file: Is a directory

I'm attempting to finish the setup for plutus pioneers cohort3 on wsl2 (Windows 10) with Ubunutu 20.04 Nix version: 2.5.1 I cloned the plutus-apps repo (and previously tried the plutus repo before ...
0
votes
1answer
25 views

Webpack warning when starting plutus-playground-client

I am getting a warning when I run npm start on the plutus-playground-client: ℹ 「wds」: webpack output is served from / ℹ 「wds」: Content not from webpack is served from /home/datapool/plutus-apps/plutus-...
1
vote
1answer
63 views

slotToEndPOSIXTime error

Firstly, when I attempt to build a repl of week01 what I get is Then when I attempt to use slotToEndPOSIXTime I get Any help would be greatly appreciated, thanks! Everything else works great up ...
1
vote
2answers
65 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 ...
0
votes
1answer
34 views

Plutus Auction use-case

Regarding plutus-apps Auction use-case plutus-use-cases/src/Plutus/Contracts/Auction.hs , both auctionSeller and auctionBuyer need to specify the same exact params, or else each buyer could change the ...
0
votes
1answer
59 views

Unable to start /plutus-apps client application

Error is occurring for MacOS 12.1 Monterey. Please, let me know, if I should include additional details. I am going through the step noted in this document in order to setup local Plutus app: https://...
-2
votes
1answer
28 views

Wil I habe Problems with VirtualMachine?

I have a question: will I have problems installing Nix or Haskell on an Ubuntu VirtualMachine over Win11? Will I have problems with Plutus in the future? Would it be better to install Ubuntu only on ...
0
votes
3answers
160 views

Error running plutus-playground-client in Linux

I have successfully installed nix, cabal and have setup the IOHK binary cache. I cloned the plutus-app repository and successfully built the Haskell packages and other artifacts with nix. Then running ...

1
2 3 4 5
7