Questions tagged [plutus]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
31 views

Can I access the epoch nonce from inside a Plutus script?

Is is possible to access the epoch nonce from your Plutus script, to use as a trusted source or randomness ? The only suggestion for on-chain randomness I have found, is using an RNG oracle. But the ...
  • 46
0 votes
1 answer
41 views

Plutus Emulator trace halting with MintingPolicyNotFoundError

I have the following simple minting script: {-# INLINABLE unrestricted #-} unrestricted :: () -> ScriptContext -> Bool unrestricted () _ = True unrestricted_policy :: MintingPolicy ...
  • 3
1 vote
1 answer
68 views

User error: Caused by: [ (builtin unConstrData) (con data #187b) ] while trying to unlock tokens from contract

hi I am getting this error while trying to unlock tokens from my treasury contract it is already topp up with tokens when trying to unlock with the access token doesn't know the exact reason behind ...
2 votes
1 answer
52 views

Does it make sense to talk of reference script in the context of parameterized script?

In my understanding, if my script is parameterized, I would need to know the parameters to generate the script and then store it at an address to be later referred. But usually set of possible values ...
  • 110
0 votes
1 answer
61 views

OffChain code for inline datum

I am trying to create a OffChain code for submitting inline datums. gTest :: forall w s. GrabParams -> PlutusContract.Contract w s DataText.Text () gTest GrabParams{..} = do PlutusContract....
  • 13
6 votes
2 answers
145 views

Chain Indexers with Stream Endpoints

I have been taking a look at different chain indexers (or APIs to indexers) to see what's available today and how they differ - see resource list below. Question I still wanted to raise the question, ...
  • 1,088
0 votes
0 answers
24 views

Can't seem to find quickcheck file

Im trying to run cabal build in the terminal running from the git plutus-apps tag 19e1e6cf0e567c0222d723b57438e9a8efa878fb but im getting a notification instead when I run cabal build. /plutus-apps/...
  • 472
1 vote
2 answers
72 views

Is pure ADA put in a script address locked up forever?

I was trying out the 'always succeeds' script from the helios tutorial (https://github.com/Hyperion-BT/Helios/blob/main/doc/tutorial_03-always_succeeds.md) and made a mistake in the change address, so ...
5 votes
4 answers
86 views

Boostraping a plutus Smart contract project

I'm trying to "play" with Plutus and write some smart contract for the sake of practicing and getting familiar with it. My problem is I don't know how to bootstrap a smart contract project. ...
  • 51
0 votes
1 answer
39 views

Failing Validation on Script Address

I am trying to unlock an NFT that I locked into a script address. The unlocking succeds when I have some basic validation rules but when I add the minterIsPaid rule below, the validitation ...
  • 327
0 votes
1 answer
64 views

Script Execution Failure PT8

I am trying to transact with UTxO from a script address on the pre-production testnet. I locked the fund ok with Datum, now I get an error when trying to consume that UTxO, it seem that the script is ...
1 vote
1 answer
116 views

Missing/ No Redeemer Error when spending 2 script outputs

I am getting the following error, when I try to submit a transaction that spends 2 script outputs: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [...
  • 1,088
2 votes
1 answer
125 views

InlineDatum on ReferenceOutput in OffChain code

I tried to use the inline datum of a reference input in the minting policy below: {-# INLINABLE validateMinting2 #-} validateMinting2 :: TxOutRef -> BuiltinData -> BuiltinData -> () ...
4 votes
3 answers
93 views

How do users interact with smart contract?

In plutus playground, there is an example called “Vesting”. In the simulation, users can interact with this smart contract by click on “vest fund” or “retrieve funds”. Now suppose that we compile this ...
  • 323
0 votes
1 answer
38 views

Printing a plutus validators cborhex to a file

I was hoping to get some advice re printing a plutus validators cborhex to a file. Im kinda basing my logic off of an example in week03 in the pioneer program but need to make some adaptations. Below ...
0 votes
1 answer
38 views

Use a parameterized currencySymbol within a Plutus Validator. Unsupported feature: Type constructor: GHC.Prim.ByteArray#

I have a minting policy which is parameterized by PaymentPubKeyHash and a script which checks that a token from that minting policy has been burned. The script also takes PaymentPubKeyHash as a ...
1 vote
1 answer
83 views

"plutusV2MintingPolicy" lookup not found by "balanceTx"

I am trying to mint some example tokens in offchain plutus code on tag v1.0.0-alpha1. This is the OffChain code I am currently using: mintFactoryToken :: Contract () MintFactorySchema Text () ...
1 vote
2 answers
164 views

Plutus V2 Tx Building causing NonOutputSupplimentaryDatums error

I am stuck with this error, what's a NonOutputSupplimentaryDatums?: ""transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (...
  • 1,088
0 votes
1 answer
26 views

Plutus Playground - mustPayToTheScript - unexpected char escapes - 0 converted to \NUL, 1 to \SOH

I am having trouble with the mustPayToTheScript function - I am getting this error Contract instance stopped with error: "WalletError (InsufficientFunds \"Total: Value (Map [(,Map [(\\\"...
1 vote
0 answers
54 views

Plutus Playground WalletError: InsufficientFunds

I am running my smart contract on the plutus-playground and getting the error below: Contract instance stopped with error: "WalletError (InsufficientFunds \"Total: Value (Map [(,Map [(\\\&...
0 votes
1 answer
82 views

GHC error when adding TokenName to NFTMint params

I get the following GHC error for code that I am trying to update to Plutus V2. I can reproduce the error using the plutus-scripts below. Is this a bug with Plutus V2 or can anyone explain how to ...
  • 293
0 votes
2 answers
41 views

Coin Selection for Multiasset

I am building an NFT marketplace on Cardano. To build my transactions I use cardano-serialization-lib. When I try to use add_inputs_from() with LargestFirstMultiAsset strategy to choose inputs for the ...
0 votes
1 answer
17 views

Can I run garbage collector after installing plutus-apps?

I just finished installing plutus-apps and running nix-shell for the first time on a new computer. I noticed that the file size is pushing 60gb is there anyway for me to clean up some of the unused ...
  • 472
1 vote
1 answer
47 views

How to build a MultiSig wallet with a time delay element?

Any examples of tested libraries or code which enables multisig wallet where flow is more complex? Example of requirements: wallet transaction needs at least 2 signatures wallet can be created with a ...
0 votes
1 answer
45 views

Opportunity for theft of funds in Martify marketplace

I am some kinda embarrassed by "mkBuyValidator" in Martify Marketplace on-chain code . For buyer there is only one check for token transfer (on line 68): (valueOf (valuePaidTo info sig) (...
  • 35
0 votes
1 answer
58 views

Whether validation checks are necessary

In Plutonomicon github repo it says by the end of the page: For example, you don't need to prevent an unexpected transaction from locking value away - that's the submitter's own problem - but you do ...
  • 35
1 vote
1 answer
29 views

How to get Integer from Cardano.Ledger.BaseTypes.TxIx

I am using the following function from the Plutus pioneer program: stakeReferenceLedgerToPlutus :: Ledger.StakeReference StandardCrypto -> Maybe Plutus.StakingCredential ...
  • 1,088
2 votes
1 answer
111 views

Cannot find wrapMintingPolicy after updating to latest release of plutus-apps

I've just checked out the latest release of the plutus-apps repository and ensured to copy the respective cabal.project dependencies (including their commit hashes). But I get a weird error, I didn't ...
  • 1,088
1 vote
2 answers
287 views

What's a BabbageOutputTooSmallUTxO error? How to access minAda in Plutus code?

I'm trying to convert a V1 contract to V2, and I have offchain code that mints a token with a OneShotCurrency, and then pays the token plus 1 ada to my script. It worked with Plutus libraries from Feb....
  • 229
0 votes
0 answers
5 views

plutus PAB db migrate issue

I have been using this reference [https://github.com/input-output-hk/plutus-apps/tree/main/plutus-pab/test-node] to deploy smart contract using PAB but while run db migrate command faced below error ...
1 vote
1 answer
46 views

Is there an equivalent of Bitcoin Script Opcodes or the EVM instruction set in Cardano

Is there some lower level code that Plutus code compiles to (akin to Solidity => EVM bytecode, or BSV sCrypt => OP_codes)? Related (but distinct) how the state changes: https://cardano....
  • 115
1 vote
1 answer
96 views

VSCode HLS not working for plutus project

System Info: Ubuntu :20.04 I am trying to get VSCode HLS extension working for plutus based project but seeing below error in output. Failed to get project GHC version: no cradle [Info - 3:27:24 p.m.]...
1 vote
0 answers
20 views

How to profile the budget usage of Plutus scripts

How to profile the budget usage of Plutus scripts https://plutus.readthedocs.io/en/latest/howtos/profiling-scripts.html?highlight=profiling Im struggling trying to follow the steps indicated in the ...
1 vote
1 answer
52 views

Understanding the serialization and the deployment of a custom untyped plutus core implementation

I have found this open source project that aims to create a typescript library to write smart contracts. I had a look at the code but was not able to understand a couple of main pieces useful to ...
0 votes
0 answers
21 views

Any good tutorials or best practices for connecting real world assets to an NFT? (Tokenization)

I know it's early days for dapps and tokenization of real world assets, but it really seems like tokenization of assets and authentication services are the big innovations of blockchain and NFTs, and ...
  • 229
0 votes
1 answer
89 views

What happens if I omit a datum hash in a transaction to a script address?

When using a Trezor to sign a transaction with a script address as the receiver, I get the message "The following transaction output contains a script address, but does not contain a datum. ...
0 votes
1 answer
99 views

Any up to date Plutus tutorials for how to use the Emulator Trace?

I've recently updated my plutus-starter based app to the latest version, and it now references plutus-apps v0.1.0, and there are a lot of changes compared to what I started with in January. It seems ...
  • 229
2 votes
1 answer
283 views

Committing a database to the ledger without storing it on the ledger?

The Cardano blockchain has no global state, this means that shared state needs to be introduced. Is there a design pattern that lets you commit big sets of data to the ledger without storing it? This ...
  • 1,747
0 votes
0 answers
10 views

Unable to simulate example from community docs - NFT Creator

I tried to simulate a project from the Community Docs - NFT Creator. (updated in April 2022) https://plutus-community.readthedocs.io/en/latest/#Guides/plutus-starter/ The way i executed my project was ...
1 vote
1 answer
41 views

Plutus Playground parsing Wallet error: EndpointDecodeContractError

I ran the code from this plutus playground tutorial in the online playground https://playground.plutus.iohkdev.io/doc/plutus/tutorials/basic-apps.html# I'm getting this error when entering a number ...
1 vote
0 answers
17 views

strange cabal build behaviour - won't detect changes to code file

This might have something to do with me working in a docker container, that is an ubuntu version of linux, with nix installed and plutus-starter cloned. I'm currently updating a plutus script I wrote ...
  • 229
3 votes
1 answer
70 views

Is function "isPayToScriptOut" unsafe?

As far as i understood, function "isPayToScriptOut" assumes every output that has a datum hash is a script output. But what if we create new output with datum, assigned to some pub key (for ...
  • 35
2 votes
1 answer
36 views

Plutus BuiltinData vs. Data

I am confused about how they relate to each other. At first I thought Data is for offchain use and BuiltinData is for onchain use, but then I saw that that Data is also defined in PlutusCore which ...
  • 21
0 votes
0 answers
45 views

Using plutus-apps with cardano-node 1.35.x

I am new to Plutus development and I am working on some contracts. Some months ago, I setup my environment by cloning plutus-apps and checking out the main branch. I then created my project using one ...
  • 327
2 votes
3 answers
108 views

Calculate tx fees via Blockfrost or any other provider?

Is there a way to calculate transaction fees without having to go through cardano-cli? Maybe something like Blockfrost? or any other API providers? I don't want to run a local node to do that.
  • 421
2 votes
1 answer
160 views

Deploy a local testnet

To test plutus scripts and transactions, I want to have a lightweight environment which I can use when I have no internet. So, how can I deploy a local testnet in the Babbage era for testing?
  • 1,747
0 votes
0 answers
12 views

How ContractInstanceId works? What's the porpuse of cid files?

When working with PAB some files with cid extensions are generated when you try to use an endpoint. Does this file stores your information after you've done some operation in the smart-contract?
1 vote
0 answers
58 views

TxOutRefNotFound when using Plutus.Contract.Wallet (getUnspentOutput)

I am trying to get a UTxO of the current wallet, use it to mint a token via the OneShotCurrency type, but I keep getting the following Error: (TxOutRefNotFound (TxOutRef {txOutRefId = ...
  • 1,088
0 votes
1 answer
75 views

Yoroi and Typhon return FeeTooSmallUtxo error when submitting transaction

I've been playing around with cardano-serialization-lib and building different types of transactions with TransactionBuilder. However, when I calculate fee and change using add_change_if_needed(addr) ...
2 votes
0 answers
27 views

npm run start in plutus-playground-client creating npm errors

edit...I was able to get the plutus-playground-client working by using --force. How do I fix the monaco-editor dependency errors so I don't need to force it? Or do I even need to worry about it? I am ...
  • 121

1
2
3 4 5
13