5 votes
Accepted

Can a smart contract execute itself automatically?

On Cardano the answer is simple: smart contracts cannot execute themselves automatically. Rather, a smart contract is nothing but a set of rules associated with an address. In a first transaction, Ada ...
Jey's user avatar
  • 1,549
3 votes

Which would be the future language for writing smart-contract?

PlutusTx inherits its qualities from Haskell, and thus has many of the same benefits/drawbacks: Pros: auditability, maintainability, and upgradeability of code. Cons: developers' unfamiliarity with ...
zhekson's user avatar
  • 3,689
3 votes
Accepted

Javascript SDK for working with Plutus smart contracts

You have many options for that: programmatically create a Plutus smart contract to mainnet Here the only option is plu-ts; it allows you to write and compile a smart contract directly in typescript (...
Michele Nuzzi's user avatar
3 votes

Can a smart contract execute itself automatically?

To complement Jey's answer and respond to your last question, I don't think that smart contracts can execute automatically as they are just code that is sitting at an address and they need an actual ...
Falcon Stakepool's user avatar
2 votes
Accepted

How to handle sensitive data in smart contracts?

Storing secrets on the blockchain is not possible. Also, transferring secrets is not advisable because doing it via blockchain means publishing it to everybody. For any real world scenario, I can ...
Jey's user avatar
  • 1,549
2 votes

Transfer funds to "heir" - Possible?

No, because there is no mechanism to build and submit transactions on-chain. The closest option to what you want would be to create a simple timelocking script and send funds to the script's address. ...
james's user avatar
  • 1,540
2 votes

Is there any way to check reward address value?

The ledger already enforces this rule. See "Reward accounts are set to zero for each corresponding withdrawal." in the Shelley ledger spec.
james's user avatar
  • 1,540
2 votes

Loading specific Datum JSON with Map structure into Plutus type

You could define a union type for values, something like data Val = B BuiltinByteString | M (AssocMap BuiltinByteString Val) type OrcFax = AssocMap BuiltinByteString Val then you can deserialise ...
insitu's user avatar
  • 224
1 vote
Accepted

Validator always accepts and Mints (but it shouldn't)

That is because the interface of the source you have is for a spending validator, and NOT for a minting policy. Let me explain. for the chain there is not difference between spending validators and ...
Michele Nuzzi's user avatar
1 vote

Different types of Datums

There is another point here as well, in addition to George's. The addition of "reference inputs" (https://cips.cardano.org/cips/cip31/) also means that it is possible to use datum without ...
ZachSweet's user avatar
  • 198
1 vote
Accepted

Different types of Datums

The Inline Datum was introduced with the Vasil Hard Fork (https://cips.cardano.org/cips/cip32/). Before this, only using a Datum Hash was possible. Using a Datum Hash is more difficult for a ...
George - APEX Stake Pool's user avatar
1 vote

Which would be the future language for writing smart-contract?

Marlowe... or its descendants/variations ;-) I would like to emphasize the difference between Marlowe and all the other solutions and later on focus on Marlowe. I'll even allow myself to speculate a ...
paluh's user avatar
  • 111
1 vote

Is it possible to obtain the cbor hex/script bytes from a bech32 script address?

While all answers are insightful, here is an example that makes it possible to entirely get the jpg.store script bytecode from just its script hash obtained from the bech32 address, using the ...
zaherr's user avatar
  • 21
1 vote

"The second data argument, does not decode to a context" when minting NFT with Mesh

As Manu already mentioned it seems like the provider on which wallet.submitTx is based on is passing a Contex of PlutusV1 while your script expects a context of PlutusV2 this is not the fault of mesh; ...
Michele Nuzzi's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible