Cardano Smart Contract Development
Write type-safe smart contracts for Cardano using Scala. Debug validators with breakpoints in your IDE, test with ScalaCheck, and compile to Plutus Core.
@Compile
object MyValidator extends Validator:
inline override def spend(
datum: Option[Data],
redeemer: Data,
tx: TxInfo,
outRef: TxOutRef
): Unit =
val owner = datum.getOrFail("No datum").to[PubKeyHash]
require(tx.signatories.contains(owner), "Not signed by owner")Tutorials
- Build Your First Validator β Create a spending validator, write tests, and debug step-by-step
- HTLC Tutorial β Complete Hash Time-Locked Contract with tests and transactions
- Compiling to Plutus β Compile validators, configure options, and prepare for deployment
Validators
- Validator Types β Spending, minting, rewarding, and certifying validators
- Parameterized Validators β Reusable validators with compile-time configuration
- Plutus Data β Type-safe conversion between Scala and Plutus Data
Testing & Debugging
- Unit Testing β ScalusTest trait and property-based testing with ScalaCheck
- Debugging β Breakpoints, logging, and IDE debugger integration
Production
- Security β Common vulnerabilities and how to avoid them
- Optimizations β Reduce script size and execution costs
- Design Patterns β Patterns for multi-input validators
Deploying
- Working with Contract β Compilation options, blueprints, and script addresses
- First Contract Transaction β Lock funds and spend from a script address with TxBuilder
- Building Transactions β Build and submit simple ADA transfers
- DApp Development β Full application development
Last updated on