Skip to main content

All Questions

1 vote
1 answer
23 views

how to use ownPubKey and RedeemerType and DatumType

My code is here. {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ...
Anton Begas's user avatar
2 votes
1 answer
26 views

Expecting one more argument to ‘RedeemerType’

My code is here marketConstraints :: Market -> TxConstraints (RedeemerType -> ScriptContext -> Bool) (DatumType, ()) marketConstraints market = mustValidateIn (to $ scriptAddress market) I ...
Anton Begas's user avatar
1 vote
1 answer
227 views

How to deploy the Plutus smart contract

I am following Plutus-pioneer-program to learn smart contract development in Cardano. I have tried the onchain and offchain code, compiled and tested in Plutus playground and also in emulator trace. ...
duaa azhar's user avatar
10 votes
3 answers
349 views

How to properly start a new Plutus project, from scratch

I'm from ETH's ecosystem and recently just decided to get into Cardano development, specifically Plutus dev work thanks to Demeter.Run, and after going through the Plutus starters on there, I noticed ...
0xDaito's user avatar
  • 101
0 votes
1 answer
47 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 ...
NaeriKailash's user avatar
0 votes
1 answer
34 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 [(\\\"...
NaeriKailash's user avatar
2 votes
2 answers
57 views

Whats Your Mental Model For Monads?

I was asked by a friend trying to learn plutus what a monad was, so I began talking about category theory. It seems that this confused him further how would you explain monads to a noob? Whats your ...
KryptoKing's user avatar
0 votes
1 answer
119 views

Can't create ```TokenName``` using ```tokenName``` with error ```GHC Core to PLC plugin: E042:Error: Unsupported feature: ...```

I'm not sure is relevant but the code in question is for a generic Validator (with Datums and Redeemers) used to get a forwarded minting policy the problem should be clear from the title, I can't get ...
Michele Nuzzi's user avatar
0 votes
1 answer
202 views

What is the correct way to compare two instances of Value data type?

Question What is the correct way to compare two instances of Value data type? Context I would like to check if outgoing transaction identified by PubKeyHash has the same Value as Value which was ...
KugisMugis's user avatar
0 votes
2 answers
65 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 ...
micahkendall's user avatar
0 votes
1 answer
105 views

Question about Plutus smart contract which always succeeds

Can anyone explain in detail why this script, https://github.com/james-iohk/Alonzo-testnet/blob/update-cabal-1.29.0/resources/plutus-sources/plutus-alwayssucceeds/src/Cardano/PlutusExample/...
Myles's user avatar
  • 321
3 votes
1 answer
105 views

Best practice for testing smart contract

Let's say you have your haskell code ready to test as a smart contract on the testnet, what is the best practice to go about testing if your smart contract works as intended? Does the same process ...
Myles's user avatar
  • 321
2 votes
2 answers
81 views

Retrieve only digit from TokenName and use onchain

How can I make the following function to retrieve only digit portion from the TokenName and use it on chain? For example I want to retrieve the number 123 from "AAA123" (TokenName) {-# ...
utxo's user avatar
  • 21
0 votes
1 answer
122 views

How to validate the correctness of another parameterized script address on-chain

I would like to write a factory script that can initialize another parameterized script address by sending it an NFT. The factory validator gets the parameters of the target script as redeemer and has ...
Flippy's user avatar
  • 83
2 votes
1 answer
74 views

What does it mean for a contract to "stop"?

I'm working through the week 4 homework for the Plutus Pioneer program. I've found an answer to the homework problem and now I'm trying to get a deeper understanding of the code. I've noticed that the ...
Paymahn Moghadasian's user avatar

15 30 50 per page