Questions tagged [plutus]
A programming language based on Haskell used to write smart contracts on the Cardano blockchain.
642
questions
1
vote
0
answers
13
views
redeeming from PlutusV3 script fails
This is the code of my smart contract. It basically requires exactly 3 reference inputs to pass validation.
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ...
0
votes
0
answers
13
views
Plutus Relese 1.21.0.0 is causing AlwaysPass validator to fail
I recently updated my project to plutus tag-1.21.0.0
for a minting contract, the validator is:
{-# INLINEABLE mkValidator #-}
mkValidator :: MintScriptParameter -> MintRedeemer -> ScriptContext -...
0
votes
0
answers
7
views
nix-build for Pluto takes hours -- stills haven't finished
I have installed Nix 2.20.5 in my ubuntu 22.04.4, following Readme I ran nix-build in Pluto directory.
It's taking several hours(>4) in building packages,not sure hong long it will need to finish ...
0
votes
0
answers
4
views
Find contents of a address from script context
I’m trying to find if a particular address submitting a transaction contains a NFT. Not necessarily the transaction itself but the address in general contains the NFT. I was looking at using ...
0
votes
0
answers
21
views
Minting and spending from the same script in a single transaction
I have a state NFT token locked in an hybrid script written in Aiken. I want to :
spend this NFT state to the script itself ( with a new datum which stores the new issuance state )
mint tokens I want ...
1
vote
1
answer
42
views
Is there any way to check reward address value?
Smart contract should allow the reward withdrawal only if all rewards are withdrawn. In other words only if the reward address will have exactly 0 lovelaces after the reward withdrawal. Is there any ...
0
votes
0
answers
23
views
Plutus-pioneer-progra cabal build error
when I built plutus-pioneer-program lecture week2, I got the error like this
/root/.cabal/store/ghc-8.10.7/cardano-crypto-praos-2.1.0.0-6256b7c51bff5ecd7a4cd62d0cae080568903ed67a7b8424037c5be2d1c7a1d9/...
0
votes
0
answers
20
views
ADA locked on Trust - 2 delegations*( only one should be active ) - Now cant claim & reflects 2 balances
Good afternoon all
I recently unstaked or attempted to unstake ada & it looked as if it was going from 1 validator to another , my problem is everything is stuck now. I cannot claim , I cannot ...
0
votes
1
answer
36
views
Examples of open source production level DApps on Cardano?
I am looking for Cardano DApps which are:
Actually deployed and used on mainnet
Have published their source code (at least on-chain part)
Examples of non-Plutus PL used (like Plutarch, Aiken, ...) ...
0
votes
0
answers
27
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
26
views
Nix error trying to install correct GHC version for Plutus
As recommended by Haskell/Nix expert lan Burzynski, I'm trying to use Nix install the correct GHC version for Plutus as follows:
nix shell nixpkgs#haskell.compiler.ghc8107BinaryMinimal nixpkgs#cabal-...
1
vote
0
answers
41
views
How to decouple Constr from Data
Imagine I have the following field in the Datum:
{
"fields": [
{
"int": 3810998862
},
{
"int": 18446744073709552000
...
2
votes
1
answer
85
views
Loading specific Datum JSON with Map structure into Plutus type
We have a specific Datum, taken from Orcfax oracle UTXO:
https://preprod.cexplorer.io/datum/9ced750ebbb2c9a9eac2e07a91525cadd3bfab23950089faa3e3a55517d1033f
the part we are interested in is the very ...
0
votes
0
answers
32
views
In which cases Plutus compiler is producing expensive code?
I have heard a couple of times, that is hard to make Plutus produce non-costly code, and one should consider writing scripts on a level with Plutarch's help instead. Still, I never get real reasons ...
1
vote
1
answer
26
views
Asses Utxos Time In On-Chain Code
Can you assess the time a Utxo was created in on-chain code?
i.e. A transaction to a smart contract that can claim only Utxos - in that contract address - sent in a specific time period?
1
vote
1
answer
27
views
Cabal build error when compiling simple Plutus code
From inside nix-shell, I run cabal build (after running cabal update) and I get the following error:
Failed to build libsystemd-journal-1.4.5.0.0.0.0.1.
Build log (
/home/eric/.cabal/logs/ghc-8.10.7/...
0
votes
2
answers
97
views
Validator always accepts and Mints (but it shouldn't)
Hey I have this simple stupid validator:
validator {
fn nft(datum: Datum, _redeemer: Void, context: ScriptContext) {
let ScriptContext { transaction, purpose } = context
when purpose is {
...
0
votes
0
answers
109
views
I am getting error when using nix build command
when using following command
nix --extra-experimental-features nix-command build -f default.nix plutus.haskell.pack ages.plutus-core.components.library
getting following error
error: could not set ...
1
vote
1
answer
50
views
I am getting error while using "cabal build all" cmd
I am new to plutus. I am trying to learn plutus for which I am using "plutus-starter" code to begin. while using "cabal build" i am getting following error:
Resolving dependencies.....
0
votes
0
answers
26
views
division amount to multi cardano address
There is a way to split a Cardano address among several addresses, for example, deposit an amount to one address and divide it equally among the holders of 100 NFTs.
thanks
2
votes
1
answer
62
views
How to handle sensitive data in smart contracts?
I'm interested in creating an escrow smart contract using Plutus, where a seller stores an encryption key in the Datum and sells it for a price. The key should only be accessible to a buyer who pays ...
0
votes
2
answers
152
views
Different types of Datums
I have a good understanding of the role of Datums in Cardano's Extended UTXO model, including their use in representing the state of a smart contract. However, I'm seeking further clarification on the ...
1
vote
1
answer
19
views
Transfer funds to "heir" - Possible?
Is it possible to write a smart contract in cardano - without off-chain solutions - that would hold funds until a specified date (or block height), and if I didn't interact with that smart contract ...
2
votes
2
answers
114
views
Adding stake credential to script address
I compiled my plutus script and generated a payment credential only address. The logic all working fine- no issues.
However when I add a stake credential to my plutus script address, the logic starts ...
2
votes
2
answers
96
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 ...
0
votes
1
answer
250
views
Error: encoding/hex: invalid byte: s When using Lucid calling payToContract
I am getting an issue when creating a Lucid transaction and calling payToContract
I have created the datum and it is erroring on the line that converts this datum toHex
With the following error: Error:...
1
vote
1
answer
31
views
Need to add signatures to plutus-simple-model-transaction
Any idea how to sign a transaction with multiple keys in plutus-simple-model ?
3
votes
2
answers
462
views
Can a smart contract execute itself automatically?
I was wondering wether a smart contract can execute automatically or not. For example, let's say I have a vesting contract that, when a certain deadline passes, automatically executes and send some ...
3
votes
2
answers
336
views
Which would be the future language for writing smart-contract?
As we might know well-known approaches for writing smart contracts on Cardano are using Plutus Tx or Marlowe based on specific requirements. However, according to the growth of the Cardano community, ...
0
votes
0
answers
106
views
Tx consuming script fails with: Caused by: (unConstrData #44000de140)... Third data argument, does not decode to a context when burning an NFT
I've this tx trying to submit to cardano-node 1.35.5:
...