Mateus
  • Member for 6 months
  • Last seen this week
plutus starter course
4 votes

I asked Lars the same question in the Q&A, his answer was that your best bet is to copy one of the Plutus Pioneer Program lectures (preferably the last one), remove the unnecessary modules and ...

View answer
Vim setup of Lars
3 votes

Take a look at this. After following this guide and setting up the plugins, you will need to nix-shell inside plutus-apps, and then cabal update and cabal build inside the actual haskell code you are ...

View answer
How to convert a cardano address into a public key hash?
1 votes

If anyone is trying to do this using cardano-serialization-lib and Nami: const PUBKEY_HASH = async () => { const cardano = window.cardano; const pkh = Loader.Cardano.BaseAddress.from_address( ...

View answer
Convert Redeemer, Datum or Script Parameter to JSON
1 votes

Reading some old messages in discord, someone mentioned that I could use encode (scriptDataToJson ScriptDataJsonDetailedSchema $ fromPlutusData data), taken from here, so I made a redeemerJSON ...

View answer
How to convert BuiltinString or BuiltinByteString to String?
Accepted answer
1 votes

Yes, per the definition, BuiltinByteString derives Show, so you can write show bbs, where bbs is your variable, and it will convert your BuiltinByteString into a String

View answer
Question about Datum and DatumHash
1 votes

I wonder if it is true that at anytime we can always get Datum from its corresponding DatumHash? No, the transaction info TxInfo has an argument called txInfoData, defined as txInfoData :: [(...

View answer
`Integer` as `Datum` in offchain code
Accepted answer
1 votes

Your off-chain code is using mustPayToTheScript and not mustPayToOtherScript. It's important to note the difference, since mustPayToTheScript will require a datum with the type you defined in poolInst'...

View answer
Options for adding Metadata to NFTs, to be used in a Plutus validator
Accepted answer
1 votes

I surely hope there's a better answer than mine, but, as a workaround, I believe one option would be to use the NFT TokenName as a metadata. For example, you could have a minting policy that would ...

View answer
Cannot compile parameterized mintingPolicy to Plutus
Accepted answer
0 votes

For some reason checking for equality with the TokenName type isn't possible on-chain (at least that's my theory, maybe TokenName itself is not acceptable). Still, you can define your token as a ...

View answer
How to get Wallet ID from an address?
0 votes

In JavaScript, from the Nami Wallet PAB demo: exports.getWalletIdImpl = () => { return Promise.all([window.cardano.getUsedAddresses(), window.cardano.getUnusedAddresses()]) .then(([...

View answer
How to prevent economic DOS attacks against Plutus contracts
0 votes

How would you implement a Plutus-NFT-auction that defends against economic DOS attacks? My approach is a little bit complex, since it involves thinking about the problem in a very different way, so ...

View answer
The Concurrency Issue
0 votes

Even though the EUTxO model ensures that outputs are not double spent, therefore limiting dApps to one "transaction" per UTxO every twenty seconds, it is not a requirement to use one UTxO ...

View answer